Issue written by Claude:
Problem
This is now the second manual removal of an ESM-only package from bin/snapshot-libs.js:
f3e0d352 removed color-convert and color-string
- The recent Fixes commits removed
open
The pattern will repeat with every dependency that upgrades from CJS to ESM. Each time, pnpm install silently succeeds but the snapshot build fails at runtime with:
SyntaxError: Cannot use import statement outside a module
Root cause
bin/mk-snapshot.js already has a shouldExcludeModule callback with an empty excludedModules map — the right hook to auto-filter ESM-only packages. It is never populated.
Suggested fix
At snapshot build time, walk the node_modules of each entry in snapshot-libs.js and auto-exclude any package whose package.json declares "type": "module", rather than waiting for the failure and removing entries by hand.
Issue written by Claude:
Problem
This is now the second manual removal of an ESM-only package from
bin/snapshot-libs.js:f3e0d352removedcolor-convertandcolor-stringopenThe pattern will repeat with every dependency that upgrades from CJS to ESM. Each time,
pnpm installsilently succeeds but the snapshot build fails at runtime with:Root cause
bin/mk-snapshot.jsalready has ashouldExcludeModulecallback with an emptyexcludedModulesmap — the right hook to auto-filter ESM-only packages. It is never populated.Suggested fix
At snapshot build time, walk the
node_modulesof each entry insnapshot-libs.jsand auto-exclude any package whosepackage.jsondeclares"type": "module", rather than waiting for the failure and removing entries by hand.