chore: Bump deps & replace size-plugin-core#138
Conversation
|
Size Change: 0 B 🆕 Total Size: 0 B |
|
Er, what? 0B? CI reports otherwise: Current: Base: Perhaps I broke something, shall go digging. |
93ece0a to
aebfdfe
Compare
|
Size Change: -35.6 kB (-46.8%) 🎉 Total Size: 40.5 kB 📦 View Changed
|
317fba6 to
87e7c2f
Compare
| const newSizes = await plugin.readFromDisk(cwd); | ||
|
|
||
| // In case the build step alters a JSON-file, .... | ||
| await exec(`git reset --hard`); | ||
|
|
||
| const newSizes = await plugin.readFromDisk(cwd); | ||
|
|
There was a problem hiding this comment.
Technically a separate issue, though our repo being used as a test bed here brought it to light and it's a bit hard to demonstrate elsewhere.
We commit index.js to this repo, so we're tracking the artifact our action reports on. However, becasue we were running git reset --hard before collecting the new sizes (2 lines up), we actually were collecting the sizes already committed to this repo -- there would never be a size difference reported here.
Now this is a very niche but legitimate issue in any repo using this action to track artifacts that are committed.
| default: 'build' | ||
| compression: | ||
| description: 'The compression algorithm to use: "gzip" or "brotli"' | ||
| default: 'gzip' |
There was a problem hiding this comment.
We were previously relying on size-plugin-core picking a default but I think we should be explicitly passing an option in ourselves
size-plugin-core
| "@babel/core": "^7.29.0", | ||
| "@babel/preset-env": "^7.29.0", | ||
| "@rschristian/size-plugin": "^0.1.0", | ||
| "@types/jest": "^30.0.0", | ||
| "babel-jest": "^30.2.0", | ||
| "jest": "^30.2.0", | ||
| "microbundle": "^0.15.1", | ||
| "pretty-bytes": "^5.4.1" |
There was a problem hiding this comment.
All had to be upgraded in tandem I'm afraid
87e7c2f to
684b5a7
Compare
Supersedes #125
Mainly switches to a fork of
size-plugin-coreto cut down on unneeded weight. That plugin inlines some hefty (& outdated) modules that we don't make use of. Helps if we own/control it going forward too.Had to bump Microbundle & Babel to avoid parsing errors in the vaguely modern syntax used, then needed to bump Jest to support ESM -- props to them for finally fixing some of the ESM-related woes, worked w/ no issues after the bump. Finally, had to bump CI & target Node version as the fork uses
fs.globSyncwhich was added in Node 22. Node 22 however isn't available for actions, so to Node 24 we go. This seems fine, the action is pretty isolated & self-contained.