diff --git a/package-lock.json b/package-lock.json index 7020f0a..ca152f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 8e7b84b..aa8f13d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tsconfig.json b/tsconfig.json index b685aae..829ed99 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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"], } diff --git a/tsup.config.ts b/tsup.config.ts index 1593055..ec0cc7c 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -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, }; }, });