getodk / getodk/web-forms

Replace uses of atob and btoa with modern equivalents

Open
#776 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

### Description

Replace usage of [atob](https://developer.mozilla.org/en-US/docs/Web/API/Window/atob) with [Uint8Array.fromBase64()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64), and [btoa](https://developer.mozilla.org/en-US/docs/Web/API/Window/btoa) with [Uint8Array.toBase64()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64).

Requires dropping support for node 24 (and below) and updating the target library in tsconfig.

Initially raised in https://github.com/getodk/web-forms/pull/766#discussion_r3077824569

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository for uses of atob and btoa, then inspect tsconfig and the Node support configuration. Replace the calls with the specified Uint8Array methods, update the target library, and verify that support for Node 24 and below is dropped consistently with the issue and linked pull request discussion.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.