ses 0.17.0 → 0.18.1

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/NEWS.md CHANGED
@@ -1,5 +1,27 @@
1
1
  User-visible changes in SES:
2
2
 
3
+ # v0.18.1 (2022-12-23)
4
+
5
+ - Fixes a bug for SES initialization in a no-unsafe-eval
6
+ Content-Security-Policy.
7
+ - Fixes a bug where reexport of multiple named exports of the same name was
8
+ causing them to be overridden by the last value. Now named exports are
9
+ handled in the same manner as `export *`.
10
+ - Allows Compatment `importHook` implementations to return aliases: module
11
+ descriptors that refer to a module by its specifier in the same or a
12
+ specified compartment, without providing a static module record (module
13
+ source).
14
+
15
+ # v0.18.0 (2022-11-14)
16
+
17
+ - *BREAKING*: Removes support for `globalLexicals`.
18
+ To our knowledge, there are no production uses for `globalLexicals`.
19
+ They currently could leak because `moduleLexicals` and `globalLexicals`
20
+ used the same scope object, so properties of one would leak to the other
21
+ with crafted modules.
22
+ We had an opportunity to plug the leak at the cost of a fifth scope
23
+ in all evaluators, but elected to remove the unnecessary complexity instead.
24
+
3
25
  # v0.17.0 (2022-10-24)
4
26
 
5
27
  - Previous versions of SES would leak the proxy used to isolate evaluated
package/README.md CHANGED
@@ -39,7 +39,7 @@ JavaScript engineering community.
39
39
 
40
40
  _Hardened JavaScript_, Kris Kowal:
41
41
 
42
- [![Primer on Hardened JavaScript](https://img.youtube.com/vi/RoodZSIL-DE/0.jpg)](https://www.youtube.com/watch?v=RoodZSIL-DE)
42
+ [![Primer on Hardened JavaScript](https://img.youtube.com/vi/RZ7bBIU8DRc/0.jpg)](https://www.youtube.com/watch?v=RZ7bBIU8DRc)
43
43
 
44
44
  _Don't add Security, Remove Insecurity_, Mark Miller:
45
45
 
@@ -465,8 +465,7 @@ not a module.
465
465
 
466
466
  ```js
467
467
  const transforms = [addCodeCoverageInstrumentation];
468
- const globalLexicals = { coverage };
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__ = [addMetering];
507
- const globalLexicals = { meter };
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
  ```