Skip to content

Commit

Permalink
Improve npm publishing infra (#7287)
Browse files Browse the repository at this point in the history
The current npm publishing infra is more manual than necessary. This PR makes the following improvements:

1. Publish all packages in a release unit with one command. Publishing no longer involves running yarn publish-npm multiple times.

2. Stage all packages to a local verdaccio repository before publishing. This catches any compatibility issues that may appear when publishing to npm and allows us to build all packages before publishing any to npm.

3. Publish with a single OTP. The previous infra required an OTP per package to publish to npm. This new infra publishes all packages sequentially after they're built, so it can use a single OTP for all of them. If another OTP is required due to the first one timing out, it asks for another.

A future PR will move our nightly verdaccio e2e tests to use this infra, which will allow us to avoid setting the npm registry globally. This will let us run verdaccio tests in parallel with the rest of nightly tests, which should reduce the time taken.
  • Loading branch information
mattsoulanille authored Jan 24, 2023
1 parent ceb69e6 commit 0a32b67
Show file tree
Hide file tree
Showing 8 changed files with 2,471 additions and 158 deletions.
2 changes: 1 addition & 1 deletion e2e/scripts/verdaccio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ packages:
'@tensorflow/**':
access: $all
publish: $all
# Don't set proxy to avoid accidentally publishing to npm.
proxy: npmjs
'@*/*':
access: $all
publish: $all
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@
"@types/argparse": "^1.0.38",
"@types/emscripten": "~0.0.34",
"@types/estree": "^0.0.51",
"@types/inquirer": "^8.0.0",
"@types/jasmine": "~4.0.3",
"@types/js-yaml": "^4.0.5",
"@types/long": "4.0.1",
"@types/mkdirp": "^0.5.2",
"@types/node": "^18.11.15",
"@types/node-fetch": "~2.1.2",
"@types/offscreencanvas": "^2019.7.0",
"@types/rimraf": "^3.0.2",
"@types/rollup-plugin-visualizer": "^4.2.1",
"@types/seedrandom": "^2.4.28",
"@types/semver": "^7.3.9",
"@types/shelljs": "^0.8.7",
"@types/webgl-ext": "0.0.30",
"@webgpu/types": "0.1.21",
Expand All @@ -37,6 +40,7 @@
"deep-equal": "^1.0.1",
"estree-walker": "~1.0.1",
"express": "4.18.2",
"inquirer": "^8.0.0",
"jasmine": "~4.2.1",
"jasmine-core": "~4.2.0",
"js-yaml": "^3.14.0",
Expand All @@ -61,6 +65,7 @@
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "~5.8.2",
"seedrandom": "^3.0.5",
"semver": "^7.3.7",
"shelljs": "~0.8.5",
"string_decoder": "^1.3.0",
"terser": "^5.14.2",
Expand All @@ -69,7 +74,8 @@
"tslib": "^2.4.0",
"tslint": "^6.1.3",
"tslint-no-circular-imports": "~0.7.0",
"typescript": "4.8.4"
"typescript": "4.8.4",
"verdaccio": "^5.9.0"
},
"scripts": {
"lint": "tslint -p tsconfig_tslint.json",
Expand Down
Loading

0 comments on commit 0a32b67

Please sign in to comment.