Removes the checked-in @berry/pnpify & @berry/builder#328
Merged
Conversation
Member
Author
|
In term of performances, running |
Member
Author
|
Merging to fix the pnp hook build |
Member
|
@arcanis Nope, I didn't consider Cool, thats much easier, I love it! |
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.
This PR removes the checked-in versions of
@berry/pnpifyand@berry/builderthat are stored within the repository. We previously needed them in order to build Yarn (we needed), but I found a way to do this usingts-nodeto add TypeScript support at runtime. The key was:ts-nodesupports an option calledtranspileOnly. This avoids the typechecking errors that would happen when runningpnpifyfrom its TS sources because TypeScript wouldn't be able to find the modules.Disabling the typechecking this way isn't a problem because we use pnpify to build itself (by calling
tsc), meaning that the typecheck will be effectively run - just slightly later in the process.I've implemented a
publishConfig.binproperty which allows us to use different binaries locally than the ones used when the package gets downloaded from the registry. This makes it possible to auto-registerts-nodelocally, but just run the regular binary in all other cases. This avoid having to complicate our scripts to bootstrapts-nodeor similar.@Vlasenko Did you consider using
ts-nodewhen you implemented PnPify? I'm curious if I'm forgetting some edge cases that would make this strategy crumble 😄