From a1084d5637d417aef5a7f7b57626595c88d47058 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 14:14:00 +0000 Subject: [PATCH 1/2] fix(@stdlib/string/base/atob): guard against undefined `atob` global The job `Node.js v12` and `Node.js v14` on workflow `linux_test` failed on develop with `ReferenceError: atob is not defined` when requiring `@stdlib/string/base/atob`. Root cause: `lib/global.js` referenced the bare `atob` identifier at module-evaluation time; Node.js versions below v16 do not expose `atob` as a global, so `require()` throws before `lib/index.js` ever gets a chance to route to the polyfill via `@stdlib/assert/has-atob-support`. This commit guards the reference with `typeof atob === 'function'`, mirroring the established pattern used by `@stdlib/assert/has-atob-support/lib/atob.js` and `@stdlib/utils/global/lib/global.js`, so that requiring the module no longer throws on environments lacking a native `atob`. Ref: https://github.com/stdlib-js/stdlib/actions/runs/29681875444 --- lib/node_modules/@stdlib/string/base/atob/lib/global.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/string/base/atob/lib/global.js b/lib/node_modules/@stdlib/string/base/atob/lib/global.js index 2d8f761f1dc2..491962d727f2 100644 --- a/lib/node_modules/@stdlib/string/base/atob/lib/global.js +++ b/lib/node_modules/@stdlib/string/base/atob/lib/global.js @@ -18,6 +18,11 @@ 'use strict'; +// MAIN // + +var main = ( typeof atob === 'function' ) ? atob : null; + + // EXPORTS // -module.exports = atob; +module.exports = main; From f36ff4f7ec11e98b064ea451ad692e068e88c26f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 14:19:21 +0000 Subject: [PATCH 2/2] fix(@stdlib/string/base/atob): silence unsupported-node-builtin lint rule The `Lint Changed Files` check on PR #13557 failed on `global.js` with `n/no-unsupported-features/node-builtins`: the `eslint-plugin-n` rule flags the guarded `atob` reference because the package's configured minimum supported Node.js version is below v16.0.0, when `atob` first became a global. The reference is intentionally guarded via `typeof` for exactly this reason, matching the same pattern already used elsewhere in the codebase for other version-gated builtins, e.g. `@stdlib/os/homedir/lib/index.js`. This commit adds the matching `eslint-disable-line` comment so the lint check passes without changing runtime behavior. Ref: https://github.com/stdlib-js/stdlib/actions/runs/29690512042 --- lib/node_modules/@stdlib/string/base/atob/lib/global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/string/base/atob/lib/global.js b/lib/node_modules/@stdlib/string/base/atob/lib/global.js index 491962d727f2..410b2879eccc 100644 --- a/lib/node_modules/@stdlib/string/base/atob/lib/global.js +++ b/lib/node_modules/@stdlib/string/base/atob/lib/global.js @@ -20,7 +20,7 @@ // MAIN // -var main = ( typeof atob === 'function' ) ? atob : null; +var main = ( typeof atob === 'function' ) ? atob : null; // eslint-disable-line n/no-unsupported-features/node-builtins // EXPORTS //