Skip to content

Commit

Permalink
build: automatically build types in prepack
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 29, 2024
1 parent f48d376 commit 2e1a66d
Show file tree
Hide file tree
Showing 34 changed files with 33 additions and 50 deletions.
17 changes: 0 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,6 @@ https://github.com/endojs/endo/labels/next-release
yarn build
```

* Generate types.

```sh
yarn lerna run build:types
```

We generate types from the bottom up before publishing because this allows
each package to rely on the generated types of its dependencies in the
workspace.

* Commit the generated types.

```sh
git add .
git commit -m 'chore: Add generated types'
```

* Recreate the changelogs with the current date *and* generate tags for the new
versions. This is the effect of removing the `--no-git-tag-version` flag.

Expand Down
2 changes: 1 addition & 1 deletion packages/base64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/captp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/check-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
Expand Down
2 changes: 1 addition & 1 deletion packages/cjs-module-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"exports": {},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-check": "yarn lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/compartment-mapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/daemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/env-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lint-fix": "eslint --fix .",
"lint:eslint": "eslint .",
"lint:types": "tsc",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "exit 0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
"lint:eslint": "eslint '**/*.js'",
"lint:types": "tsc",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/evasive-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
"lint-check": "yarn lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:xs": "exit 0",
"build": "exit 0",
"clean": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
"lint-check": "yarn lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/exo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
Expand Down
2 changes: 1 addition & 1 deletion packages/far/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
"lint-check": "yarn lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/import-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint-fix": "eslint --fix '**/*.js'",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava",
"test:xs": "exit 0",
Expand Down
2 changes: 1 addition & 1 deletion packages/lp32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/marshal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/memoize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lint-fix": "eslint --fix .",
"lint:eslint": "eslint .",
"lint:types": "tsc",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/nat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
Expand Down
2 changes: 1 addition & 1 deletion packages/netstring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/pass-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
Expand Down
2 changes: 1 addition & 1 deletion packages/patterns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
Expand Down
2 changes: 1 addition & 1 deletion packages/promise-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/ses-ava/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/skel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
"lint-check": "yarn lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/static-module-record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/stream-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/syrup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/where/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/zip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"build": "exit 0",
"build:types": "tsc --build tsconfig.build.json",
"prepack": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down

0 comments on commit 2e1a66d

Please sign in to comment.