You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@endo/module-source

Package Overview
Dependencies
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@endo/module-source - npm Package Compare versions

Comparing version

to
1.1.0

index.d.ts.map

20

package.json
{
"name": "@endo/module-source",
"version": "1.0.2",
"version": "1.1.0",
"description": "Ponyfill for the SES ModuleSource and module-to-program transformer",

@@ -26,2 +26,3 @@ "keywords": [

".": "./index.js",
"./shim.js": "./shim.js",
"./package.json": "./package.json"

@@ -32,3 +33,3 @@ },

"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
"cover": "c8 ava",

@@ -46,3 +47,3 @@ "lint": "yarn lint:types && yarn lint:eslint",

"@babel/types": "^7.24.0",
"ses": "^1.8.0"
"ses": "^1.9.0"
},

@@ -60,10 +61,14 @@ "devDependencies": {

"prettier": "^3.2.5",
"typescript": "~5.6.1-rc"
"typescript": "~5.6.2"
},
"files": [
"./*.d.ts",
"./*.js",
"./*.map",
"LICENSE*",
"SECURITY*",
"dist",
"lib",
"src",
"*.js",
"*.ts"
"tools"
],

@@ -80,3 +85,2 @@ "publishConfig": {

"files": [
"test/**/test-*.*",
"test/**/*.test.*"

@@ -89,3 +93,3 @@ ],

},
"gitHead": "cb060b7e22c92cc951fb03d86cdbceeae82fec34"
"gitHead": "bbf20fae6726f7d26456714b8852572787d34e05"
}

18

src/hidden.d.ts

@@ -1,11 +0,11 @@

export const HIDDEN_PREFIX: "$h‍_";
export const HIDDEN_CONST_VAR_PREFIX: "$c‍_";
export const HIDDEN_A: "$h‍_a";
export const HIDDEN_IMPORT: "$h‍_import";
export const HIDDEN_IMPORT_SELF: "$h‍_importSelf";
export const HIDDEN_IMPORTS: "$h‍_imports";
export const HIDDEN_ONCE: "$h‍_once";
export const HIDDEN_META: "$h‍____meta";
export const HIDDEN_LIVE: "$h‍_live";
export const HIDDEN_PREFIX: "$h͏_";
export const HIDDEN_CONST_VAR_PREFIX: "$c͏_";
export const HIDDEN_A: "$h͏_a";
export const HIDDEN_IMPORT: "$h͏_import";
export const HIDDEN_IMPORT_SELF: "$h͏_importSelf";
export const HIDDEN_IMPORTS: "$h͏_imports";
export const HIDDEN_ONCE: "$h͏_once";
export const HIDDEN_META: "$h͏____meta";
export const HIDDEN_LIVE: "$h͏_live";
export const HIDDEN_IDENTIFIERS: string[];
//# sourceMappingURL=hidden.d.ts.map

@@ -1,3 +0,3 @@

export const HIDDEN_PREFIX = '$h\u200d_';
export const HIDDEN_CONST_VAR_PREFIX = '$c\u200d_';
export const HIDDEN_PREFIX = '$h\u034f_';
export const HIDDEN_CONST_VAR_PREFIX = '$c\u034f_';
export const HIDDEN_A = `${HIDDEN_PREFIX}a`;

@@ -4,0 +4,0 @@ export const HIDDEN_IMPORT = `${HIDDEN_PREFIX}import`;

@@ -103,1 +103,30 @@ /* eslint no-underscore-dangle: ["off"] */

}
// AbstractModuleSource
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
//
// We are attempting to ensure that a JavaScript shim (particularly ses) is
// forward-compatible as the engine evolves beneath it, with or without this
// ModuleSource shim, and with our without a native AbstractModuleSource which
// remains undecided.
// Lockdown does not gracefully handle the presence of an unexpected prototype,
// but can tolerate the absence of an expected prototype.
// So, we are providing AbstractModuleSource since we can better tolerate the
// various uncertain futures.
//
// WebAssembly and ModuleSource are both in motion.
// The Source Phase Imports proposal implies an additional AbstractModuleSource
// layer above the existing WebAssembly.Module that would be shared by
// the JavaScript ModuleSource prototype chains.
// At time of writing, no version of WebAssembly provides the shared base
// class, and the ModuleSource *shim* gains nothing from sharing one when that
// prototype when it comes into being.
// So, we do not attempt to entangle our AbstractModuleSource with
// WebAssembly.Module.
function AbstractModuleSource() {
// no-op, safe to super()
}
Object.setPrototypeOf(ModuleSource, AbstractModuleSource);
Object.setPrototypeOf(ModuleSource.prototype, AbstractModuleSource.prototype);