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

Glob support for workspace names in bun install #10462

Merged
merged 27 commits into from May 1, 2024
Merged

Conversation

zackradisic
Copy link
Contributor

@zackradisic zackradisic commented Apr 23, 2024

What does this PR do?

Implements glob support for workspace names in bun install, allowing all pattern syntax supported by the Glob API to be used in "workspaces", except for exclusions which are not implemented yet.

This also implements an optimization for glob patterns that end with a component that is a literal path (e.g. packages/**/package.json)

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

Fixes: #1918

How did you verify your code works?

I wrote automated tests

Zig files changed:

  • 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)

src/glob.zig Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Apr 23, 2024

Copy link
Collaborator

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

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

Left a few comments. I think the tests are failing because of the test directory used in the new tests. It's looking for a folder where the tests are run, not in the temp folder.
Screenshot 2024-04-23 at 12 53 47 PM

@Jarred-Sumner
Copy link
Collaborator

@zackradisic more merge conflicts

@Jarred-Sumner
Copy link
Collaborator

@zackradisic test failures

@zackradisic
Copy link
Contributor Author

@dylan-conway are the failing bun-install tests relevant? They don't look related to the changes in this PR

@dylan-conway
Copy link
Collaborator

@dylan-conway are the failing bun-install tests relevant? They don't look related to the changes in this PR

it should install in such a way that two identical packages with different peer dependencies are different instances is unrelated, it's a new regression in main, but the other yarn test... failures on windows seem suspicious. If you can't repro them locally it's already existing flakiness

@zackradisic
Copy link
Contributor Author

@dylan-conway are the failing bun-install tests relevant? They don't look related to the changes in this PR

it should install in such a way that two identical packages with different peer dependencies are different instances is unrelated, it's a new regression in main, but the other yarn test... failures on windows seem suspicious. If you can't repro them locally it's already existing flakiness

Can't repro them locally so looks like its flakiness and this should now be mergeable

Copy link
Collaborator

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

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

Looks great

@gvilums gvilums merged commit 303f86a into main May 1, 2024
40 of 52 checks passed
@gvilums gvilums deleted the zack/glob-workspace branch May 1, 2024 18:01
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.

Implement glob support for workspace names in bun install
4 participants