diff --git a/package.json b/package.json index 1d01939..b4ead7b 100644 --- a/package.json +++ b/package.json @@ -7,19 +7,17 @@ "url": "https://github.com/storybookjs/jest.git" }, "scripts": { - "build": "yarn build:esm && yarn build:cjs", - "build:esm": "tsc --project tsconfig.esm.json", - "build:cjs": "tsc --project tsconfig.cjs.json", + "build": "tsup ./src/index.ts --format cjs,esm --dts", "prerelease": "yarn build", "release": "auto shipit" }, - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", + "main": "./dist/index.js", + "module": "./dist/index.mjs", "license": "MIT", "files": [ "dist/**/*" ], - "types": "./dist/types/index.d.ts", + "types": "./dist/index.d.ts", "publishConfig": { "access": "public" }, @@ -31,12 +29,13 @@ }, "devDependencies": { "@auto-it/first-time-contributor": "^10.37.6", + "tsup": "^5.12.0", "@auto-it/released": "^10.37.6", "@storybook/linter-config": "^3.1.2", "@types/react": "*", "auto": "^10.37.6", "expect": "^27.3.1", - "typescript": "^4.4.3" + "typescript": "^5.0.4" }, "author": "yannbf@gmail.com", "auto": { diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json deleted file mode 100644 index 6196628..0000000 --- a/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist/cjs", - "module": "CommonJS", - }, -} diff --git a/tsconfig.esm.json b/tsconfig.esm.json deleted file mode 100644 index 3e2451c..0000000 --- a/tsconfig.esm.json +++ /dev/null @@ -1,9 +0,0 @@ - -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist/esm", - "module": "ES6", - "target": "ES5", - }, -} diff --git a/tsconfig.base.json b/tsconfig.json similarity index 76% rename from tsconfig.base.json rename to tsconfig.json index 5c51249..9b3a7fd 100644 --- a/tsconfig.base.json +++ b/tsconfig.json @@ -1,7 +1,8 @@ { "compilerOptions": { - "noImplicitAny": true, - "allowJs": true, + "strict": true, + "target": "es2020", + "module": "ESNext", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "declaration": true,