ses 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/NEWS.md +10 -0
- package/README.md +3 -6
- package/dist/lockdown.cjs +159 -165
- package/dist/lockdown.mjs +159 -165
- package/dist/lockdown.umd.js +159 -165
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +159 -165
- package/dist/ses.mjs +159 -165
- package/dist/ses.umd.js +159 -165
- package/dist/ses.umd.min.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/compartment-evaluate.js +5 -7
- package/src/compartment-shim.js +0 -30
- package/src/environment-options.js +4 -7
- package/src/error/assert.js +4 -0
- package/src/error/types.js +59 -0
- package/src/eval-scope.js +2 -5
- package/src/lockdown-shim.js +13 -18
- package/src/make-evaluate.js +10 -10
- package/src/make-function-constructor.js +6 -8
- package/src/make-safe-evaluator.js +5 -6
- package/src/module-instance.js +6 -6
- package/src/module-link.js +22 -36
- package/src/module-load.js +4 -7
- package/src/scope-constants.js +8 -8
- package/src/strict-scope-terminator.js +2 -5
- package/src/tame-locale-methods.js +6 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.18.0](https://github.com/endojs/endo/compare/ses@0.17.0...ses@0.18.0) (2022-11-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **ses:** Remove support for globalLexicals
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **ses:** Remove support for globalLexicals ([3b90d5d](https://github.com/endojs/endo/commit/3b90d5d96984ff211efe5e47de1ce57cde7be980)), closes [#904](https://github.com/endojs/endo/issues/904)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* assert touchups ([#1350](https://github.com/endojs/endo/issues/1350)) ([3fcb5b1](https://github.com/endojs/endo/commit/3fcb5b117eccb326c6c81339ae6a293a6bcaa9d4))
|
|
21
|
+
* fail template ([#1334](https://github.com/endojs/endo/issues/1334)) ([725b987](https://github.com/endojs/endo/commit/725b987ffa812a070ff45fcd496cf8fd88df6963))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.17.0](https://github.com/endojs/endo/compare/ses@0.16.0...ses@0.17.0) (2022-10-24)
|
|
7
26
|
|
|
8
27
|
|
package/NEWS.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
User-visible changes in SES:
|
|
2
2
|
|
|
3
|
+
# v0.18.0 (2022-11-14)
|
|
4
|
+
|
|
5
|
+
- *BREAKING*: Removes support for `globalLexicals`.
|
|
6
|
+
To our knowledge, there are no production uses for `globalLexicals`.
|
|
7
|
+
They currently could leak because `moduleLexicals` and `globalLexicals`
|
|
8
|
+
used the same scope object, so properties of one would leak to the other
|
|
9
|
+
with crafted modules.
|
|
10
|
+
We had an opportunity to plug the leak at the cost of a fifth scope
|
|
11
|
+
in all evaluators, but elected to remove the unnecessary complexity instead.
|
|
12
|
+
|
|
3
13
|
# v0.17.0 (2022-10-24)
|
|
4
14
|
|
|
5
15
|
- Previous versions of SES would leak the proxy used to isolate evaluated
|
package/README.md
CHANGED
|
@@ -465,8 +465,7 @@ not a module.
|
|
|
465
465
|
|
|
466
466
|
```js
|
|
467
467
|
const transforms = [addCodeCoverageInstrumentation];
|
|
468
|
-
const
|
|
469
|
-
const c = new Compartment({ console }, null, { transforms, globalLexicals });
|
|
468
|
+
const c = new Compartment({ console, coverage }, null, { transforms });
|
|
470
469
|
c.evaluate('console.log("Hello");');
|
|
471
470
|
```
|
|
472
471
|
|
|
@@ -503,11 +502,9 @@ and modules converted to programs, pass them as `__shimTransforms__`
|
|
|
503
502
|
instead of `transforms`.
|
|
504
503
|
|
|
505
504
|
```js
|
|
506
|
-
const __shimTransforms__ = [
|
|
507
|
-
const
|
|
508
|
-
const c = new Compartment({ console }, null, {
|
|
505
|
+
const __shimTransforms__ = [addCoverage];
|
|
506
|
+
const c = new Compartment({ console, coverage }, null, {
|
|
509
507
|
__shimTransforms__,
|
|
510
|
-
globalLexicals
|
|
511
508
|
});
|
|
512
509
|
c.evaluate('console.log("Hello");');
|
|
513
510
|
```
|