@endo/module-source 1.3.3 → 1.4.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@endo/module-source",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Ponyfill for the SES ModuleSource and module-to-program transformer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ses",
|
|
@@ -33,33 +33,30 @@
|
|
|
33
33
|
"build": "exit 0",
|
|
34
34
|
"prepack": "tsc --build tsconfig.build.json",
|
|
35
35
|
"postpack": "git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\"",
|
|
36
|
-
"cover": "c8 ava",
|
|
36
|
+
"cover": "c8 ava --config test/_ava-ses.config.js",
|
|
37
37
|
"lint": "yarn lint:types && yarn lint:eslint",
|
|
38
38
|
"lint:types": "tsc",
|
|
39
39
|
"lint:eslint": "eslint .",
|
|
40
40
|
"lint-fix": "eslint --fix .",
|
|
41
|
-
"test": "ava",
|
|
41
|
+
"test": "yarn run -T ses-ava",
|
|
42
|
+
"test:c8": "c8 ${C8_OPTIONS:-} yarn run -T ses-ava",
|
|
42
43
|
"test:xs": "node scripts/generate-test-xs.js && xst tmp/test-xs.js"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@babel/generator": "^7.
|
|
46
|
-
"@babel/parser": "~7.
|
|
47
|
-
"@babel/traverse": "~7.
|
|
48
|
-
"@babel/types": "~7.
|
|
49
|
-
"
|
|
46
|
+
"@babel/generator": "^7.28.3",
|
|
47
|
+
"@babel/parser": "~7.28.3",
|
|
48
|
+
"@babel/traverse": "~7.28.3",
|
|
49
|
+
"@babel/types": "~7.28.2",
|
|
50
|
+
"@endo/harden": "^1.1.0",
|
|
51
|
+
"ses": "^1.15.0"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
|
-
"ava": "
|
|
54
|
+
"ava": "catalog:dev",
|
|
53
55
|
"babel-eslint": "^10.1.0",
|
|
54
56
|
"benchmark": "^2.1.4",
|
|
55
|
-
"c8": "
|
|
56
|
-
"eslint": "
|
|
57
|
-
"
|
|
58
|
-
"eslint-config-prettier": "^9.1.0",
|
|
59
|
-
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
60
|
-
"eslint-plugin-import": "^2.31.0",
|
|
61
|
-
"prettier": "^3.5.3",
|
|
62
|
-
"typescript": "~5.8.3"
|
|
57
|
+
"c8": "catalog:dev",
|
|
58
|
+
"eslint": "catalog:dev",
|
|
59
|
+
"typescript": "~5.9.2"
|
|
63
60
|
},
|
|
64
61
|
"files": [
|
|
65
62
|
"./*.d.ts",
|
|
@@ -83,14 +80,13 @@
|
|
|
83
80
|
"test/fixtures/"
|
|
84
81
|
]
|
|
85
82
|
},
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"timeout": "2m"
|
|
83
|
+
"sesAvaConfigs": {
|
|
84
|
+
"lockdown": "../../ava-endo-lockdown.config.mjs",
|
|
85
|
+
"unsafe": "../../ava-endo-lockdown-unsafe.config.mjs",
|
|
86
|
+
"ses": "../../ava-ses-shims-only.config.mjs"
|
|
91
87
|
},
|
|
92
88
|
"typeCoverage": {
|
|
93
89
|
"atLeast": 40.33
|
|
94
90
|
},
|
|
95
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "f91329e8616a19f131d009356a5f11ef11c839cc"
|
|
96
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-source.d.ts","sourceRoot":"","sources":["module-source.js"],"names":[],"mappings":"AAmCA;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AAKH;;;;;;;GAOG;AACH,qCAHW,MAAM,SACN,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"module-source.d.ts","sourceRoot":"","sources":["module-source.js"],"names":[],"mappings":"AAmCA;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AAKH;;;;;;;GAOG;AACH,qCAHW,MAAM,SACN,MAAM,GAAG,OAAO,QAmD1B;;IAlFD;;;;;;OAMG;IAEH;;;;OAIG;IAEH;;;;;;OAMG;IAKH;;;;;;;OAOG;IACH,oBAHW,MAAM,SACN,MAAM,GAAG,OAAO,EAmD1B;IA9BC,kBAAyC;IACzC,eAQC;IACD,mBAA+C;IAC/C,8BAA0C;IAa1C,uBAA8C;IAC9C,qBAA0C;IAC1C,wBAAgD;IAChD,yBAAkC;IAClC,6BAA0C;;;iBA9E9B,MAAM;YACN,MAAM;cACN,MAAM;YACN,MAAM;;wCAKT,MAAM,WACN,oBAAoB"}
|
package/src/module-source.js
CHANGED
|
@@ -90,14 +90,28 @@ export function ModuleSource(source, opts = {}) {
|
|
|
90
90
|
[
|
|
91
91
|
...keys(liveExportMap),
|
|
92
92
|
...keys(fixedExportMap),
|
|
93
|
-
...values(reexportMap)
|
|
93
|
+
...values(reexportMap)
|
|
94
|
+
.flat()
|
|
95
|
+
.map(([_, exportName]) => exportName),
|
|
94
96
|
].sort(),
|
|
95
97
|
);
|
|
96
98
|
this.reexports = freeze([...exportAlls].sort());
|
|
97
99
|
this.__syncModuleProgram__ = functorSource;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
for (const entry of values(liveExportMap)) {
|
|
101
|
+
freeze(entry);
|
|
102
|
+
}
|
|
103
|
+
for (const entry of values(fixedExportMap)) {
|
|
104
|
+
freeze(entry);
|
|
105
|
+
}
|
|
106
|
+
for (const reexports of values(reexportMap)) {
|
|
107
|
+
for (const pair of reexports) {
|
|
108
|
+
freeze(pair);
|
|
109
|
+
}
|
|
110
|
+
freeze(reexports);
|
|
111
|
+
}
|
|
112
|
+
this.__liveExportMap__ = freeze(liveExportMap);
|
|
113
|
+
this.__reexportMap__ = freeze(reexportMap);
|
|
114
|
+
this.__fixedExportMap__ = freeze(fixedExportMap);
|
|
101
115
|
this.__needsImport__ = needsImport;
|
|
102
116
|
this.__needsImportMeta__ = needsImportMeta;
|
|
103
117
|
freeze(this);
|
|
@@ -131,3 +145,8 @@ function AbstractModuleSource() {
|
|
|
131
145
|
|
|
132
146
|
Object.setPrototypeOf(ModuleSource, AbstractModuleSource);
|
|
133
147
|
Object.setPrototypeOf(ModuleSource.prototype, AbstractModuleSource.prototype);
|
|
148
|
+
|
|
149
|
+
freeze(AbstractModuleSource);
|
|
150
|
+
freeze(AbstractModuleSource.prototype);
|
|
151
|
+
freeze(ModuleSource.prototype);
|
|
152
|
+
freeze(ModuleSource);
|
package/src/transform-analyze.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function makeTransformSource(makeModulePlugins: any, babel?: null): (source: any, sourceOptions?: {}) =>
|
|
1
|
+
export function makeTransformSource(makeModulePlugins: any, babel?: null): (source: any, sourceOptions?: {}) => any;
|
|
2
2
|
//# sourceMappingURL=transform-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-source.d.ts","sourceRoot":"","sources":["transform-source.js"],"names":[],"mappings":"AAeO,
|
|
1
|
+
{"version":3,"file":"transform-source.d.ts","sourceRoot":"","sources":["transform-source.js"],"names":[],"mappings":"AAeO,oHAmDN"}
|