Skip to content

Commit 127d9cd

Browse files
committed
test: cover regressions
1 parent ab0e654 commit 127d9cd

42 files changed

Lines changed: 239 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/index-browser-esm.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,13 @@ function unshift(item, arr) {
15781578
*/
15791579

15801580
/**
1581-
* @typedef {typeof SafeScript} EvalClass
1581+
* @typedef {new (expr: string) => {
1582+
* runInNewContext: (context: object) => EvaluatedResult
1583+
* }} ScriptConstructor
1584+
*/
1585+
1586+
/**
1587+
* @typedef {ScriptConstructor} EvalClass
15821588
*/
15831589

15841590
/**
@@ -1594,12 +1600,6 @@ function unshift(item, arr) {
15941600
* @typedef {string|string[]} PathType
15951601
*/
15961602

1597-
/**
1598-
* @typedef {new (expr: string) => {
1599-
* runInNewContext: (context: object) => EvaluatedResult
1600-
* }} ScriptConstructor
1601-
*/
1602-
16031603
/**
16041604
* @typedef {{Script: ScriptConstructor}} SafeScriptType
16051605
*/

dist/index-browser-esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-umd.cjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,13 @@
15841584
*/
15851585

15861586
/**
1587-
* @typedef {typeof SafeScript} EvalClass
1587+
* @typedef {new (expr: string) => {
1588+
* runInNewContext: (context: object) => EvaluatedResult
1589+
* }} ScriptConstructor
1590+
*/
1591+
1592+
/**
1593+
* @typedef {ScriptConstructor} EvalClass
15881594
*/
15891595

15901596
/**
@@ -1600,12 +1606,6 @@
16001606
* @typedef {string|string[]} PathType
16011607
*/
16021608

1603-
/**
1604-
* @typedef {new (expr: string) => {
1605-
* runInNewContext: (context: object) => EvaluatedResult
1606-
* }} ScriptConstructor
1607-
*/
1608-
16091609
/**
16101610
* @typedef {{Script: ScriptConstructor}} SafeScriptType
16111611
*/

dist/index-browser-umd.min.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-node-cjs.cjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,13 @@ function unshift(item, arr) {
15821582
*/
15831583

15841584
/**
1585-
* @typedef {typeof SafeScript} EvalClass
1585+
* @typedef {new (expr: string) => {
1586+
* runInNewContext: (context: object) => EvaluatedResult
1587+
* }} ScriptConstructor
1588+
*/
1589+
1590+
/**
1591+
* @typedef {ScriptConstructor} EvalClass
15861592
*/
15871593

15881594
/**
@@ -1598,12 +1604,6 @@ function unshift(item, arr) {
15981604
* @typedef {string|string[]} PathType
15991605
*/
16001606

1601-
/**
1602-
* @typedef {new (expr: string) => {
1603-
* runInNewContext: (context: object) => EvaluatedResult
1604-
* }} ScriptConstructor
1605-
*/
1606-
16071607
/**
16081608
* @typedef {{Script: ScriptConstructor}} SafeScriptType
16091609
*/

dist/index-node-esm.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,13 @@ function unshift(item, arr) {
15801580
*/
15811581

15821582
/**
1583-
* @typedef {typeof SafeScript} EvalClass
1583+
* @typedef {new (expr: string) => {
1584+
* runInNewContext: (context: object) => EvaluatedResult
1585+
* }} ScriptConstructor
1586+
*/
1587+
1588+
/**
1589+
* @typedef {ScriptConstructor} EvalClass
15841590
*/
15851591

15861592
/**
@@ -1596,12 +1602,6 @@ function unshift(item, arr) {
15961602
* @typedef {string|string[]} PathType
15971603
*/
15981604

1599-
/**
1600-
* @typedef {new (expr: string) => {
1601-
* runInNewContext: (context: object) => EvaluatedResult
1602-
* }} ScriptConstructor
1603-
*/
1604-
16051605
/**
16061606
* @typedef {{Script: ScriptConstructor}} SafeScriptType
16071607
*/

docs/ts/classes/Safe-Script.SafeScript.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h1>Class SafeScript</h1></div>
1515
<div class="tsd-comment tsd-typography"><p>A replacement for NodeJS' VM.Script which is also <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP">Content Security Policy</a> friendly.</p>
1616
</div></section><aside class="tsd-sources">
1717
<ul>
18-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/Safe-Script.js#L319">Safe-Script.js:319</a></li></ul></aside>
18+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/Safe-Script.js#L319">Safe-Script.js:319</a></li></ul></aside>
1919
<section class="tsd-panel-group tsd-index-group">
2020
<section class="tsd-panel tsd-index-panel">
2121
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
@@ -51,20 +51,20 @@ <h4 class="tsd-parameters-title">Parameters</h4>
5151
</div></li></ul></div>
5252
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">SafeScript</a></h4><aside class="tsd-sources">
5353
<ul>
54-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/Safe-Script.js#L323">Safe-Script.js:323</a></li></ul></aside></div></li></ul></section></section></details>
54+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/Safe-Script.js#L323">Safe-Script.js:323</a></li></ul></aside></div></li></ul></section></section></details>
5555
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
5656
<h2 class="tsd-anchor-link" id="properties-1">Properties<a href="#properties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
5757
<section>
5858
<section class="tsd-panel tsd-member">
5959
<h3 class="tsd-anchor-link" id="ast"><span>ast</span><a href="#ast" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
6060
<div class="tsd-signature"><span class="tsd-kind-property">ast</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span></div><aside class="tsd-sources">
6161
<ul>
62-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/Safe-Script.js#L325">Safe-Script.js:325</a></li></ul></aside></section>
62+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/Safe-Script.js#L325">Safe-Script.js:325</a></li></ul></aside></section>
6363
<section class="tsd-panel tsd-member">
6464
<h3 class="tsd-anchor-link" id="code"><span>code</span><a href="#code" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
6565
<div class="tsd-signature"><span class="tsd-kind-property">code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
6666
<ul>
67-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/Safe-Script.js#L324">Safe-Script.js:324</a></li></ul></aside></section></section></details>
67+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/Safe-Script.js#L324">Safe-Script.js:324</a></li></ul></aside></section></section></details>
6868
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
6969
<h2 class="tsd-anchor-link" id="methods-1">Methods<a href="#methods-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
7070
<section>
@@ -84,7 +84,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
8484
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>Result of evaluated code</p>
8585
<aside class="tsd-sources">
8686
<ul>
87-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/Safe-Script.js#L333">Safe-Script.js:333</a></li></ul></aside></div></li></ul></section></section></details></div>
87+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/Safe-Script.js#L333">Safe-Script.js:333</a></li></ul></aside></div></li></ul></section></section></details></div>
8888
<div class="col-sidebar">
8989
<div class="page-menu">
9090
<div class="tsd-navigation settings">

docs/ts/classes/jsonpath-browser.Script.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h1>Class Script</h1></div>
1515
<div class="tsd-comment tsd-typography"><p>In-browser replacement for NodeJS' VM.Script.</p>
1616
</div></section><aside class="tsd-sources">
1717
<ul>
18-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/jsonpath-browser.js#L102">jsonpath-browser.js:102</a></li></ul></aside>
18+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/jsonpath-browser.js#L102">jsonpath-browser.js:102</a></li></ul></aside>
1919
<section class="tsd-panel-group tsd-index-group">
2020
<section class="tsd-panel tsd-index-panel">
2121
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
@@ -50,15 +50,15 @@ <h4 class="tsd-parameters-title">Parameters</h4>
5050
</div></li></ul></div>
5151
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">Script</a></h4><aside class="tsd-sources">
5252
<ul>
53-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/jsonpath-browser.js#L106">jsonpath-browser.js:106</a></li></ul></aside></div></li></ul></section></section></details>
53+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/jsonpath-browser.js#L106">jsonpath-browser.js:106</a></li></ul></aside></div></li></ul></section></section></details>
5454
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
5555
<h2 class="tsd-anchor-link" id="properties-1">Properties<a href="#properties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
5656
<section>
5757
<section class="tsd-panel tsd-member">
5858
<h3 class="tsd-anchor-link" id="code"><span>code</span><a href="#code" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
5959
<div class="tsd-signature"><span class="tsd-kind-property">code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
6060
<ul>
61-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/jsonpath-browser.js#L107">jsonpath-browser.js:107</a></li></ul></aside></section></section></details>
61+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/jsonpath-browser.js#L107">jsonpath-browser.js:107</a></li></ul></aside></section></section></details>
6262
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
6363
<h2 class="tsd-anchor-link" id="methods-1">Methods<a href="#methods-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
6464
<section>
@@ -78,7 +78,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
7878
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>Result of evaluated code</p>
7979
<aside class="tsd-sources">
8080
<ul>
81-
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/74e35b04a668dc944b49ec2882338f33e88314fc/src/jsonpath-browser.js#L115">jsonpath-browser.js:115</a></li></ul></aside></div></li></ul></section></section></details></div>
81+
<li>Defined in <a href="https://github.com/brettz9/JSONPath/blob/ab0e654fd4db33b65ede2ee47626b037a572f207/src/jsonpath-browser.js#L115">jsonpath-browser.js:115</a></li></ul></aside></div></li></ul></section></section></details></div>
8282
<div class="col-sidebar">
8383
<div class="page-menu">
8484
<div class="tsd-navigation settings">

0 commit comments

Comments
 (0)