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

Copy overrides from package.json during migration #7285

Closed

Conversation

hborchardt
Copy link
Contributor

What does this PR do?

Fixes #7233
During migration of a package-lock.json to bun.lockb, this also parses the package.json file to get the necessary overrides section and include it in the bun Lockfile. While writing the test, I also found a missing counting of the package name string length.

  • 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 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
  • I wrote TypeScript/JavaScript tests and they pass locally (bun-debug test test-file-name.test)

This is my first endeavour into zig, so I hope I got it right :) if not, feel free to criticise.

@hborchardt hborchardt force-pushed the hborchardt/pm_migrate_overrides branch from a1817f4 to ead4186 Compare November 23, 2023 10:07
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need some changes before it can be merged

@hborchardt hborchardt force-pushed the hborchardt/pm_migrate_overrides branch from ead4186 to 4faf9cd Compare December 4, 2023 16:49
@hborchardt
Copy link
Contributor Author

@Jarred-Sumner I believe that no changes are necessary, please reconsider. Thanks!

@hborchardt hborchardt force-pushed the hborchardt/pm_migrate_overrides branch 2 times, most recently from d58333c to 6a48da1 Compare January 6, 2024 12:15
In case of overrides in the package.json, a different name property is used,
which was not counted for.
@hborchardt hborchardt force-pushed the hborchardt/pm_migrate_overrides branch from 6a48da1 to 2503950 Compare February 27, 2024 07:29
@birkskyum
Copy link
Collaborator

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.

Migrating package-lock.json with overrides produces bun.lockb without overrrides
3 participants