asn1js breaking changes
asn1js 4.1.0 (November 19, 2026) is its newest release with breaking changes, 28 of them. The first: Signature changed BaseStringBlock.checkValue. Every breaking API change we have recorded in asn1js on npm: 76 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 4.1.0, released November 19, 2026. Source repository
Its 4.0.0 release requires Node.js 20.19.0 or later. Node.js end of life dates.
asn1js 4.1.0 breaking changes
- Signature changed
BaseStringBlock.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
BaseStringBlock.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
BmpString.checkValue
Was protected checkValue(view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
BmpString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
CharacterString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
CharacterString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
GeneralString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
GeneralString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
GraphicString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
GraphicString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
IA5String.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
IA5String.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
Null.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
NumericString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
NumericString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
PrintableString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
PrintableString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
TeletexString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
TeletexString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
UniversalString.checkValue
Was protected checkValue(view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
UniversalString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
Utf8String.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
Utf8String.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
verifySchema
Was function verifySchema(inputBuffer: BufferSource, inputSchema: AsnSchemaType): CompareSchemaResult; now function verifySchema(inputBuffer: BufferSource, inputSchema: AsnSchemaType, options?: FromBerOptions): CompareSchemaResult. npmjs.com - Signature changed
VideotexString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
VideotexString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com - Signature changed
VisibleString.checkValue
Was protected checkValue(_view: Uint8Array): string; now protected checkValue(view: Uint8Array, context?: FromBerContext): string. npmjs.com - Signature changed
VisibleString.fromBER
Was fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number): number; now fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number, inputLength: number, context?: FromBerContext): number. npmjs.com
asn1js 4.0.0 breaking changes
- Removed
Node.js versions below 20.19 and 22.0-22.11 are no longer supported. Upgrade Node.js before updating. github.com - Removed
Code that relied on pvtsutils or pvutils coming through asn1js must add its own dependency on @peculiar/utils or the original packages. github.com - Removed
Use require("asn1js") through require(esm) on supported Node.js, or import it as an ES module. TypeScript CommonJS projects need "module" set to "node20" or "nodenext". github.com - Behavior changed
Import only the package entry point; deep imports into build/ no longer resolve. github.com - Behavior changed
BMPString
Decoding an odd-length BMPString returns a decode error rather than throwing, so code that catches exceptions must check for the error result. github.com - Behavior changed
Integer
Pass whole numbers only. Non-integer values that v3 truncated now throw a RangeError. github.com - Behavior changed
UniversalString
Characters outside the BMP now encode as a single UCS-4 code point instead of a surrogate pair, so the encoded bytes change. github.com - Behavior changed
UTCTime
Encoding a UTCTime with a year outside 1950-2049, including via valueDate, now throws a RangeError. Use GeneralizedTime for other years. github.com - Behavior changed
valueDec
Assign whole numbers only. Non-integer values that v3 truncated now throw a RangeError. github.com - Signature changed
BaseBlockParams.valueBeforeDecode
Was valueBeforeDecode?: pvtsutils.BufferSource; now valueBeforeDecode?: BufferSource. npmjs.com
And 33 more in this version. Sign up to see every change
asn1js 3.1.0 breaking changes
- Behavior changed
GeneralizedTime
GeneralizedTime values with fractional seconds are now encoded in DER without trailing zeros, so encoded bytes can differ from earlier versions. Code that compares or stores encoded output may need to be updated. github.com - Signature changed
HexBlock
Was function HexBlock<T extends LocalBaseBlockConstructor>(BaseClass: T): {new (...args: any[]): {isHexOnly: boolean; valueHex: ArrayBuffer; valueHexView: Uint8Array; fromBER(inputBuffer: ArrayBuffer | Uint8Array, inputOffset: number... npmjs.com - Signature changed
RawDataParams
Was type RawDataParams = Partial<IRawData>; now type RawDataParams = {data?: ArrayBuffer | Uint8Array;}. npmjs.com - Signature changed
RawDataParams.data
Was data: ArrayBuffer; now data?: ArrayBuffer | Uint8Array. npmjs.com - Signature changed
ViewWriter.write
Was write(buf: ArrayBuffer): void; now write(buf: ArrayBuffer | Uint8Array): void. npmjs.com
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.