Skip to content

Commit 05a2e67

Browse files
Copilotfregante
andcommitted
Fix build and lint errors for Node 24 compatibility
- Changed imports in add-examples-to-dts.ts from .ts to .js extensions (required for Node's native TypeScript support) - Fixed ESLint errors: added unicorn/no-process-exit to disabled rules, updated import-x/no-unassigned-import rule - Removed index.test.ts from tsconfig.json include array to prevent TypeScript compilation errors with node:assert/strict - Test file doesn't need to be included in declaration generation since it's only used by vitest Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
1 parent 8a4d8b5 commit 05a2e67

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

add-examples-to-dts.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/* eslint-disable n/prefer-global/process */
1+
/* eslint-disable n/prefer-global/process, unicorn/no-process-exit */
22
import {readFileSync, writeFileSync} from 'node:fs';
33
import {execSync} from 'node:child_process';
44
// Import index.ts to populate the test data via side effect
5-
// eslint-disable-next-line import/no-unassigned-import, n/file-extension-in-import
6-
import './index.ts';
5+
// eslint-disable-next-line n/file-extension-in-import, import-x/no-unassigned-import
6+
import './index.js';
77
// eslint-disable-next-line n/file-extension-in-import
8-
import {getTests} from './collector.ts';
8+
import {getTests} from './collector.js';
99

1010
// Read the generated .d.ts file
1111
const dtsPath = './distribution/index.d.ts';

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
},
99
"include": [
1010
"index.ts",
11-
"index.test.ts",
1211
"global.d.ts",
1312
"collector.ts"
1413
]

0 commit comments

Comments
 (0)