@knighted/module 1.5.0 → 1.5.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/README.md +4 -4
- package/package.json +6 -13
package/README.md
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
[](https://codecov.io/gh/knightedcodemonkey/module)
|
|
5
5
|
[](https://www.npmjs.com/package/@knighted/module)
|
|
6
6
|
|
|
7
|
-
Node.js utility for transforming a JavaScript or TypeScript file from an ES module
|
|
7
|
+
Node.js utility for transforming a JavaScript or TypeScript file from CommonJS to an ES module, or vice versa.
|
|
8
8
|
|
|
9
|
-
- ES module ➡️ CommonJS
|
|
10
9
|
- CommonJS ➡️ ES module
|
|
10
|
+
- ES module ➡️ CommonJS
|
|
11
11
|
|
|
12
12
|
Highlights
|
|
13
13
|
|
|
14
|
-
-
|
|
14
|
+
- CJS ➡️ ESM and ESM ➡️ CJS with one function call.
|
|
15
15
|
- Defaults to safe CommonJS output: strict live bindings, import.meta shims, and specifier preservation.
|
|
16
16
|
- Configurable lowering modes: full syntax transforms or globals-only.
|
|
17
17
|
- Specifier tools: add extensions, add directory indexes, or map with a custom callback.
|
|
@@ -25,7 +25,7 @@ By default `@knighted/module` transforms the one-to-one [differences between ES
|
|
|
25
25
|
|
|
26
26
|
## Requirements
|
|
27
27
|
|
|
28
|
-
- Node 22
|
|
28
|
+
- Node 22.21.1+ or 24+
|
|
29
29
|
|
|
30
30
|
## Install
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knighted/module",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Bidirectional transform for ES modules and CommonJS.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/module.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"build:types": "tsc --emitDeclarationOnly",
|
|
39
39
|
"build:dual": "babel-dual-package src --extensions .ts",
|
|
40
40
|
"build": "npm run build:types && npm run build:dual",
|
|
41
|
-
"cycles": "
|
|
41
|
+
"cycles": "oxlint --import-plugin --tsconfig tsconfig.json -A all -D import/no-cycle src test",
|
|
42
42
|
"prepack": "npm run build"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
@@ -64,29 +64,22 @@
|
|
|
64
64
|
"url": "https://github.com/knightedcodemonkey/module/issues"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@knighted/dump": "^1.0.3",
|
|
68
67
|
"@types/node": "^22.19.3",
|
|
69
68
|
"babel-dual-package": "^1.2.3",
|
|
70
|
-
"c8": "^
|
|
69
|
+
"c8": "^11.0.0",
|
|
71
70
|
"husky": "^9.1.7",
|
|
72
71
|
"lint-staged": "^16.2.7",
|
|
73
|
-
"
|
|
74
|
-
"oxlint": "^1.35.0",
|
|
72
|
+
"oxlint": "^1.51.0",
|
|
75
73
|
"prettier": "^3.7.4",
|
|
76
74
|
"tsx": "^4.21.0",
|
|
77
75
|
"typescript": "^5.9.3"
|
|
78
76
|
},
|
|
79
77
|
"dependencies": {
|
|
80
|
-
"glob": "^13.0.
|
|
78
|
+
"glob": "^13.0.6",
|
|
81
79
|
"magic-string": "^0.30.21",
|
|
82
|
-
"oxc-parser": "^0.
|
|
80
|
+
"oxc-parser": "^0.116.0",
|
|
83
81
|
"periscopic": "^4.0.2"
|
|
84
82
|
},
|
|
85
|
-
"overrides": {
|
|
86
|
-
"module-lookup-amd": {
|
|
87
|
-
"glob": "^9.0.0"
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
83
|
"prettier": {
|
|
91
84
|
"arrowParens": "avoid",
|
|
92
85
|
"printWidth": 90,
|