Conversation
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
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
symbol/async-iterator
1 task
kgryte
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a persistent CI lint failure in
@stdlib/symbol/async-iterator.Root cause: The file referenced the global
Symbol.asyncIteratordirectly. Then/no-unsupported-features/es-builtinsESLint rule flagsSymbol.asyncIterator(available from Node 10.0.0) when the configured Node version range is>=0.12.18, treating the access as unsupported.Fix: Shadow the global
Symbolwith the stdlib polyfill@stdlib/symbol/ctor, which resolves to the nativeSymbolwhen available ornullotherwise. The rule no longer flags the member access because the local variableSymbolis not a known built-in being tracked. This pattern is already used in@stdlib/symbol/to-primitive.Files changed
lib/node_modules/@stdlib/symbol/async-iterator/lib/main.js— addvar Symbol = require( '@stdlib/symbol/ctor' );in the MODULES sectionTest plan
node lib/node_modules/@stdlib/symbol/async-iterator/examples/index.js— verify no runtime errorn/no-unsupported-features/es-builtinsno longer fires