feat: add @constructive-io/noble-hashes — dual CJS+ESM fork#83
Merged
pyramation merged 1 commit intomainfrom May 11, 2026
Merged
feat: add @constructive-io/noble-hashes — dual CJS+ESM fork#83pyramation merged 1 commit intomainfrom
pyramation merged 1 commit intomainfrom
Conversation
…/hashes@2.2.0 Copies all source files from @noble/hashes v2.2.0 (MIT, Paul Miller) and builds with makage for dual CJS+ESM output. This avoids the 'Must use import to load ES Module' error that occurs when CJS code requires the ESM-only upstream package. - 19 source files copied unchanged (import extensions stripped for moduleResolution: node) - Paul Miller's MIT license preserved in package and dist - SHA-256 tests with NIST vectors + Node.js crypto cross-validation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Adds
@constructive-io/noble-hashes— a dual CJS+ESM fork of@noble/hashesv2.2.0 (MIT, Paul Miller).Why:
@noble/hashesv2.x is ESM-only ("type": "module"), which breaksrequire()in CJS environments (Jest, older Node tooling). Rather than patching every consumer, we maintain this fork with dual output via makage.What's included:
@noble/hashes@2.2.0.ts→ none) formoduleResolution: "node"makage buildproduces both CJS (dist/) and ESM (dist/esm/)LICENSE(copied todist/via post-build step since makage defaults to the monorepo root license)cryptoBuild verified: CJS
require()and ESMimportboth produce correct SHA-256 output.Review & Testing Checklist for Human
dist/LICENSEcontains Paul Miller's copyright (not the Constructive monorepo one) after runningpnpm buildin the packagepnpm testinpackages/noble-hashes— 9 tests should pass (NIST vectors + Node crypto cross-validation)@noble/hashes@2.2.0to confirm no unintended modificationsNotes
@noble/hashesas the dependency in@constructive-io/upload-client, fixing the ESM-only CI failures in constructive-db PR #1100..tsextensions, build, test, bump version.Link to Devin session: https://app.devin.ai/sessions/1a2b164e76c747dcb3f8f79ee76fa903
Requested by: @pyramation