Repository navigation
Conversation
Our root scripts use several packages that the root `package.json` doesn't declare. They work under Yarn only because hoisting happens to put them in the root `node_modules`: - `@babel/register` and `nullthrows`, used by `build` and the other scripts under `scripts/` - `flow-estree`, used by our lint rules - `@types/babel__core`, `@types/babel__traverse` and `@types/connect`, needed by `typecheck-ts` - `source-map@^0.6.1`. Our packages depend on 0.5, which ships no types, so `typecheck-ts` has been picking up the hoisted 0.6 typings instead. This keeps that behaviour explicit. Each range matches what's already locked, so `yarn.lock` doesn't change. This is needed for any package manager that doesn't hoist, in particular pnpm. Changelog: Internal Test plan: `yarn install --frozen-lockfile` passes with the unchanged `yarn.lock`. Under pnpm 11.28.8 and 12.15.0, before this change `build`, `lint` and `typecheck-ts` fail on missing modules or declarations. After it, `build`, `lint`, `format-check`, `verify-api-snapshots`, `typecheck-ts` and `test-smoke` all pass.
Collaborator
Author
|
Duplicate of #2116 (opened by mistake while linking the stack) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our root scripts use several packages that the root
package.jsondoesn't declare. They work under Yarn only because hoisting happens to put them in the rootnode_modules:@babel/registerandnullthrows, used bybuildand the other scripts underscripts/flow-estree, used by our lint rules@types/babel__core,@types/babel__traverseand@types/connect, needed bytypecheck-tssource-map@^0.6.1. Our packages depend on 0.5, which ships no types, sotypecheck-tshas been picking up the hoisted 0.6 typings instead. This keeps that behaviour explicit.Each range matches what's already locked, so
yarn.lockdoesn't change. This is needed for any package manager that doesn't hoist, in particular pnpm.Changelog: Internal
Test plan:
yarn install --frozen-lockfilepasses with the unchangedyarn.lock.Under pnpm 11.28.8 and 12.15.0, before this change
build,lintandtypecheck-tsfail on missing modules or declarations. After it,build,lint,format-check,verify-api-snapshots,typecheck-tsandtest-smokeall pass.