Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[infra] Use npm workspaces instead of lerna (#3112)
This PR removes Lerna entirely. Now we just use npm workspaces + wireit. ### Benefits - No more `npm run bootstrap`, just `npm ci`. - To upgrade or add a dependency, edit the `package.json` and `npm i` from the root. - Cuts around 30s off install time in CI. - Only one `package-lock.json` file for the whole monorepo. ### Tricky parts - npm workspaces hoists packages to the top-level `node_modules/` folder whenever possible. This is different to Lerna, which always put all the dependencies in each package's own `node_modules/` folder. Only if there is a conflicting version would there now be a `node_modules/` folder inside a workspace package. - This required updating various paths to reach further up the file system. - In a couple of cases, this caused issues with conflicting `@types` packages for TypeScript, because while previously only the local version was available, now multiple versions could be. This is because TypeScript by default ambiently loads all `node_modules/@types/*` packages from _all recursive parent directories_. The solution to these cases are to specify that only the immediate `node_modules/` folder should be consulted through the `typeRoots` setting. - This required changing the tachometer server root directory as well, which ended up being more complicated than it should be, because of the way tachometer was treating paths in config files as relative to the current working directory, instead of the config file path. In google/tachometer#237 I changed that behavior, so this also bumps the tachometer version and updates the configs accordingly. Fixes #3093
- Loading branch information
Showing
99 changed files
with
58,482 additions
and
215,297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
node_modules/ | ||
lerna-debug.log | ||
*.tgz | ||
*.tsbuildinfo | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.