Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lifecycle scripts not running on reinstallation #6376

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

Arden144
Copy link
Contributor

@Arden144 Arden144 commented Oct 9, 2023

What does this PR do?

This PR adds serialization and deserialization of the trustedDependencies field from the package.json field in the lockfile. I added an 8 byte flag to the lockfile to indicate if the field is present or not.

Please let me know if you'd like this change implemented differently and I'd be happy to make changes.

This PR closes #5472

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

I wrote automated tests

  • I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
  • I or my editor ran zig fmt on the changed files
  • I included a test for the new code, or an existing test covers it
  • JSValue used outside outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed

@Jarred-Sumner
Copy link
Collaborator

This might not strictly be necessary since we do read this information from the package.json

but I think it's also okay to store it

Looks good, lets let the tests run. There will be one failure in bun-install due to an existing bug.

@dylan-conway dylan-conway merged commit 39446eb into oven-sh:main Oct 11, 2023
15 of 20 checks passed
@dylan-conway
Copy link
Collaborator

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bun install ignores trustedDependencies when bun.lockb is present
3 participants