@knighted/duel 2.1.1 → 2.1.3

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/dist/cjs/duel.cjs CHANGED
@@ -167,7 +167,9 @@ const duel = async (args) => {
167
167
  }
168
168
  };
169
169
  exports.duel = duel;
170
- const realFileUrlArgv1 = await (0, util_js_1.getRealPathAsFileUrl)(node_process_1.argv[1]);
171
- if (import.meta.url === realFileUrlArgv1) {
172
- await duel();
173
- }
170
+ (async () => {
171
+ const realFileUrlArgv1 = await (0, util_js_1.getRealPathAsFileUrl)(node_process_1.argv[1] ?? '');
172
+ if (require("node:url").pathToFileURL(__filename).toString() === realFileUrlArgv1) {
173
+ await duel();
174
+ }
175
+ })();
package/dist/esm/duel.js CHANGED
@@ -163,8 +163,10 @@ const duel = async (args) => {
163
163
  }
164
164
  }
165
165
  };
166
- const realFileUrlArgv1 = await getRealPathAsFileUrl(argv[1]);
167
- if (import.meta.url === realFileUrlArgv1) {
168
- await duel();
169
- }
166
+ (async () => {
167
+ const realFileUrlArgv1 = await getRealPathAsFileUrl(argv[1] ?? '');
168
+ if (import.meta.url === realFileUrlArgv1) {
169
+ await duel();
170
+ }
171
+ })();
170
172
  export { duel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knighted/duel",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "TypeScript dual packages.",
5
5
  "type": "module",
6
6
  "main": "dist/esm/duel.js",
@@ -23,7 +23,7 @@
23
23
  "test:integration": "node --test --test-reporter=spec test/integration.js",
24
24
  "test:monorepos": "node --test --test-reporter=spec test/monorepos.js",
25
25
  "test": "c8 --reporter=text --reporter=text-summary --reporter=lcov node --test --test-reporter=spec test/integration.js test/monorepos.js",
26
- "build": "node src/duel.js --dirs",
26
+ "build": "node src/duel.js --dirs --modules",
27
27
  "prepack": "npm run build"
28
28
  },
29
29
  "keywords": [
@@ -63,14 +63,15 @@
63
63
  "eslint": "^9.16.0",
64
64
  "eslint-plugin-n": "^17.15.0",
65
65
  "globals": "^15.6.0",
66
+ "node-module-type": "^1.0.2",
66
67
  "prettier": "^3.4.2",
67
68
  "tsx": "^4.19.3",
68
69
  "typescript": "^5.8.2",
69
- "vite": "^6.2.4"
70
+ "vite": "^6.2.6"
70
71
  },
71
72
  "dependencies": {
72
- "@knighted/module": "^1.0.0-alpha.5",
73
- "@knighted/specifier": "^2.0.0",
73
+ "@knighted/module": "^1.0.0-alpha.7",
74
+ "@knighted/specifier": "^2.0.3",
74
75
  "find-up": "^6.3.0",
75
76
  "get-tsconfig": "^4.10.0",
76
77
  "glob": "^11.0.1",