-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Bump deps to latest major version and other misc dev UX #146
Conversation
…change in babel-plugin-polyfill-corejs3 0.8.0
Just a couple of tangentially-related notes: I would like to move to the ESLint flat config format before our configs get too complex. Since it's currently mostly just rules, porting shouldn't be too bad. But I want to use Does The lack of trailing commas drives me a bit nuts (merge conflicts...), but I'm not going to change it at least until there are fewer pending PRs. |
I normally run
Yes, I've went through 3 versions of
I don't have any experience with flat configs because it was only a few weeks ago that |
Any particular reason why? I find that having squigglies in the editor for formatting issues just get in the way so I usually just setup my dev workflows to have auto formatting be as behind-the-scenes as possible. In addition, mixing prettier issues with ESLint means that if you ever want to make automated PR code reviews from ESLint running in GH workflows, prettier errors will bleed in and spew dozens of garbage reviews when a simple "this PR needs to be formatted with prettier" status check would suffice. |
I like to see what changes formatters are making, including so that I'm less likely to be surprised by them mangling code. The ESLint plugin seems to be the recommended way to accomplish that. In my experience the output for automated checks on PRs isn't that bad, but I suppose it could be worked around if it becomes an issue. We have automatic linting of PRs with |
…t excludes by default
…'t associate the JSDoc type declaration properly
... Quality GitHub UX design. |
Done. Do you want me configure lint-staged to run ESLint and tsc as well? |
Not in this PR. I'd like to get a new release done ASAP. |
If time is the issue, I already have the config done for a previous project. I just need to paste it in. |
I guess if you can do it in like the next 30 minutes. |
Done. |
Oops. I just realized, I forgot to add |
Just ran into this error while testing. No idea whether it's related to this PR.
It's on the line with e = [{
key: "init",
value: (r = v(d().mark((function t() {
var e, r, n, o, i, a, s, c = this;
return d().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return n = Kt(this.videoID).substring(0, 4),
o = ["sponsor", "intro", "outro", "interaction", "selfpromo", "music_offtopic"],
t.next = 4,
fetch(Et(e = Et(r = "".concat("https://sponsorblock.inf.re/api", "/skipSegments/")).call(r, n, "?categories=")).call(e, encodeURIComponent(Nt(o)))); Looks like it corresponds to this: const videoHash = sha256(this.videoID).substring(0, 4); Is it possible to manually specify a source map for a userscript (it seems to always appear as |
We can swap from |
Thanks, that does work. But I'm still not sure how |
Does webpack strip source maps from production bundles? Have you tested the dev bundle? Sorry, I'll be unavailable for the next half hour or so. |
Changing import * as sha256 from 'tiny-sha256'; to import sha256 from 'tiny-sha256'; fixes the issue. But I don't actually know JavaScript, so I have no idea why. |
The former collects all exports into an object while the latter only uses the default export for ESM. For CommonJS interop, most bundlers will convert |
So some change to webpack/babel/whatever in this PR means the latter form is now required? |
Yes. It's standard practice anyways. The former is a holdover from when ESM was new and bundler devs didn't really know how interop should work. |
I think it's working, but I can't really test it because the SponsorBlock server seems to be down. |
Changes
babel-plugin-polyfill-corejs3
's breaking change is described eloquently here: [Bug]: Babel attempts to use wrong runtime helpers in version 7.22 babel/babel#15663 (comment)type-check
script and added all required@types
todevDependencies
"type": "module
topackage.json
. This means.js
files ran by Node will be interpreted as ESM by default.lint-staged
now runs ESLint and tsc as well.