fix: build updated babel-type helpers #17010
Merged
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.
In this PR we run the
build-rollup
step after@babel/types
helpers are generated from the definitions. This is not a build issue for Babel 7 because the generated files are checked in the repo. However, in Babel 8, since we started bundling@babel/types
in #14179, the@babel/types
are now built by thebuild-rollup
step, so we have to run it after the source changes.In the second commit we fixed another issue that might be related to
vinyl-fs
: When we rungulp build-dev
, we will run the following sequential task:build-no-bundle
,generate-type-helpers
,build-no-bundle
. Aftergenerate-type-helpers
, the vinyl-fs modified the ctime of e.g.packages/babel-types/src/asserts/generated/index.ts
to a much earlier time, therefore it evades theneedCompile
check in the babel-worker (babel/babel-worker.cjs
Lines 7 to 20 in 55f9fb5