Skip to content

Commit

Permalink
Bundle types into one file (#2150)
Browse files Browse the repository at this point in the history
* Bundle types into one file

* update types ref and jobs

* fix job script
  • Loading branch information
huozhi authored Sep 9, 2022
1 parent 7836dc9 commit 81b3cbb
Show file tree
Hide file tree
Showing 8 changed files with 199 additions and 113 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
cache: pnpm

- run: pnpm install
- run: pnpm build
- run: pnpm run-all-checks
- run: pnpm clean
- run: pnpm build
env:
CI: true
4 changes: 2 additions & 2 deletions _internal/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"types": "./dist/_internal",
"types": "./dist/_internal/index.d.ts",
"exports": "./dist/index.mjs",
"private": true,
"scripts": {
"watch": "bunchee index.ts -w",
"build": "bunchee index.ts",
"build": "bunchee index.ts --target es2015",
"types:check": "tsc --noEmit",
"clean": "rimraf dist"
},
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"watch": "bunchee index.ts -w",
"build": "bunchee index.ts",
"build": "bunchee index.ts --target es2015",
"types:check": "tsc --noEmit",
"clean": "rimraf dist"
},
Expand Down
2 changes: 1 addition & 1 deletion immutable/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"types": "./dist/immutable",
"types": "./dist/immutable/index.d.ts",
"exports": "./dist/index.mjs",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion infinite/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"types": "./dist/infinite",
"types": "./dist/infinite/index.d.ts",
"exports": "./dist/index.mjs",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion mutation/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"types": "./dist/mutation",
"types": "./dist/mutation/index.d.ts",
"exports": "./dist/index.mjs",
"private": true,
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,35 @@
"packageManager": "pnpm@7.1.0",
"main": "./core/dist/index.js",
"module": "./core/dist/index.esm.js",
"types": "./core/dist/core/index.d.ts",
"types": "./core/dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./core/dist/core/index.d.ts",
"types": "./core/dist/index.d.ts",
"import": "./core/dist/index.mjs",
"module": "./core/dist/index.esm.js",
"require": "./core/dist/index.js"
},
"./infinite": {
"types": "./infinite/dist/infinite/index.d.ts",
"types": "./infinite/dist/index.d.ts",
"import": "./infinite/dist/index.mjs",
"module": "./infinite/dist/index.esm.js",
"require": "./infinite/dist/index.js"
},
"./immutable": {
"types": "./immutable/dist/immutable/index.d.ts",
"types": "./immutable/dist/index.d.ts",
"import": "./immutable/dist/index.mjs",
"module": "./immutable/dist/index.esm.js",
"require": "./immutable/dist/index.js"
},
"./mutation": {
"types": "./mutation/dist/mutation/index.d.ts",
"types": "./mutation/dist/index.d.ts",
"import": "./mutation/dist/index.mjs",
"module": "./mutation/dist/index.esm.js",
"require": "./mutation/dist/index.js"
},
"./_internal": {
"types": "./_internal/dist/_internal/index.d.ts",
"types": "./_internal/dist/index.d.ts",
"import": "./_internal/dist/index.mjs",
"module": "./_internal/dist/index.esm.js",
"require": "./_internal/dist/index.js"
Expand Down Expand Up @@ -102,7 +102,7 @@
"@types/use-sync-external-store": "^0.0.3",
"@typescript-eslint/eslint-plugin": "5.36.1",
"@typescript-eslint/parser": "5.36.1",
"bunchee": "2.0.1",
"bunchee": "2.1.1",
"eslint": "8.15.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-jest-dom": "4.0.1",
Expand Down
Loading

0 comments on commit 81b3cbb

Please sign in to comment.