@knighted/duel 4.0.2 → 4.1.0

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 CHANGED
@@ -19,7 +19,7 @@ Tool for building a Node.js [dual package](https://nodejs.org/api/packages.html#
19
19
 
20
20
  ## Requirements
21
21
 
22
- - Node >= 22.21.1 (<23) or >= 24 (<25)
22
+ - Node >= 22.21.1 (<23), >= 24 (<25), or >= 26 (<27)
23
23
 
24
24
  ## Example
25
25
 
@@ -1,17 +1,17 @@
1
1
  export function init(args: any): Promise<false | {
2
2
  pkg: import("read-package-up", { with: { "resolution-mode": "import" } }).NormalizedReadResult;
3
- dirs: boolean;
3
+ dirs: any;
4
4
  modules: boolean;
5
5
  transformSyntax: boolean;
6
- exports: string | undefined;
7
- exportsConfig: string | undefined;
8
- exportsValidate: boolean;
9
- rewritePolicy: string;
10
- detectDualPackageHazard: string;
11
- dualPackageHazardAllowlist: string[];
12
- dualPackageHazardScope: string;
13
- verbose: boolean;
14
- copyMode: string;
6
+ exports: any;
7
+ exportsConfig: any;
8
+ exportsValidate: any;
9
+ rewritePolicy: any;
10
+ detectDualPackageHazard: any;
11
+ dualPackageHazardAllowlist: any;
12
+ dualPackageHazardScope: any;
13
+ verbose: any;
14
+ copyMode: any;
15
15
  tsconfig: {
16
16
  compilerOptions?: import("get-tsconfig").TsConfigJson.CompilerOptions | undefined;
17
17
  watchOptions?: import("get-tsconfig").TsConfigJson.WatchOptions | undefined;
@@ -22,6 +22,6 @@ export function init(args: any): Promise<false | {
22
22
  include?: string[] | undefined;
23
23
  references?: import("get-tsconfig").TsConfigJson.References[] | undefined;
24
24
  };
25
- projectDir: string;
26
- configPath: string;
25
+ projectDir: any;
26
+ configPath: any;
27
27
  }>;
@@ -2,8 +2,8 @@ export function log(msg?: string, level?: string, opts?: {}): void;
2
2
  export function logError(msg: any): void;
3
3
  export function logSuccess(msg: any): void;
4
4
  export function logWarn(msg: any): void;
5
- export function getRealPathAsFileUrl(path: any): Promise<string>;
6
- export function getCompileFiles(tscPath: any, options?: {}): string[];
5
+ export function getRealPathAsFileUrl(path: any): Promise<any>;
6
+ export function getCompileFiles(tscPath: any, options?: {}): any;
7
7
  export function readExportsConfig(configPath: any, pkgDir: any): Promise<{
8
8
  entries: any[];
9
9
  main: any;
@@ -30,8 +30,7 @@ export function registerCleanupHandlers(cleanupTempSync: any): () => void;
30
30
  export function hazardPackageFromMessage(message: any): string | null;
31
31
  export function filterDualPackageDiagnostics(diagnostics: any, allowlist?: Set<any>): any;
32
32
  export function processDiagnosticsForFile(diagnostics: any, projectDir: any, logDiagnosticsFn: any): any;
33
- export function exitOnDiagnostics(hasError: any, exitFn?: (code?: number | string | null) => never): void;
34
- export function maybeLinkNodeModules(projectRoot: any, subDir: any, symlinkFn?: typeof symlink, findUpFn?: typeof findUp): Promise<void>;
33
+ export function exitOnDiagnostics(hasError: any, exitFn?: any): void;
34
+ export function maybeLinkNodeModules(projectRoot: any, subDir: any, symlinkFn?: any, findUpFn?: typeof findUp): Promise<void>;
35
35
  export function runExportsValidationBlock(options: any): Promise<any>;
36
- import { symlink } from 'node:fs/promises';
37
36
  import { findUp } from 'find-up';
@@ -1,17 +1,17 @@
1
1
  export function init(args: any): Promise<false | {
2
2
  pkg: import("read-package-up").NormalizedReadResult;
3
- dirs: boolean;
3
+ dirs: any;
4
4
  modules: boolean;
5
5
  transformSyntax: boolean;
6
- exports: string | undefined;
7
- exportsConfig: string | undefined;
8
- exportsValidate: boolean;
9
- rewritePolicy: string;
10
- detectDualPackageHazard: string;
11
- dualPackageHazardAllowlist: string[];
12
- dualPackageHazardScope: string;
13
- verbose: boolean;
14
- copyMode: string;
6
+ exports: any;
7
+ exportsConfig: any;
8
+ exportsValidate: any;
9
+ rewritePolicy: any;
10
+ detectDualPackageHazard: any;
11
+ dualPackageHazardAllowlist: any;
12
+ dualPackageHazardScope: any;
13
+ verbose: any;
14
+ copyMode: any;
15
15
  tsconfig: {
16
16
  compilerOptions?: import("get-tsconfig").TsConfigJson.CompilerOptions | undefined;
17
17
  watchOptions?: import("get-tsconfig").TsConfigJson.WatchOptions | undefined;
@@ -22,6 +22,6 @@ export function init(args: any): Promise<false | {
22
22
  include?: string[] | undefined;
23
23
  references?: import("get-tsconfig").TsConfigJson.References[] | undefined;
24
24
  };
25
- projectDir: string;
26
- configPath: string;
25
+ projectDir: any;
26
+ configPath: any;
27
27
  }>;
@@ -2,8 +2,8 @@ export function log(msg?: string, level?: string, opts?: {}): void;
2
2
  export function logError(msg: any): void;
3
3
  export function logSuccess(msg: any): void;
4
4
  export function logWarn(msg: any): void;
5
- export function getRealPathAsFileUrl(path: any): Promise<string>;
6
- export function getCompileFiles(tscPath: any, options?: {}): string[];
5
+ export function getRealPathAsFileUrl(path: any): Promise<any>;
6
+ export function getCompileFiles(tscPath: any, options?: {}): any;
7
7
  export function readExportsConfig(configPath: any, pkgDir: any): Promise<{
8
8
  entries: any[];
9
9
  main: any;
@@ -30,8 +30,7 @@ export function registerCleanupHandlers(cleanupTempSync: any): () => void;
30
30
  export function hazardPackageFromMessage(message: any): string | null;
31
31
  export function filterDualPackageDiagnostics(diagnostics: any, allowlist?: Set<any>): any;
32
32
  export function processDiagnosticsForFile(diagnostics: any, projectDir: any, logDiagnosticsFn: any): any;
33
- export function exitOnDiagnostics(hasError: any, exitFn?: (code?: number | string | null) => never): void;
34
- export function maybeLinkNodeModules(projectRoot: any, subDir: any, symlinkFn?: typeof symlink, findUpFn?: typeof findUp): Promise<void>;
33
+ export function exitOnDiagnostics(hasError: any, exitFn?: any): void;
34
+ export function maybeLinkNodeModules(projectRoot: any, subDir: any, symlinkFn?: any, findUpFn?: typeof findUp): Promise<void>;
35
35
  export function runExportsValidationBlock(options: any): Promise<any>;
36
- import { symlink } from 'node:fs/promises';
37
36
  import { findUp } from 'find-up';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knighted/duel",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "TypeScript dual packages.",
5
5
  "type": "module",
6
6
  "main": "dist/esm/duel.js",
@@ -16,12 +16,12 @@
16
16
  "./package.json": "./package.json"
17
17
  },
18
18
  "engines": {
19
- "node": ">=22.21.1 <23 || >=24 <25"
19
+ "node": ">=22.21.1 <23 || >=24 <25 || >=26 <27"
20
20
  },
21
21
  "engineStrict": true,
22
22
  "scripts": {
23
- "prettier": "prettier -w *.js *.md docs/*.md src/*.js test/*.js scripts/*.js",
24
- "prettier:check": "prettier --check --ignore-unknown *.js *.md docs/*.md src/*.js test/*.js scripts/*.js",
23
+ "prettier": "prettier -w *.js *.md *.json *.yml docs/*.md src/*.js test/*.js scripts/*.js",
24
+ "prettier:check": "prettier --check --ignore-unknown *.js *.md *.json *.yml docs/*.md src/*.js test/*.js scripts/*.js",
25
25
  "lint": "eslint src/*.js test/*.js scripts/*.js",
26
26
  "test:unit": "c8 --reporter=text --reporter=text-summary --reporter=lcov node --test --test-reporter=spec test/unit.js",
27
27
  "test:integration": "node --test --test-reporter=spec test/integration.js",
@@ -61,7 +61,7 @@
61
61
  "url": "https://github.com/knightedcodemonkey/duel/issues"
62
62
  },
63
63
  "peerDependencies": {
64
- "typescript": ">=5.5.0 <6",
64
+ "typescript": ">=5.5.0 <7",
65
65
  "typescript-next": "npm:typescript@next"
66
66
  },
67
67
  "peerDependenciesMeta": {
@@ -72,29 +72,34 @@
72
72
  "devDependencies": {
73
73
  "@eslint/js": "^10.0.1",
74
74
  "@tsconfig/recommended": "^1.0.10",
75
- "@types/node": "^24.10.1",
75
+ "@types/node": "^25.9.1",
76
76
  "c8": "^11.0.0",
77
77
  "cross-spawn": "^7.0.6",
78
- "eslint": "^10.0.3",
79
- "eslint-plugin-n": "^17.24.0",
80
- "globals": "^16.3.0",
78
+ "eslint": "^10.4.0",
79
+ "eslint-plugin-n": "^18.0.1",
80
+ "globals": "^17.6.0",
81
81
  "husky": "^9.1.7",
82
- "lint-staged": "^16.2.7",
82
+ "lint-staged": "^16.4.0",
83
83
  "node-module-type": "^1.0.4",
84
84
  "prettier": "^3.6.2",
85
- "tsx": "^4.20.6",
86
- "typescript": "^5.9.3",
87
- "vite": "^7.3.1"
85
+ "tsx": "^4.22.3",
86
+ "typescript": "^6.0.3",
87
+ "vite": "^7.3.2"
88
88
  },
89
89
  "dependencies": {
90
90
  "@jridgewell/gen-mapping": "^0.3.13",
91
91
  "@jridgewell/trace-mapping": "^0.3.31",
92
- "@knighted/module": "^1.5.2",
92
+ "@knighted/module": "^1.6.0",
93
93
  "find-up": "^8.0.0",
94
- "get-tsconfig": "^4.13.0",
94
+ "get-tsconfig": "^4.14.0",
95
95
  "magic-string": "^0.30.21",
96
96
  "read-package-up": "^12.0.0"
97
97
  },
98
+ "overrides": {
99
+ "c8": {
100
+ "yargs": ">17.7.2 <19"
101
+ }
102
+ },
98
103
  "lint-staged": {
99
104
  "*.{js,mjs,cjs,ts,cts,mts,jsx,tsx}": [
100
105
  "eslint --max-warnings=0 --no-warn-ignored",