Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: add validation for options in compileFunction #56023

Conversation

kimtaejin3
Copy link
Contributor

@kimtaejin3 kimtaejin3 commented Nov 27, 2024

This PR adds a validation step for the options parameter in the compileFunction method within lib/vm.js.

The validateObject function is used to ensure that options is an object, aligning with the validation approach used in other functions like measureMemory in lib/vm.js.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vm Issues and PRs related to the vm subsystem. labels Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.99%. Comparing base (9029aec) to head (8df7b68).
Report is 60 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56023      +/-   ##
==========================================
+ Coverage   87.95%   87.99%   +0.03%     
==========================================
  Files         656      656              
  Lines      188372   188960     +588     
  Branches    35979    35975       -4     
==========================================
+ Hits       165687   166275     +588     
- Misses      15851    15854       +3     
+ Partials     6834     6831       -3     
Files with missing lines Coverage Δ
lib/vm.js 99.28% <100.00%> (+<0.01%) ⬆️

... and 59 files with indirect coverage changes

Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind adding a test case for this? thank you!

@kimtaejin3 kimtaejin3 force-pushed the enhancement/compileFunction-options-validation branch 2 times, most recently from 4cdcf53 to bda151e Compare December 4, 2024 06:11
@kimtaejin3 kimtaejin3 force-pushed the enhancement/compileFunction-options-validation branch from bda151e to 8df7b68 Compare December 4, 2024 06:15
@kimtaejin3
Copy link
Contributor Author

kimtaejin3 commented Dec 4, 2024

@legendecas I added a test case, can you please check it?

@legendecas legendecas added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 4, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 4, 2024
@nodejs-github-bot
Copy link
Collaborator

@juanarbol juanarbol added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 5, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 5, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 6, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 6, 2024
@nodejs-github-bot nodejs-github-bot merged commit 56c8360 into nodejs:main Dec 6, 2024
67 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 56c8360

targos pushed a commit that referenced this pull request Dec 6, 2024
PR-URL: #56023
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56023
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56023
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56023
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
aduh95 pushed a commit that referenced this pull request Dec 18, 2024
PR-URL: #56023
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants