This repository was archived by the owner on Jan 20, 2022. It is now read-only.
test: lifecycle scripts of bundled linked deps #299
Closed
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 currently failing test ensures that lifecycle scripts for a link dep that is bundled within a package are also run during reify.
The gist of this test is that the package
@ruyadorno/dep-with-a-linkhas a dependency which is afile:link to a folder inside its own tarball, this linked dependency has a "prepare" lifecycle script that should be run at reify in order to generate binaries it might rely on, you can see its contents here:Now in order for this test to pass we need to make sure the
preparescript for that linked dependency runs properly in order for the filelinked-dep-preparefile to be generated as expected. Here's what the contents of that test fixture look like post reify:. ├── a │ ├── a-prepare │ └── package.json ├── node_modules │ ├── @ruyadorno │ │ └── dep-with-a-link │ │ ├── linked-dep -│ │ │ ├── linked-dep-prepare │ │ │ └── package.json │ │ └── package.json │ ├── a -> ../a │ └── linked-dep -> @ruyadorno/dep-with-a-link/linked-dep ├── package-lock.json └── package.jsoncc @isaacs