@knighted/duel 2.1.5 → 2.1.6
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 +5 -1
- package/dist/esm/duel.js +7 -3
- package/package.json +22 -16
package/dist/cjs/duel.cjs
CHANGED
|
@@ -25,9 +25,13 @@ const duel = async (args) => {
|
|
|
25
25
|
const { projectDir, tsconfig, configPath, modules, dirs, pkg } = ctx;
|
|
26
26
|
const tsc = await (0, find_up_1.findUp)(async (dir) => {
|
|
27
27
|
const tscBin = (0, node_path_1.join)(dir, 'node_modules', '.bin', 'tsc');
|
|
28
|
-
|
|
28
|
+
try {
|
|
29
|
+
await (0, promises_1.access)(tscBin);
|
|
29
30
|
return tscBin;
|
|
30
31
|
}
|
|
32
|
+
catch {
|
|
33
|
+
/* continue */
|
|
34
|
+
}
|
|
31
35
|
}, { cwd: projectDir });
|
|
32
36
|
const runBuild = (project, outDir) => {
|
|
33
37
|
return new Promise((resolve, reject) => {
|
package/dist/esm/duel.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { argv, platform } from 'node:process';
|
|
3
3
|
import { join, dirname, resolve, relative } from 'node:path';
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
|
-
import { writeFile, rm, rename, mkdir, cp } from 'node:fs/promises';
|
|
5
|
+
import { writeFile, rm, rename, mkdir, cp, access } from 'node:fs/promises';
|
|
6
6
|
import { randomBytes } from 'node:crypto';
|
|
7
7
|
import { performance } from 'node:perf_hooks';
|
|
8
8
|
import { glob } from 'glob';
|
|
9
|
-
import { findUp
|
|
9
|
+
import { findUp } from 'find-up';
|
|
10
10
|
import { specifier } from '@knighted/specifier';
|
|
11
11
|
import { transform } from '@knighted/module';
|
|
12
12
|
import { init } from './init.js';
|
|
@@ -22,9 +22,13 @@ const duel = async (args) => {
|
|
|
22
22
|
const { projectDir, tsconfig, configPath, modules, dirs, pkg } = ctx;
|
|
23
23
|
const tsc = await findUp(async (dir) => {
|
|
24
24
|
const tscBin = join(dir, 'node_modules', '.bin', 'tsc');
|
|
25
|
-
|
|
25
|
+
try {
|
|
26
|
+
await access(tscBin);
|
|
26
27
|
return tscBin;
|
|
27
28
|
}
|
|
29
|
+
catch {
|
|
30
|
+
/* continue */
|
|
31
|
+
}
|
|
28
32
|
}, { cwd: projectDir });
|
|
29
33
|
const runBuild = (project, outDir) => {
|
|
30
34
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knighted/duel",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "TypeScript dual packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/duel.js",
|
|
@@ -55,29 +55,35 @@
|
|
|
55
55
|
"url": "https://github.com/knightedcodemonkey/duel/issues"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"typescript": ">=5.5.0
|
|
58
|
+
"typescript": ">=5.5.0 <6",
|
|
59
|
+
"typescript-next": "npm:typescript@next"
|
|
60
|
+
},
|
|
61
|
+
"peerDependenciesMeta": {
|
|
62
|
+
"typescript-next": {
|
|
63
|
+
"optional": true
|
|
64
|
+
}
|
|
59
65
|
},
|
|
60
66
|
"devDependencies": {
|
|
61
|
-
"@eslint/js": "^9.
|
|
67
|
+
"@eslint/js": "^9.39.1",
|
|
62
68
|
"@tsconfig/recommended": "^1.0.10",
|
|
63
|
-
"@types/node": "^24.1
|
|
69
|
+
"@types/node": "^24.10.1",
|
|
64
70
|
"c8": "^10.1.3",
|
|
65
|
-
"eslint": "^9.
|
|
66
|
-
"eslint-plugin-n": "^17.
|
|
71
|
+
"eslint": "^9.39.1",
|
|
72
|
+
"eslint-plugin-n": "^17.23.1",
|
|
67
73
|
"globals": "^16.3.0",
|
|
68
|
-
"node-module-type": "^1.0.
|
|
74
|
+
"node-module-type": "^1.0.4",
|
|
69
75
|
"prettier": "^3.6.2",
|
|
70
|
-
"tsx": "^4.20.
|
|
71
|
-
"typescript": "^5.
|
|
72
|
-
"vite": "^7.
|
|
76
|
+
"tsx": "^4.20.6",
|
|
77
|
+
"typescript": "^5.9.3",
|
|
78
|
+
"vite": "^7.2.4"
|
|
73
79
|
},
|
|
74
80
|
"dependencies": {
|
|
75
|
-
"@knighted/module": "^1.0.0-alpha.
|
|
76
|
-
"@knighted/specifier": "^2.0.
|
|
77
|
-
"find-up": "^
|
|
78
|
-
"get-tsconfig": "^4.
|
|
79
|
-
"glob": "^
|
|
80
|
-
"read-package-up": "^
|
|
81
|
+
"@knighted/module": "^1.0.0-alpha.10",
|
|
82
|
+
"@knighted/specifier": "^2.0.9",
|
|
83
|
+
"find-up": "^8.0.0",
|
|
84
|
+
"get-tsconfig": "^4.13.0",
|
|
85
|
+
"glob": "^13.0.0",
|
|
86
|
+
"read-package-up": "^12.0.0"
|
|
81
87
|
},
|
|
82
88
|
"prettier": {
|
|
83
89
|
"arrowParens": "avoid",
|