Repository navigation
Release 0.2.2: fix the ESM entry and smoke-test packed consumers in PR CI - #44
Merged
Merged
Conversation
Use Ajv's explicit .js runtime path for Node ESM resolution. Make packed import failures fail the release smoke check.
Bump @helixar_ai/hdp, @helixar_ai/hdp-mcp, hdp-validate, and @helixar_ai/hdp-autogen from 0.2.1 to 0.2.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
import('@helixar_ai/hdp')fails for every ESM consumer of 0.2.1 withERR_MODULE_NOT_FOUND, on Node 20 and 22. The ESM build importsajv/dist/2020without a file extension, and ajv has noexportsmap, so Node's ESM resolver cannot find the file.require()is unaffected. The same failure reaches @helixar_ai/hdp-mcp and @helixar_ai/hdp-autogen, which load the core. The release smoke test already saw this and recorded it as a known failure, so 0.2.1 shipped with it.Change
src/schema/validator.tsimportsajv/dist/2020.js. Both the CommonJS and ESM builds resolve it, and the type declarations are unchanged. A scan of every published package's ESM output found no other extensionless deep imports..github/scripts/smoke-npm-release.shtreats a failed ESM import as a failure. The known-failure path is removed.ci.ymlruns the same packed-consumer smoke test on Node 20 and 22: it packs every npm package, installs the tarballs into an empty directory with fresh dependency resolution, then callsrequire()andimport()on each. This class of defect now fails a pull request instead of a release.v*tag publishes move to 0.2.2: @helixar_ai/hdp, @helixar_ai/hdp-mcp, @helixar_ai/hdp-autogen and hdp-validate. Python packages are unchanged and the tag does not publish them.json-canonicalizestays at exactly 2.0.0.Verification
ERR_MODULE_NOT_FOUND ... Did you mean to import "ajv/dist/2020.js"?. With the fix, all four packages passrequire()andimport()on Node 20 and 22, and thehdp-validateCLI runs.