goal
Remove the @metreeca/core/base64 module (or deprecate then remove) once V8 / Node.js expose the native
Uint8Array.prototype.toBase64 / Uint8Array.fromBase64 APIs unflagged, so consumers can use the standard APIs
directly.
scope
- Monitor Node.js releases for the version where the feature becomes default-on (currently gated behind the V8
--js-base-64 experimental flag through Node 24.x; already Baseline 2025 in evergreen browsers).
- Bump
engines.node in package.json to the minimum Node.js version that ships the feature unflagged.
- Delete
src/standard/base64.ts and src/standard/base64.test.ts, or mark encodeBase64 / decodeBase64
@deprecated with migration guidance pointing at the native API, then remove in a later major.
- Drop the
./base64 export from package.json.
- Remove the row and the description-list reference from
README.md.
- Log the change under
CHANGELOG.md → Removed / Deprecated.
acceptance criteria
dependencies
- V8 unflagging the
--js-base-64 experimental flag
- Node.js release shipping the unflagged V8
- Willingness to raise the minimum Node.js version
notes
Current wrapper exists only because the native path is flagged on Node; browsers have been Baseline since
September 2025 (Chrome 140, Firefox 133, Safari 18.2). Native migration target:
function encodeBase64(plain: string): string {
return new TextEncoder().encode(plain).toBase64({ alphabet: "base64url", omitPadding: true });
}
function decodeBase64(encoded: string): string {
return new TextDecoder().decode(Uint8Array.fromBase64(encoded, { alphabet: "base64url" }));
}
Project baseline to watch alongside this: tsconfig.json target: "ES2022", module: "NodeNext" — likely needs a
lib bump once TypeScript ships types for toBase64 / fromBase64 in its default lib. See the > [!NOTE] panel at
the top of src/standard/base64.ts for the full background.
goal
Remove the
@metreeca/core/base64module (or deprecate then remove) once V8 / Node.js expose the nativeUint8Array.prototype.toBase64/Uint8Array.fromBase64APIs unflagged, so consumers can use the standard APIsdirectly.
scope
--js-base-64experimental flag through Node 24.x; already Baseline 2025 in evergreen browsers).engines.nodeinpackage.jsonto the minimum Node.js version that ships the feature unflagged.src/standard/base64.tsandsrc/standard/base64.test.ts, or markencodeBase64/decodeBase64@deprecatedwith migration guidance pointing at the native API, then remove in a later major../base64export frompackage.json.README.md.CHANGELOG.md→Removed/Deprecated.acceptance criteria
engines.noderaised to the first version that shipsUint8Array.toBase64/fromBase64unflaggedsrc/standard/base64.tsremoved, or marked@deprecatedwith migration snippet./base64export removed frompackage.json(when fully removed)README.mdupdatedCHANGELOG.mdentry added under[Unreleased]dependencies
--js-base-64experimental flagnotes
Current wrapper exists only because the native path is flagged on Node; browsers have been Baseline since
September 2025 (Chrome 140, Firefox 133, Safari 18.2). Native migration target:
Project baseline to watch alongside this:
tsconfig.jsontarget: "ES2022",module: "NodeNext"— likely needs alibbump once TypeScript ships types fortoBase64/fromBase64in its default lib. See the> [!NOTE]panel atthe top of
src/standard/base64.tsfor the full background.