chore: add @types/node and update tsconfig
Add @types/node as a dev dependency and include it in tsconfig types to support Node.js globals. Also expand tsconfig include to cover configuration files.
This commit is contained in:
parent
5e172c61bb
commit
90cb97e0ae
|
|
@ -10,6 +10,7 @@
|
|||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@preact/signals-core": "^1.5.1",
|
||||
"@types/node": "^25.6.0",
|
||||
"inline-schema": "file:../inline-schema",
|
||||
"mutative": "^1.3.0",
|
||||
"tsup": "^8.0.2",
|
||||
|
|
@ -958,6 +959,16 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "25.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
|
||||
"integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~7.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/expect": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz",
|
||||
|
|
@ -2469,6 +2480,13 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.19.2",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz",
|
||||
"integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.4.21",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@preact/signals-core": "^1.5.1",
|
||||
"@types/node": "^25.6.0",
|
||||
"inline-schema": "file:../inline-schema",
|
||||
"mutative": "^1.3.0",
|
||||
"tsup": "^8.0.2",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
"lib": ["ES2020"],
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"types": ["node"],
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
|
@ -18,6 +19,6 @@
|
|||
"@/*": ["src/*"],
|
||||
},
|
||||
},
|
||||
"include": ["src/**/*", "tests/**/*"],
|
||||
"include": ["src/**/*", "tests/**/*", "*.config.ts"],
|
||||
"exclude": ["node_modules", "dist"],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import { defineConfig } from 'tsup';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { csvLoader } from 'inline-schema/csv-loader/rollup';
|
||||
import { defineConfig } from "tsup";
|
||||
import { fileURLToPath } from "url";
|
||||
import { csvLoader } from "inline-schema/csv-loader/rollup";
|
||||
|
||||
const srcDir = fileURLToPath(new URL('./src', import.meta.url));
|
||||
const srcDir = fileURLToPath(new URL("./src", import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/index.ts'],
|
||||
format: ['esm'],
|
||||
entry: ["src/index.ts"],
|
||||
format: ["esm"],
|
||||
dts: true,
|
||||
clean: true,
|
||||
sourcemap: true,
|
||||
external: ['@preact/signals-core', 'mutative', 'inline-schema'],
|
||||
external: ["@preact/signals-core", "mutative", "inline-schema"],
|
||||
plugins: [csvLoader()],
|
||||
esbuildOptions(options) {
|
||||
options.alias = {
|
||||
'@': srcDir,
|
||||
"@": srcDir,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue