diff --git a/ava.config.js b/ava.config.js index 2c8a77a..2375ccb 100644 --- a/ava.config.js +++ b/ava.config.js @@ -1,5 +1,5 @@ export default { - require: ['ts-node/register/transpile-only'], + require: ['ts-node/register'], extensions: ['js', 'ts'], files: ['test/**/*.test.{js,ts}'], nodeArguments: ['--experimental-specifier-resolution=node', '--loader=ts-node/esm', '--no-warnings'], diff --git a/package.json b/package.json index 49d77a5..68abf5c 100644 --- a/package.json +++ b/package.json @@ -77,8 +77,8 @@ "scripts": { "fmt": "prettier --color --write \"{*,src/**/*,test/**/*}.{js,ts}\" --cache", "check-fmt": "prettier --list-different \"{*,test/**/*}.{js,ts}\"", - "build-cjs": "node scripts/esbuild-cjs.js && tsc -p ./tsconfig.lib.json --declaration --emitDeclarationOnly --declarationDir lib/cjs && node scripts/casting.js", - "build-esm": "node scripts/esbuild-esm.js && tsc -p ./tsconfig.lib.json --declaration --emitDeclarationOnly --declarationDir lib/esm", + "build-cjs": "node scripts/esbuild-cjs.js && tsc -p ./tsconfig.lib.json --declarationDir lib/cjs && node scripts/casting.js", + "build-esm": "node scripts/esbuild-esm.js && tsc -p ./tsconfig.lib.json --declarationDir lib/esm", "build": "yarn build-cjs && yarn build-esm", "prepublishOnly": "rm -rf lib && yarn build", "test": "ava", diff --git a/tsconfig.json b/tsconfig.json index 6d6f152..b425a5b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,11 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "typeRoots": ["./node_modules/@types", "./@types"] + "typeRoots": ["./node_modules/@types", "./@types"], + "sourceMap": true, + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "lib" }, "include": ["src/**/*", "test/**/*.ts"], "exclude": [] diff --git a/tsconfig.lib.json b/tsconfig.lib.json index f19638b..9db49fa 100644 --- a/tsconfig.lib.json +++ b/tsconfig.lib.json @@ -1,9 +1,4 @@ { "extends": "./tsconfig.json", - "compilerOptions": { - "declaration": true, - "outDir": "lib", - "sourceMap": true - }, "include": ["src/**/*.ts"] }