Repository navigation
fix(javascript): preserve require writes through quoted prototypes - #8947
Draft
wunianze666-netizen wants to merge 1 commit into
Draft
wunianze666-netizen wants to merge 1 commit into
wunianze666-netizen wants to merge 1 commit into
Conversation
Contributor
[Medium impact] The code appears safe to merge; no actionable defects were found. SummaryThe PR fixes how static JavaScript analysis treats quoted
Reviews (1) · Last reviewed commit: "fix(javascript): preserve require writes..." · Reviewed by Greptile |
This branch has not been deployed
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
Keep ambient require writes visible when a with block uses a quoted prototype setter in its unscopables object. Fixes #8943.
Problem and expected behavior
The Windows CLI resolved
./dep.cjsafter awithblock whose assignment can replace the outer loader. A quoted non-computed"__proto__"setter onSymbol.unscopablessupplies an inherited truthyrequireentry. Its unquoted spelling already prevented that resolved link. A computed["__proto__"]property still leaves the with binding available. ECMAScript object initializer evaluation, Object Environment Record lookup.Change and scope
Use the shared object-literal prototype setter predicate for both literal checks in the with scope classifier. The existing conservative lookup preserves a possible outer loader write when the prototype is custom. The later call can then lose its resolved CommonJS dependency claim.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): None.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
build:cachedsucceeded. The same five Windows CLI fixtures passed after rebuilding. The actual named MCP tool matched the selected CLI edges for all five and passed its advertised input and output schemas with Ajv.check:fast, touched-file formatting, andgit diff --checkpassed.3733bb662. Its merge checkout3089f24dhas the same tree as the PR head. Linux Source tests passed all 38 require-link cases, including the five new unscopables fixtures. The workflow recorded 18 successes and 22 conditional skips. The hosted Windows capability/package lane was skipped.Compatibility, safety, and release
Author readiness
Human owner: @wunianze666-netizen
Before merge
type(scope): outcome.