Skip to content

Commit 29e767a

Browse files
committed
fix: shadow global Symbol in async-iterator to resolve lint
The CI JavaScript lint job on develop has been failing since 2026-05-01: 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. (n/no-unsupported-features/es-builtins) Root cause: the file references the global `Symbol.asyncIterator` directly. The `n/no-unsupported-features/es-builtins` rule flags any global `Symbol.*` access when the configured engine range (`>=0.12.18`) predates Node.js 10. Adding a local `var Symbol = require( '@stdlib/symbol/ctor' )` shadows the global, resolving the rule without altering runtime behavior (the `hasAsyncIteratorSymbolSupport()` guard already short-circuits the ternary on environments where the local Symbol would be undefined). This pattern is identical to `@stdlib/symbol/to-primitive` (line 24). Failing run: https://github.com/stdlib-js/stdlib/actions/runs/25195861572
1 parent 186eaa3 commit 29e767a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • lib/node_modules/@stdlib/symbol/async-iterator/lib

lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var hasAsyncIteratorSymbolSupport = require( '@stdlib/assert/has-async-iterator-symbol-support' ); // eslint-disable-line id-length
24+
var Symbol = require( '@stdlib/symbol/ctor' );
2425

2526

2627
// MAIN //

0 commit comments

Comments
 (0)