@knighted/module 1.0.0-rc.1 → 1.0.0-rc.2
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/README.md +4 -1
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ By default `@knighted/module` transforms the one-to-one [differences between ES
|
|
|
22
22
|
|
|
23
23
|
## Requirements
|
|
24
24
|
|
|
25
|
-
- Node
|
|
25
|
+
- Node 22 or 24 (tested on 22.21.1 and 24.11.1)
|
|
26
26
|
|
|
27
27
|
## Install
|
|
28
28
|
|
|
@@ -137,6 +137,9 @@ Behavior notes (defaults in parentheses)
|
|
|
137
137
|
|
|
138
138
|
See [docs/esm-to-cjs.md](docs/esm-to-cjs.md) for deeper notes on live bindings, interop helpers, top-level await behavior, and `import.meta.main` handling. For CommonJS to ESM lowering details, read [docs/cjs-to-esm.md](docs/cjs-to-esm.md).
|
|
139
139
|
|
|
140
|
+
> [!NOTE]
|
|
141
|
+
> Known limitations: `with` and unshadowed `eval` are rejected when raising CJS to ESM because the rewrite would be unsound; bare specifiers are not rewritten—only relative specifiers participate in `rewriteSpecifier`.
|
|
142
|
+
|
|
140
143
|
## Roadmap
|
|
141
144
|
|
|
142
145
|
- Emit source maps and clearer diagnostics for transform choices.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knighted/module",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"description": "Transforms differences between ES modules and CommonJS.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/module.js",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
21
|
"imports": {
|
|
22
|
-
"#parse": "./
|
|
23
|
-
"#format": "./
|
|
24
|
-
"#utils/*.js": "./
|
|
25
|
-
"#walk": "./
|
|
26
|
-
"#helpers/*.js": "./
|
|
27
|
-
"#formatters/*.js": "./
|
|
22
|
+
"#parse": "./dist/parse.js",
|
|
23
|
+
"#format": "./dist/format.js",
|
|
24
|
+
"#utils/*.js": "./dist/utils/*.js",
|
|
25
|
+
"#walk": "./dist/walk.js",
|
|
26
|
+
"#helpers/*.js": "./dist/helpers/*.js",
|
|
27
|
+
"#formatters/*.js": "./dist/formatters/*.js"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": ">=22.21.1"
|
|
30
|
+
"node": ">=22.21.1 <23 || >=24 <25"
|
|
31
31
|
},
|
|
32
32
|
"engineStrict": true,
|
|
33
33
|
"scripts": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"build:types": "tsc --emitDeclarationOnly",
|
|
41
41
|
"build:dual": "babel-dual-package src --extensions .ts",
|
|
42
42
|
"build": "npm run build:types && npm run build:dual",
|
|
43
|
-
"prepack": "npm run build"
|
|
43
|
+
"prepack": "npm run build && node scripts/setImportsToDist.js",
|
|
44
|
+
"postpack": "node scripts/restoreImportsToSrc.js"
|
|
44
45
|
},
|
|
45
46
|
"keywords": [
|
|
46
47
|
"transform",
|