-
Notifications
You must be signed in to change notification settings - Fork 70
deps: upgrade @rollup/plugin-commonjs to v22 to fix try/catch requires
#340
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
Conversation
- and build
- v21 broke `graphlib`'s internal usage of `lodash` with its breaking
change, and v22 has another breaking change to fix that
- notably, this was breaking rpt2 imports for some users because rpt2
bundles in `graphlib` etc, meaning the nuances of the bundling got
leaked to consumers, and, in fact, broke their builds
- another upside to unbundling
@rollup/plugin-commonjs to v22 to fix try/catch requires@rollup/plugin-commonjs to v22 to fix try/catch requires
@rollup/plugin-commonjs to v22 to fix try/catch requires@rollup/plugin-commonjs to v22 to fix try/catch requires
|
Looks good (once you ignore all the whitespace :D). Do you think this should be 32.1 or 33.0? @agilgur5 |
I'm not sure the release process for this repository. Should this commit include a patch version bump? |
Ah that's a good tip, I did not realize how much was whitespace changes
@ezolenko Also, just for reference, I try to point out things one may consider as breaking in PRs too.
@CharlesStover generally there's a separate commit that ezolenko makes that only bumps versions. |
|
Yep, release process goes roughly like this:
|
|
That second point (about minor version bump) is a pure judgement call. Hopefully it would be more substantiated eventually if we get integrations tests and stuff. :) |
|
This is released in 0.32.1 btw |
It might be good to add your exact steps, specifically the commands you run, into a "Publishing" section (under "Development") in the new
💯 integration tests will probably be the next big thing I tackle as they're really starting to be necessary to make sure that some of the deeper bugfixes I'm making don't break a bunch of things. But even then, version bumps are always subjective to an extent. |
@rollup/plugin-commonjs to v22 to fix try/catch requires@rollup/plugin-commonjs to v22 to fix try/catch requires
@ezolenko this is a bit important as 0.32.0 is currently broken for some users. Ironically, I suggested calling out dependency changes in #332 (comment) and this issue is in fact due to a breaking change in a dependency. In a dev dependency at that!
Summary
Upgrade
@rollup/plugin-commonjsto v22.0.0 to fix a breaking change in v21.0.0 that broke the bundling ofgraphliband how it importslodash, breaking rpt2 as a whole.ReferenceError: window is not definedin 0.32.0 #339Details
v21 broke
graphlib's internal usage oflodashwith its breaking change, and v22 has another breaking change to fix thatgraphlibetc, meaning the nuances of the bundling got leaked to consumers, and, in fact, broke their buildsrun a build as well since that's necessary for/vital to this change
Can see more details in my root cause analysis in #339 (comment) and the comments leading up to that. rollup/plugins#1005 (comment) is the central bug that applies to this case too.
Review Notes
Note how massive a change it is to the
distdue to just changing the version of@rollup/plugin-commonjs. I can't even link to the line in the diff wheregraphlib's usage oflodashchanged because GitHub won't load a diff that big. I can confirm though that it does change that same area of code that was broken, and that testing this branch/PR in a user's repo resolved the issue.I was able to repro in a user's library but couldn't repro this in rpt2 itself (when it bundles itself as in) or in one of my libraries though, so it's possibly an environment dependent bug or a race condition.
This will need a release once merged.