Repository navigation
build: make every package publishable, released as @398ja/nap-* at 0.12.0 - #50
Merged
Merged
Conversation
added 2 commits
October 8, 2026 20:06
…12.0 Each package compiles to ESM + .d.ts in dist/ (tsc, dependency order) and its manifest now carries exports/main/module/types pointing there, files: ["dist"], sideEffects: false and publishConfig.access: public. A `nap-source` export condition keeps the workspace typecheck, tests and example on src/; release staging strips it. nostr-tools, @noble/hashes, @noble/curves and react become peer dependencies so a consumer gets one shared copy. Sibling deps are ^0.12.0 ranges. The adapters declare nap-core, which they import. nap-core imports @noble/hashes/sha2.js, the subpath both 1.x and 2.x export. scripts/release.mjs typechecks, tests, builds and publishes in dependency order (--dry-run, --pack). The registry scope is one setting, NAP_SCOPE (default @398ja); sibling deps are written as npm aliases so @imani/nap-* import names survive. scripts/publishing.test.ts pins the manifest contract and that the browser packages import no Node built-in. CI now builds and packs. Refs 398ja/imani-wallet#212
Critical advisory published after master's last green audit; master fails the same production audit. Only the lockfile entry moves: npm update/audit fix would also re-resolve express's qs below the 6.16.0 override.
Owner
Author
|
Added bb0ba84: |
added 2 commits
October 8, 2026 22:05
Root LICENSE, "license": "MIT" in every manifest, and release staging copies the LICENSE into each package so every tarball carries it.
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.
What
Makes all ten
@imani/nap-*packages publishable to npm and bumps them to 0.12.0. Nothing is published by this PR. Prepared for 398ja/imani-wallet#212, where the wallet build needs a../napsibling checkout.npm run buildcompiles every package withtscto ESM plus.d.tsinpackages/*/dist, in dependency order (scripts/build.mjs,tsconfig.build.base.json, and onetsconfig.build.jsonper package).exports(types/import/defaultpointing atdist/),main,module,types,files: ["dist"],sideEffects: false,publishConfig.access: public, plusrepository,homepageandbugs.nostr-toolsis a peer of nap-core, nap-server, nap-client-http, nap-client-web and nap-client-nip46.@noble/hashesis a peer of nap-core (^1.8.0 || ^2.0.0) and nap-voucher.@noble/curvesis a peer of nap-voucher.reactis a peer of nap-react, which never declared it before. The wallet therefore gets one copy of each.^0.12.0, not exact pins or workspace links.nap-sourceexport condition points atsrc/. The roottsconfig.json(customConditions),vitest.config.ts, the two tsc-driven tests and the example app all select it, sonpm testandnpm run typechecknever need a build. The condition is stripped from the published manifest.npm run release(scripts/release.mjs) typechecks, tests, builds, stages each package into.release/and publishes in dependency order.--dry-runrunsnpm publish --dry-runfor each package.--packwrites the tarballs with no credentials. A real release refuses to run withoutnpm whoamior from a dirty tree, and resumes past versions already published.NAP_SCOPEdefaults to@398ja. The code keeps importing@imani/nap-*. Published sibling dependencies are written as npm aliases, e.g."@imani/nap-core": "npm:@398ja/nap-core@^0.12.0", so the compiled JS needs no rewrite.NAP_SCOPE=@imanipublishes plain@imani/nap-*if that org is ever confirmed. SeeRELEASING.md.scripts/publishing.test.ts(part ofnpm test) asserts this on source, and release staging re-checks the compileddist/. Only nap-server importsnode:crypto, and it is not a browser package.@imani/nap-core, which they import. nap-core imports@noble/hashes/sha2.js(exported by both 1.x and 2.x) instead ofsha256(1.x only).Build and packstep. Docs updated: README, CLAUDE.md, integration guide §0.6/§4/§11.4, tutorial 01, UPGRADING and CHANGELOG[0.12.0].Not included:
feat/nonce-free-voucher-signature(77c4306, nap-voucher canonical bytes). It is unmerged and has no PR. This branch is cut frommaster(e07a586).Verification
End to end against a local Verdaccio, not npmjs:
npm run release -- --registry http://localhost:4873published all ten in order, and a rerun skipped all ten as already published. The wallet then installed from that registry (see the wallet PR). Plain Nodeimport('@imani/nap-*')of every built package loads.Publish order: nap-core, nap-server, nap-adapter-express, nap-adapter-fastify, nap-client-http, nap-client-web, nap-client-nip46, nap-react, nap-store-postgres, nap-voucher.
npm packcontents (scope@398ja)package.json,README.md,dist/{base64,codec,errors,hash,header,index,types,url,validate}.{js,d.ts}package.json,README.md,dist/{acl,audience,guard,index,memory,metrics,rateLimit,server,types}.{js,d.ts}package.json,README.md,dist/{adapter,index}.{js,d.ts}package.json,README.md,dist/{adapter,index}.{js,d.ts}package.json,README.md,dist/{client,index}.{js,d.ts}package.json,README.md,dist/{activityLock,broadcast,httpClient,index,keyStore,nip07,reunlock,secretStore,session,signerCapabilities,signerPreference,signers,storage,types,webCryptoSecretStore}.{js,d.ts}package.json,README.md,dist/{connection,errors,index,persistence,signer,timeout}.{js,d.ts}package.json,README.md,dist/{index,NapProvider,signingAccess,types,useNip07,useReunlock,useSignerPreference,useStoredConnection}.{js,d.ts}package.json,README.md,dist/index.{js,d.ts}package.json,README.md,dist/{allowlist,availability,dleq,index,mintClient,resolver,secret}.{js,d.ts}Published manifest, nap-client-web:
Before the first publish
@imaniorg exists on npm, owned by a user namedimani, with 0 packages.398jais not shown as a member.@398jais the publishing account's own scope (it already holdsnostr-chunked-eventsandnostr-app-storage), hence the default.license. npm will publish the packages as unlicensed. The owner should decide on a license before or soon after the first publish.Publish (owner, after merge, from the merge commit)
Refs 398ja/imani-wallet#212