Skip to content

fix: assinging type for core flags #2455

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

Merged
merged 25 commits into from
Mar 15, 2021
Merged

fix: assinging type for core flags #2455

merged 25 commits into from
Mar 15, 2021

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
tests

Did you add tests for your changes?
yes
If relevant, did you update the documentation?
no
Summary
add test cases for --module-parser-javascript-url

Does this PR introduce a breaking change?
No

Other information
Related thread #2438 (comment)

@snitin315 snitin315 requested a review from a team as a code owner February 19, 2021 12:23
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

@snitin315
Copy link
Member Author

@alexander-akait
Copy link
Member

As you can see we have a bug on our side, we should support boolean values https://github.com/webpack/webpack/blob/2a0536cf510768111a3a6dceeb14cb79b9f59273/test/__snapshots__/Cli.test.js.snap#L2695

@alexander-akait
Copy link
Member

We need migration on configs from simpleType

@snitin315
Copy link
Member Author

Yes, I will do it.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

We have more bugs 😄

@snitin315 snitin315 changed the title test: add test cases for '--module-parser-javascript-url' fix: assinging type for core flags Feb 19, 2021
@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #2455 (2d7be4b) into master (4aa9ac5) will increase coverage by 0.70%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2455      +/-   ##
==========================================
+ Coverage   71.86%   72.56%   +0.70%     
==========================================
  Files          46       46              
  Lines        2186     2231      +45     
  Branches      583      602      +19     
==========================================
+ Hits         1571     1619      +48     
+ Misses        615      612       -3     
Impacted Files Coverage Δ
packages/webpack-cli/lib/webpack-cli.js 92.58% <92.85%> (+0.74%) ⬆️
packages/generators/src/types/index.ts 100.00% <0.00%> (ø)
packages/generators/src/utils/entry.ts 100.00% <0.00%> (ø)
packages/generators/src/utils/resolve-packages.ts 21.27% <0.00%> (ø)
packages/serve/src/startDevServer.ts 84.12% <0.00%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4aa9ac5...2d7be4b. Read the comment docs.

@snitin315 snitin315 force-pushed the test/module-parser branch 2 times, most recently from c2afaed to a82ce2c Compare February 22, 2021 03:06
meta.type = normalizeType(meta.simpleType);
if (meta.type === Boolean && !flag.endsWith('-reset')) {
meta.negative = true;
}
Copy link
Member

Choose a reason for hiding this comment

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

Some options can be only negative, i.e. --amd (doesn't exists), we have only --no-amd

@alexander-akait
Copy link
Member

I can help to finish if you want

@snitin315
Copy link
Member Author

I can help to finish if you want

That would be awesome, feel free to push a commit.

@alexander-akait
Copy link
Member

Solved locally, tomorrow I will send a PR

@alexander-akait
Copy link
Member

WIP on tests

@alexander-akait
Copy link
Member

Tests are hard, I need more time on this, WIP, hope finish it tomorrow

@alexander-akait
Copy link
Member

We really need rewrite tests, unfortunately I do not have time to rewrite the tests now, in the near future I will start to create roadmap and include example of testing for options

@alexander-akait
Copy link
Member

Added todo for macos tests, looks jest exit from tests and don't wait IO from node.js

@alexander-akait
Copy link
Member

I hate cache, again the problem with cache...

@alexander-akait alexander-akait merged commit f6ae0e1 into master Mar 15, 2021
@alexander-akait alexander-akait deleted the test/module-parser branch March 15, 2021 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants