Commit 1c86fca
committed
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_01KcDPB7otMv5FFbBc5N12mu1 parent 8238153 commit 1c86fca
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