Skip to content

Commit

Permalink
fix: Adjust type generation in release process and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Nov 22, 2023
1 parent 13ec6c3 commit a4b02a5
Show file tree
Hide file tree
Showing 33 changed files with 87 additions and 65 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,14 @@ jobs:
- name: build
run: yarn run build

- name: build:types
# Concurrency is 1 to avoid bizarre cross-package contamination.
run: yarn lerna run generate:types

- name: pack
# Concurrency is 1 to avoid bizarre cross-package contamination.
run: yarn run lerna exec --concurrency=1 yarn pack
run: yarn lerna run pack

- name: clean:types
# Concurrency is 1 to avoid bizarre cross-package contamination.
run: yarn lerna run clean:types
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ https://github.com/endojs/endo/labels/next-release
git checkout -b release-$now
```

* 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.

* Create the release CHANGELOGs.

```sh
Expand Down Expand Up @@ -156,6 +166,12 @@ https://github.com/endojs/endo/labels/next-release
git tag -l | egrep -e '@[0-9]+\.[0-9]+\.[0-9]+$' | xargs git push origin
```

* Clean up generated types.

```sh
yarn lerna run glean:types
```

## More information

To get help for the command-line options that will affect these commands, use:
Expand Down
4 changes: 2 additions & 2 deletions packages/base64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "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",
"test:xs": "exit 0",
Expand Down
4 changes: 2 additions & 2 deletions packages/captp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "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",
"test:xs": "exit 0",
Expand Down
4 changes: 2 additions & 2 deletions packages/check-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
Expand Down
4 changes: 2 additions & 2 deletions packages/cjs-module-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"exports": {},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
Expand Down
4 changes: 2 additions & 2 deletions packages/compartment-mapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/daemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/env-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
"lint:types": "tsc",
"postpack": "git clean -f '*.d.ts*'",
"prepack": "tsc --build tsconfig.build.json",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
"lint:eslint": "eslint '**/*.js'",
"lint:types": "tsc",
"postpack": "yarn clean",
"prepack": "tsc --build tsconfig.build.json",
"build:types": "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",
"test:xs": "exit 0"
Expand Down
5 changes: 2 additions & 3 deletions packages/evasive-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"clean": "git clean -f '*.d.ts*'",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "yarn clean",
"build:types": "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",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
4 changes: 2 additions & 2 deletions packages/eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"test:xs": "exit 0",
"build": "exit 0",
"clean": "git clean -f '*.d.ts*'",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "yarn clean",
"build:types": "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",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
4 changes: 2 additions & 2 deletions packages/exo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
Expand Down
4 changes: 2 additions & 2 deletions packages/far/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "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",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
4 changes: 2 additions & 2 deletions packages/import-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint-fix": "eslint --fix '**/*.js'",
"lint": "yarn lint:types && yarn lint:eslint",
"lint:eslint": "eslint .",
Expand Down
4 changes: 2 additions & 2 deletions packages/init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava",
"test:xs": "exit 0",
"lint-check": "yarn lint",
Expand Down
4 changes: 2 additions & 2 deletions packages/lp32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/marshal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "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",
"test:xs": "exit 0",
Expand Down
4 changes: 2 additions & 2 deletions packages/memoize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
"lint:types": "tsc",
"postpack": "git clean -f '*.d.ts*'",
"prepack": "tsc --build tsconfig.build.json",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"test": "ava"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/netstring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/pass-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
Expand Down
4 changes: 2 additions & 2 deletions packages/patterns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
"lint:js": "eslint .",
Expand Down
4 changes: 2 additions & 2 deletions packages/promise-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-check": "yarn lint",
Expand Down
4 changes: 2 additions & 2 deletions packages/ses-ava/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
5 changes: 2 additions & 3 deletions packages/skel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
"build": "exit 0",
"clean": "git clean -f '*.d.ts*'",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "yarn clean",
"build:types": "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",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
4 changes: 2 additions & 2 deletions packages/static-module-record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint:types": "tsc",
Expand Down
4 changes: 2 additions & 2 deletions packages/stream-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/syrup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/where/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down
4 changes: 2 additions & 2 deletions packages/zip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"build:types": "tsc --build tsconfig.build.json",
"clean:types": "git clean -f '*.d.ts*'",
"cover": "c8 ava",
"lint": "yarn lint:types && yarn lint:js",
"lint-fix": "eslint --fix .",
Expand Down

0 comments on commit a4b02a5

Please sign in to comment.