You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CommonJS model: writes to non-writable or frozen exports are modelled as taking effect #40
Found in the round-1 review of branch fix/commonjs-model-gaps (stacked on PR #29). It is probably older than that branch, since the model code involved is unchanged there.
In sloppy mode, a write to a non-writable or frozen property is silently ignored, but the model applies it:
Object.defineProperty(exports, 'run', { value: a }); exports.run = b; gives go -> b, while runtime is a. The same happens with { value: a, writable: false }.
exports.run = a; Object.freeze(exports); exports.run = b; gives go -> b, while runtime is a.
Baseline has no edge for either.
Fix direction: track writable: false and frozen state on the owned object, and drop later writes (or send the file to the pre-model path).
Activity