refactor/pool: modernize the seed cache index script, node: imports and top-level await #79
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/pool-seed-script-esm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #69, part of the SonarQube cleanup in #73. The embedded seed_cache_index script becomes an ES module, seed_cache_index.mjs, so the top-level promise chain Sonar flagged as javascript S7785 turns into a plain top-level await inside try and catch, with the same exit codes and stderr output as before. The four requires use the node: scheme for S7772, and npm's CommonJS cacache is loaded through createRequire since ESM has no bare require. realize.go follows the rename in its go:embed directive, scratch filename and comments, as do the two tests that name the file and one design doc. For S4036, npm is still resolved through PATH on purpose: Guix ships node and npm as separate store items, so there is no fixed absolute path, and the script only runs inside the wraptool-constructed guix or OCI backend. A comment above findCacache records that reasoning so the finding can be marked accepted on the server. The real node and npm integration test TestIntegration_ShrinkwrapSeeding executed the script end to end and passed along with all gates. 🤖 Generated with Claude Code