@endo/module-source 1.4.0 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endo/module-source",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Ponyfill for the SES ModuleSource and module-to-program transformer",
5
5
  "keywords": [
6
6
  "ses",
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "scripts": {
33
33
  "build": "exit 0",
34
- "prepack": "tsc --build tsconfig.build.json",
35
- "postpack": "git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\"",
34
+ "prepack": "git clean -fX -e node_modules/ && tsc --build tsconfig.build.json",
35
+ "postpack": "git clean -fX -e node_modules/",
36
36
  "cover": "c8 ava --config test/_ava-ses.config.js",
37
37
  "lint": "yarn lint:types && yarn lint:eslint",
38
38
  "lint:types": "tsc",
@@ -47,16 +47,16 @@
47
47
  "@babel/parser": "~7.28.3",
48
48
  "@babel/traverse": "~7.28.3",
49
49
  "@babel/types": "~7.28.2",
50
- "@endo/harden": "^1.1.0",
51
- "ses": "^1.15.0"
50
+ "ses": "^2.0.0"
52
51
  },
53
52
  "devDependencies": {
53
+ "@endo/ses-ava": "^1.4.1",
54
54
  "ava": "catalog:dev",
55
55
  "babel-eslint": "^10.1.0",
56
56
  "benchmark": "^2.1.4",
57
57
  "c8": "catalog:dev",
58
58
  "eslint": "catalog:dev",
59
- "typescript": "~5.9.2"
59
+ "typescript": "catalog:dev"
60
60
  },
61
61
  "files": [
62
62
  "./*.d.ts",
@@ -76,6 +76,16 @@
76
76
  "extends": [
77
77
  "plugin:@endo/internal"
78
78
  ],
79
+ "rules": {
80
+ "import/no-unresolved": [
81
+ "error",
82
+ {
83
+ "ignore": [
84
+ "^@endo/module-source(?:/.*)?$"
85
+ ]
86
+ }
87
+ ]
88
+ },
79
89
  "ignorePatterns": [
80
90
  "test/fixtures/"
81
91
  ]
@@ -88,5 +98,5 @@
88
98
  "typeCoverage": {
89
99
  "atLeast": 40.33
90
100
  },
91
- "gitHead": "f91329e8616a19f131d009356a5f11ef11c839cc"
101
+ "gitHead": "e74ed050e9d1122d692b00ee14971299c6afbf30"
92
102
  }
package/shim.js CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  // We are using a reflexive import to make sure we pass through the conditional
4
4
  // export in package.json.
5
- // Eslint does not yet seem to have a carve-out for package-reflexive imports.
6
- // eslint-disable-next-line import/no-extraneous-dependencies
7
5
  import { ModuleSource } from '@endo/module-source';
8
6
 
9
7
  Object.defineProperty(globalThis, 'ModuleSource', {
@@ -12,10 +12,10 @@
12
12
  */
13
13
  /**
14
14
  * @typedef {object} Options
15
- * @property {string} [sourceUrl]
16
- * @property {string} [sourceMap]
17
- * @property {string} [sourceMapUrl]
18
- * @property {SourceMapHook} [sourceMapHook]
15
+ * @property {string | undefined} [sourceUrl]
16
+ * @property {string | undefined} [sourceMap]
17
+ * @property {string | undefined} [sourceMapUrl]
18
+ * @property {SourceMapHook | undefined} [sourceMapHook]
19
19
  */
20
20
  /**
21
21
  * ModuleSource captures the effort of parsing and analyzing module text
@@ -41,10 +41,10 @@ export class ModuleSource {
41
41
  */
42
42
  /**
43
43
  * @typedef {object} Options
44
- * @property {string} [sourceUrl]
45
- * @property {string} [sourceMap]
46
- * @property {string} [sourceMapUrl]
47
- * @property {SourceMapHook} [sourceMapHook]
44
+ * @property {string | undefined} [sourceUrl]
45
+ * @property {string | undefined} [sourceMap]
46
+ * @property {string | undefined} [sourceMapUrl]
47
+ * @property {SourceMapHook | undefined} [sourceMapHook]
48
48
  */
49
49
  /**
50
50
  * ModuleSource captures the effort of parsing and analyzing module text
@@ -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,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"}
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;;gBAKjB,MAAM,GAAG,SAAS;gBAClB,MAAM,GAAG,SAAS;mBAClB,MAAM,GAAG,SAAS;oBAClB,aAAa,GAAG,SAAS"}
@@ -49,10 +49,10 @@ const analyzeModule = makeModuleAnalyzer();
49
49
 
50
50
  /**
51
51
  * @typedef {object} Options
52
- * @property {string} [sourceUrl]
53
- * @property {string} [sourceMap]
54
- * @property {string} [sourceMapUrl]
55
- * @property {SourceMapHook} [sourceMapHook]
52
+ * @property {string | undefined} [sourceUrl]
53
+ * @property {string | undefined} [sourceMap]
54
+ * @property {string | undefined} [sourceMapUrl]
55
+ * @property {SourceMapHook | undefined} [sourceMapHook]
56
56
  */
57
57
 
58
58
  // XXX implements import('ses').PrecompiledModuleSource but adding