From 210eed52a4b90ad50a6ed34ba6ff9af587baf2f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 14:15:43 +0000 Subject: [PATCH 1/2] fix(@stdlib/string/base/atob): guard global `atob` reference to prevent ReferenceError The `linux_test` workflow's Node.js v12/v14 jobs failed on every scheduled run on develop with `ReferenceError: atob is not defined` at `lib/global.js:23`. Root cause: the file re-exported the bare `atob` identifier directly; on Node runtimes that predate the global `atob`/`btoa` (added in Node 16+), referencing an undeclared identifier without `typeof` throws at module-evaluation time, so merely requiring `main.js` (which requires `global.js` at its top level) crashed before any test ran. This commit guards the reference with `typeof atob === 'function'`, mirroring the identical, already-correct idiom used by the sibling `@stdlib/assert/has-atob-support` package, so requiring the module now yields `null` instead of throwing on environments lacking a global `atob`. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28785480753 --- 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 8ecb1dd77790c28b6d1a0445abedd15e3ea44399 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 14:22:41 +0000 Subject: [PATCH 2/2] fix(@stdlib/string/base/atob): silence eslint node-builtins rule for guarded `atob` reference The `lint_changed_files` CI check on PR #13329 flagged the guarded `typeof atob === 'function'` reference with `n/no-unsupported-features/node-builtins`, since the package's `engines` range (`>=0.12.18`) predates the stable global `atob`. This is the same intentional, guarded pattern already used for other version-gated globals (e.g. `@stdlib/bigint/ctor`, `@stdlib/proxy/ctor`), which disable the corresponding rule on the same line. Do the same here. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28798431195 --- 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 //