Commit 29e767a
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/251958615721 parent 186eaa3 commit 29e767a
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments