@peculiar/x509 breaking changes
@peculiar/x509 3.1.0 (October 27, 2026) is its newest release with breaking changes, 2 of them. The first: Chain building now validates trust anchors and clarifies search diagnostics in @peculiar/x509 3.1.0. Every breaking API change we have recorded in @peculiar/x509 on npm: 28 breaking changes in 5 versions. Below, its 5 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 3.1.0, released October 27, 2026. Source repository
Its 3.0.0 release requires Node.js 20.19.0 or later. Node.js end of life dates.
- From 2.2.0 to 3.1.0: 11 breaking changes in 2 versions.
- From 2.0.0 to 3.1.0: 27 breaking changes in 4 versions.
@peculiar/x509 3.1.0 breaking changes
- Behavior changed
Trust anchors passed to chain building are now validated, and search diagnostics were reworded. Code relying on previous lax anchor handling may now see errors. github.com - Signature changed
Chain build error construction switched to named parameters, so code constructing these errors positionally must be updated. github.com
@peculiar/x509 3.0.0 breaking changes
- Removed
The build/x509.cjs.js and build/x509.es.js files are gone and replaced by build/index.js. github.com - Removed
The unpkg and jsdelivr fields are removed, so CDN loading through those fields no longer works. github.com - Removed
Deep imports into the package's internal paths are blocked by the exports field and will fail. github.com - Removed
The package now requires Node.js ^20.19.0 || >=22.12.0, so older Node.js versions in those ranges must be upgraded. github.com - Removed
The browser script build/x509.js with the x509 global is removed. Browsers must use the ESM build through a bundler or esm.sh, or pin version 2. github.com - Removed
pvtsutils
The pvtsutils dependency is replaced by @peculiar/utils version 4. github.com - Behavior changed
Input that continues after the encoded ASN.1 structure now throws an error instead of being accepted with the extra bytes kept in rawData. Strip any trailing bytes before parsing. github.com - Configuration changed
TypeScript projects compiling to CommonJS must set module to node20 or nodenext; node16 fails with TS1479. github.com - Configuration changed
@peculiar/asn1-schema ^3.0.0 is now a peer dependency and the @peculiar/asn1-* dependencies moved to 3. ASN.1 objects from asn1-schema 2 packages can no longer be passed in. github.com
@peculiar/x509 2.2.0 breaking changes
- Signature changed
GeneralName.constructor
Was constructor(asn: asn1X509.GeneralName) constructor(raw: BufferSource); now constructor(asn: asn1X509.GeneralName, options?: ParseOptions) constructor(raw: BufferSource, options?: ParseOptions). npmjs.com - Signature changed
GeneralNames.constructor
Was constructor(raw: BufferSource); now constructor(raw: BufferSource, options?: ParseOptions). npmjs.com
@peculiar/x509 2.1.0 breaking changes
- Behavior changed
Revoked certificate serial numbers in generated CRLs are now encoded as positive INTEGERs, so the encoded CRL bytes differ from earlier versions. github.com - Signature changed
AsnData.constructor
Was constructor(asn: T) constructor(raw: BufferSource, type: new () => T); now constructor(asn: T, options?: ParseOptions) constructor(raw: BufferSource, type: new () => T, options?: ParseOptions). npmjs.com - Signature changed
Attribute.constructor
Was constructor(raw: BufferSource); now constructor(raw: BufferSource, options?: ParseOptions). npmjs.com - Signature changed
AttributeFactory.create
Was static create(data: BufferSource): Attribute; now static create(data: BufferSource, options?: ParseOptions): Attribute. npmjs.com - Signature changed
Extension.constructor
Was constructor(raw: BufferSource); now constructor(raw: BufferSource, options?: ParseOptions). npmjs.com - Signature changed
ExtensionFactory.create
Was static create(data: BufferSource): Extension; now static create(data: BufferSource, options?: ParseOptions): Extension. npmjs.com - Signature changed
PemData.constructor
Was constructor(asn: T) constructor(raw: AsnEncodedType, type: new () => T); now constructor(asn: T, options?: ParseOptions) constructor(raw: AsnEncodedType, type: new () => T, options?: ParseOptions). npmjs.com - Signature changed
Pkcs10CertificateRequest.constructor
Was constructor(asn: CertificationRequest) constructor(raw: AsnEncodedType); now constructor(asn: CertificationRequest, options?: ParseOptions) constructor(raw: AsnEncodedType, options?: ParseOptions). npmjs.com - Signature changed
PublicKey.constructor
Was constructor(asn: SubjectPublicKeyInfo) constructor(raw: AsnEncodedType); now constructor(asn: SubjectPublicKeyInfo, options?: ParseOptions) constructor(raw: AsnEncodedType, options?: ParseOptions). npmjs.com - Signature changed
X509Certificate.constructor
Was constructor(asn: Certificate) constructor(raw: AsnEncodedType); now constructor(asn: Certificate, options?: ParseOptions) constructor(raw: AsnEncodedType, options?: ParseOptions). npmjs.com
And 4 more in this version. Sign up to see every change
@peculiar/x509 2.0.0 breaking changes
- Configuration changed
The package now requires the reflect polyfill to be present. Code that relied on it not being needed must load the polyfill itself. github.com
Related packages
- @peculiar/asn1-android
- @peculiar/asn1-cms
- @peculiar/asn1-csr
- @peculiar/asn1-ecc
- @peculiar/asn1-pfx
- @peculiar/asn1-pkcs8
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.