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

src: namespace config file flags #57170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marco-ippolito
Copy link
Member

follow-up: #57016 (comment)

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 21, 2025
@marco-ippolito marco-ippolito force-pushed the namespacing-config-file branch from e2a1d89 to 453c339 Compare February 21, 2025 14:59
@marco-ippolito
Copy link
Member Author

🤔 no code-owners... wonder who I should ping, or create a team

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.35%. Comparing base (8fc919d) to head (c9fe4d6).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/node_config_file.cc 95.65% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57170   +/-   ##
=======================================
  Coverage   90.35%   90.35%           
=======================================
  Files         629      629           
  Lines      184308   184394   +86     
  Branches    36015    36027   +12     
=======================================
+ Hits       166532   166617   +85     
+ Misses      10909    10902    -7     
- Partials     6867     6875    +8     
Files with missing lines Coverage Δ
lib/internal/options.js 100.00% <100.00%> (ø)
src/node_config_file.cc 71.96% <95.65%> (+8.94%) ⬆️

... and 25 files with indirect coverage changes

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

I would rather not use the namespace and just specify a specific file that we use instead of letting the user define the filename.

@marco-ippolito
Copy link
Member Author

I would rather not use the namespace and just specify a specific file that we use instead of letting the user define the filename.

I added the default file in #57171, about namespacing I think its a necessary evil, otherwise we will regret it if the feature grows

@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 21, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 21, 2025
@nodejs-github-bot
Copy link
Collaborator

@GeoffreyBooth
Copy link
Member

🤔 no code-owners... wonder who I should ping, or create a team

I think we need a @nodejs/cli team or something, to cover this feature and --env-file. Please add me if you create one.

Copy link
Member

@GeoffreyBooth GeoffreyBooth left a comment

Choose a reason for hiding this comment

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

There was discussion in old issues about supporting various environments, like top-level fields such as dev or localhost or prod etc. I don't have an opinion as to how multiple environments or multiple config files should be handled, but I feel like this is something to be worked out now as we're discussing namespacing. If the answer is that we're just not going to provide any explicit support for merging config files or supporting multiple environments within one config file, that's fine, but I think we should have that discussion.

"watch-path": "src",
"watch-preserve-output": true
"nodeOptions": {
"experimental-transform-types": true,
Copy link
Member

Choose a reason for hiding this comment

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

Can we support all of experimental-transform-types, experimental_transform_types and experimentalTransformTypes for each flag? Just as currently the CLI supports either of the first two.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm ok with the second, not sure how feasible is the third one. I think we can defer to a followup

@marco-ippolito
Copy link
Member Author

I dont think we should support different environments in the same file, users can use the dev.config.json and the prod.config.json

@nodejs-github-bot
Copy link
Collaborator

@marco-ippolito marco-ippolito force-pushed the namespacing-config-file branch from 83e5231 to c9fe4d6 Compare February 22, 2025 09:32
@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 22, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 22, 2025
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants