Skip to content

Conversation

@vincentfretin
Copy link

I didn't manage to run that project on an old version of Node.js with nvm,
so I updated webpack from version 4 to 5 so we can run the project on latest Node.js LTS 22.
I removed all babel transforms, none were used actually, also removed the unused zip-loader dependency.
webpack 5 doesn't include nodejs polyfills anymore, so it was easier to rewrite the zip worker, Claude Claude Opus 4.5 replaced unzip-js + Node.js polyfills with fflate - a modern, fast, pure JS zip library that works natively in browsers without polyfills. It's also smaller and faster.

const difficulty = difficultyBeatmap._difficulty;
const beatmapFilename = difficultyBeatmap._beatmapFilename;
if (beatFiles[beatmapFilename] === undefined) {
continue;
Copy link
Author

Choose a reason for hiding this comment

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

I asked about that particular change Claude did.

Original behavior: If beatFiles[beatmapFilename] was undefined, it would return from the callback and never call postMessage. This meant silent failure - the worker would just hang and never respond.

New behavior: With continue, we skip missing beatmaps but always call postMessage. If data.beats ends up empty, zip-loader properly emits songloaderror.

So the new code has better error handling - it fails gracefully with an error message instead of silently hanging.

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.

1 participant