From 3670b4fd0f30557a5a188f3d4c32efc939e6ab7f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 15 Sep 2026 14:16:51 +0000 Subject: [PATCH] test(@stdlib/symbol/to-primitive): shadow global `Symbol` to resolve lint The job "Lint JavaScript files" in workflow `lint_random_files` failed on develop with an `n/no-unsupported-features/es-builtins` error on `test/test.js:50`, flagging the bare reference to the global `Symbol.toPrimitive` as unsupported under the repo's configured Node version floor (`>=0.12.18`; `Symbol.toPrimitive` requires Node 6+). Root cause: the test file never shadowed the global `Symbol`, unlike this package's own `lib/main.js`, which already imports `@stdlib/symbol/ctor` locally as `Symbol` for the same reason. This commit adds the identical shadow to the test file. `@stdlib/symbol/ctor` re-exports the global `Symbol` constructor unchanged, so the shadowed reference is referentially identical at runtime and the lint rule's scope analysis no longer treats it as a global-builtin reference, resolving the failure without altering test behavior. Ref: https://github.com/stdlib-js/stdlib/actions/runs/34911553402 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01NcrBJtjFWieVFKStqCyyYH --- lib/node_modules/@stdlib/symbol/to-primitive/test/test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/symbol/to-primitive/test/test.js b/lib/node_modules/@stdlib/symbol/to-primitive/test/test.js index 81bccda1da7c..25c4f77a0fa7 100644 --- a/lib/node_modules/@stdlib/symbol/to-primitive/test/test.js +++ b/lib/node_modules/@stdlib/symbol/to-primitive/test/test.js @@ -23,6 +23,7 @@ var tape = require( 'tape' ); var hasToPrimitiveSymbolSupport = require( '@stdlib/assert/has-to-primitive-symbol-support' ); var isSymbol = require( '@stdlib/assert/is-symbol' ); +var Symbol = require( '@stdlib/symbol/ctor' ); var Sym = require( './../lib' );