Skip to content

fix: honor --use-strict for CommonJS scripts - #65248

Open
SomSamantray wants to merge 2 commits into
nodejs:mainfrom
SomSamantray:fix/30039-use-strict
Open

fix: honor --use-strict for CommonJS scripts#65248
SomSamantray wants to merge 2 commits into
nodejs:mainfrom
SomSamantray:fix/30039-use-strict

Conversation

@SomSamantray

Copy link
Copy Markdown

Issue

node --use-strict script.js did not apply strict mode to CommonJS scripts.

Fix

Pass the configured language mode to V8 when parsing wrapped CommonJS functions, and add regression coverage for the CLI behavior.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Aug 12, 2026
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (00f0f8c) to head (293b936).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #65248    +/-   ##
========================================
  Coverage   90.31%   90.31%            
========================================
  Files         760      760            
  Lines      248637   249130   +493     
  Branches    46942    47055   +113     
========================================
+ Hits       224556   225009   +453     
- Misses      15475    15525    +50     
+ Partials     8606     8596    -10     

see 39 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread test/parallel/test-cli-eval.js Outdated
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants