Skip to content

build(deps)!: move webcrypto-core, asn1-schema and json-schema to peer dependencies - #99

Merged
donskov merged 1 commit into
masterfrom
donskov/webcrypto-6-peers
Oct 27, 2026
Merged

donskov merged 1 commit into
masterfrom
donskov/webcrypto-6-peers

Conversation

@donskov

@donskov donskov commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #98 (part 6 of 7 for @peculiar/webcrypto 2.0.0; merge in order).

webcrypto-core ^2.0.0, @peculiar/asn1-schema ^3.0.0, @peculiar/json-schema ^3.0.0 → peers (+ dev). src doesn't import asn1js (it comes as a peer of core/asn1-schema), so it isn't declared. No source changes; .oxlintrc.json is now byte-for-byte pvtsutils. JWK base64url results with core 2 are identical to 1.7.1 (new spec for EC d / RSA n).

BEGIN_COMMIT_OVERRIDE
build(deps)!: move webcrypto-core, asn1-schema and json-schema to peer dependencies

BREAKING CHANGE: webcrypto-core ^2.0.0, @peculiar/asn1-schema ^3.0.0 and @peculiar/json-schema ^3.0.0 are peer dependencies (1.x depended on webcrypto-core ^1.9.2, @peculiar/asn1-schema ^2.7.0 and @peculiar/json-schema ^1.1.12), and @peculiar/utils moves from ^2.0.2 to ^4.1.0. webcrypto parses keys with classes that webcrypto-core registers in the asn1-schema and json-schema storages, and CryptoKey is webcrypto-core's class, so an app needs exactly one copy of each. npm 7+ installs peers automatically; a conflicting major now fails at install (ERESOLVE) instead of at runtime. Code that uses webcrypto-core 1 next to webcrypto 2 gets a second core copy, and its CryptoKey class does not match the one webcrypto 2 exports.
END_COMMIT_OVERRIDE

@donskov
donskov force-pushed the donskov/webcrypto-5-utils branch from e5d2030 to 640fb71 Compare October 27, 2026 11:10
Base automatically changed from donskov/webcrypto-5-utils to master October 27, 2026 11:12
…r dependencies

webcrypto-core ^2.0.0, @peculiar/asn1-schema ^3.0.0 and
@peculiar/json-schema ^3.0.0 become peer dependencies (and dev
dependencies). webcrypto parses and serializes keys with classes that
webcrypto-core registers in the asn1-schema and json-schema storages,
and re-exports core's CryptoKey, so the app must have exactly one copy
of each. src doesn't import asn1js; it arrives as a peer of core and
asn1-schema. @peculiar/utils ^4.1.0 stays a regular dependency.

No source changes were needed. .oxlintrc.json now matches pvtsutils:
the import/namespace false positives on core.asn1.* are gone with
core 2. The base64url rules for EC and RSA JWK members, which core
decodes, are unchanged from 1.7.1 and covered by a spec.

BREAKING CHANGE: webcrypto-core ^2.0.0, @peculiar/asn1-schema ^3.0.0
and @peculiar/json-schema ^3.0.0 are peer dependencies (1.7.1 depended
on webcrypto-core ^1.9.2, @peculiar/asn1-schema ^2.7.0 and
@peculiar/json-schema ^1.1.12), and @peculiar/utils moves from ^2.0.2
to ^4.1.0. npm 7+ installs peers automatically; a conflicting major
now fails at install (ERESOLVE) instead of at runtime. Code that
uses webcrypto-core 1 next to webcrypto 2 gets a second core copy, and
its CryptoKey class does not match the one webcrypto 2 exports.
@donskov
donskov force-pushed the donskov/webcrypto-6-peers branch from f25c33c to 7c50fc2 Compare October 27, 2026 11:13
@donskov donskov self-assigned this Oct 27, 2026
@donskov
donskov merged commit 0a32299 into master Oct 27, 2026
1 check passed
@donskov
donskov deleted the donskov/webcrypto-6-peers branch October 27, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant