-
-
Notifications
You must be signed in to change notification settings - Fork 159
feat: add opt-in default npm package excludes from yarn #2136
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
feat: add opt-in default npm package excludes from yarn #2136
Conversation
|
dzbarsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I love this idea (and in fact I implemented the same thing last time I worked on a big JS monorepo), but I'm a bit worried about the perf of all these globs. Alternately, we could drop these tiles as part of the extraction step. @jbedard WDYT?
|
These are globs evaluated by |
Oh right we invoke tar directly. In my fork we had a script action around the tar so I was thinking to put the expansion there and hide it from analysis. Disregard me this approach is probably fine |
|
@Mivr can you confirm if these are actually enabled by default in yarn? Or is it only when you explicitly call If it is opt-in, maybe should also make this feature opt-in and then we can merge this now (without waiting for rules_js v3). Can we do something like replacing |
4b23f46 to
3569a09
Compare
ea34f10 to
d1a3c2b
Compare
|
So in yarn it has to be enabled. It is disabled by default. I added a magic string for now, not sure it will work with a Boolean and the string does allow for more flexibility like extending the defaults further for some packages. It's interesting to discuss which option will be more user friendly. I tried also with a constant but Module.Bazel does not work with a constant as it does not allow for load statements. It can also be a rule, which by syntax for the user is a close to the magic string. |
|
The closest I could get this is: For WORKSPACE it will just work both ways. I am open to other approaches for this, for now this was was least intrusive way I could find for the users. |
c5f9792 to
6510b84
Compare
6510b84 to
0a64355
Compare
0a64355 to
bd88476
Compare


Closes #2110
Changes are visible to end-users: yes
Added option to use default package content exclusions similar to
yarn autoclean.With bzlmod extensions:
For legacy WORKSPACE:
Test plan