🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ses

Package Overview
Dependencies
Maintainers
5
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ses - npm Package Compare versions

Comparing version

to
0.15.17

17

CHANGELOG.md

@@ -6,2 +6,19 @@ # Change Log

### [0.15.17](https://github.com/endojs/endo/compare/ses@0.15.16...ses@0.15.17) (2022-06-28)
### Features
* **compartment-mapper:** implement passing values in import.meta.url ([d6294f6](https://github.com/endojs/endo/commit/d6294f6832f978eaa7af94fee4496d76bd35a927))
* add the foundations for support of import.meta ([36f6449](https://github.com/endojs/endo/commit/36f644998c21f6333268707555b97938ff0fff08))
* call importMetaHook on instantiation if import.meta uttered by module ([23e8c40](https://github.com/endojs/endo/commit/23e8c405e0be823c728f8af1a6db9607e21f2f74))
### Bug Fixes
* rename meta to importMeta, fix detection to detect import.meta not import.meta.something ([c61a862](https://github.com/endojs/endo/commit/c61a862c9f4354f0e6d86d8c8efaa826840a6efd))
* tolerate empty func.prototype ([#1221](https://github.com/endojs/endo/issues/1221)) ([4da7742](https://github.com/endojs/endo/commit/4da7742e8017d07094ed9b9336a85b6a4d3ee7b6))
### [0.15.16](https://github.com/endojs/endo/compare/ses@0.15.15...ses@0.15.16) (2022-06-11)

@@ -8,0 +25,0 @@

1

index.d.ts

@@ -70,2 +70,3 @@ /**

specifier: string;
importMeta?: any;
}

@@ -72,0 +73,0 @@

12

package.json
{
"name": "ses",
"version": "0.15.16",
"version": "0.15.17",
"description": "Hardened JavaScript for Fearless Cooperation",

@@ -62,6 +62,6 @@ "keywords": [

"devDependencies": {
"@endo/compartment-mapper": "^0.7.6",
"@endo/eslint-config": "^0.5.0",
"@endo/static-module-record": "^0.7.5",
"@endo/test262-runner": "^0.1.27",
"@endo/compartment-mapper": "^0.7.7",
"@endo/eslint-config": "^0.5.1",
"@endo/static-module-record": "^0.7.6",
"@endo/test262-runner": "^0.1.28",
"ava": "^3.12.1",

@@ -183,3 +183,3 @@ "babel-eslint": "^10.0.3",

},
"gitHead": "7be9306df5e5eae280134cbbaf0d3886b4e51536"
"gitHead": "a311acb02115271fbda6953734d0b4f52aa85892"
}

@@ -415,3 +415,3 @@ # SES

The name implies a future record type that supports top-level await.
- An initialization record has the properties `imports`, `liveVar`, and
- An initialization record has the properties `imports`, `liveVar`, `importMeta` and
`onceVar`.

@@ -423,2 +423,5 @@ - `imports` is a function that accepts a map from partial import

to receive updates for the value exported by the other module.
- `importMeta` is a null-prototype object with keys transferred from `importMeta`
property in the envelope returned by importHook and/or mutated by
calling `importMetaHook(moduleSpecifier, importMeta)`
- `liveVar` is a record that maps names exported by this module

@@ -425,0 +428,0 @@ to a function that may be called to initialize or update

@@ -218,2 +218,3 @@ // @ts-check

moduleMapHook,
importMetaHook,
} = options;

@@ -320,2 +321,3 @@ const globalTransforms = [...transforms, ...__shimTransforms__];

moduleMapHook,
importMetaHook,
moduleRecords,

@@ -322,0 +324,0 @@ __shimTransforms__,

@@ -21,2 +21,3 @@ import { assert } from './error/assert.js';

reflectHas,
assign,
} from './commons.js';

@@ -126,4 +127,9 @@ import { compartmentEvaluate } from './compartment-evaluate.js';

) => {
const { compartment, moduleSpecifier, staticModuleRecord } = moduleRecord;
const {
compartment,
moduleSpecifier,
staticModuleRecord,
importMeta: moduleRecordMeta,
} = moduleRecord;
const {
reexports: exportAlls = [],

@@ -133,2 +139,3 @@ __syncModuleProgram__: functorSource,

__liveExportMap__: liveExportMap = {},
__needsImportMeta__: needsImportMeta = false,
} = staticModuleRecord;

@@ -138,3 +145,3 @@

const { __shimTransforms__ } = compartmentFields;
const { __shimTransforms__, importMetaHook } = compartmentFields;

@@ -165,2 +172,10 @@ const { exportsProxy, proxiedExports, activate } = getDeferredExports(

const importMeta = create(null);
if (moduleRecordMeta) {
assign(importMeta, moduleRecordMeta);
}
if (needsImportMeta && importMetaHook) {
importMetaHook(moduleSpecifier, importMeta);
}
// {_localName_: [{get, set, notify}]} used to merge all the export updaters.

@@ -446,2 +461,3 @@ const localGetNotify = create(null);

liveVar: freeze(liveVar),
importMeta,
}),

@@ -448,0 +464,0 @@ );

@@ -66,2 +66,3 @@ // For brevity, in this file, as in module-link.js, the term "moduleRecord"

errors,
importMeta,
) => {

@@ -84,2 +85,3 @@ const { resolveHook, moduleRecords } = weakmapGet(

resolvedImports,
importMeta,
});

@@ -186,2 +188,3 @@

record: aliasModuleRecord,
importMeta,
} = staticModuleRecord;

@@ -198,2 +201,3 @@

errors,
importMeta,
);

@@ -200,0 +204,0 @@ mapSet(moduleRecords, moduleSpecifier, aliasRecord);

@@ -96,4 +96,4 @@ // @ts-check

*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/

@@ -139,4 +139,4 @@ export const evadeHtmlCommentTest = src => {

*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/

@@ -167,4 +167,4 @@ export const rejectImportExpressions = src => {

*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/

@@ -212,4 +212,4 @@ export const evadeImportExpressionTest = src => {

*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/

@@ -216,0 +216,0 @@ export const rejectSomeDirectEvalExpressions = src => {

@@ -288,2 +288,11 @@ // Copyright (C) 2011 Google Inc.

if (prop in obj) {
if (typeof obj === 'function' && prop === 'prototype') {
obj.prototype = undefined;
if (obj.prototype === undefined) {
// eslint-disable-next-line @endo/no-polymorphic-call
console.warn(`Tolerating undeletable ${subPath} === undefined`);
// eslint-disable-next-line no-continue
continue;
}
}
// eslint-disable-next-line @endo/no-polymorphic-call

@@ -290,0 +299,0 @@ console.error(`failed to delete ${subPath}`, err);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display