From 1c86fcafbec8a4e4600b664584c0484cbe803786 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Mon, 4 May 2026 10:55:22 -0400 Subject: [PATCH] fix: shadow global Symbol in symbol/async-iterator The JavaScript linting CI job failed on develop: lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js 42:65 error The 'Symbol.asyncIterator' is still an experimental feature and is not supported until Node.js 10.0.0. The configured version range is '>=0.12.18' n/no-unsupported-features/es-builtins Root cause: main.js referenced the global Symbol directly. The n/no-unsupported-features/es-builtins ESLint rule flags Symbol.asyncIterator as requiring Node >= 10.0.0, which exceeds the project configured minimum of >=0.12.18. Shadowing the global with var Symbol = require( '@stdlib/symbol/ctor' ) removes the global reference and resolves the violation. The local binding resolves to the native Symbol in environments where it exists, preserving runtime behavior identically. The sibling package symbol/to-primitive uses the same pattern for Symbol.toPrimitive, which is also flagged by the same rule. Failing run: https://github.com/stdlib-js/stdlib/actions/runs/25195861572 https://claude.ai/code/session_01KcDPB7otMv5FFbBc5N12mu --- lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js b/lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js index 9284324c6f69..aa50db80fc8c 100644 --- a/lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js +++ b/lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js @@ -21,6 +21,7 @@ // MODULES // var hasAsyncIteratorSymbolSupport = require( '@stdlib/assert/has-async-iterator-symbol-support' ); // eslint-disable-line id-length +var Symbol = require( '@stdlib/symbol/ctor' ); // MAIN //