-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
refactor: backward compatible flags for dev server #2652
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2652 +/- ##
==========================================
- Coverage 95.70% 95.52% -0.19%
==========================================
Files 30 30
Lines 1491 1498 +7
Branches 429 430 +1
==========================================
+ Hits 1427 1431 +4
- Misses 64 67 +3
Continue to review full report at Codecov.
|
I don't know how to cover this in tests.. |
We can test after a new release of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
packages/serve/src/index.ts
Outdated
// new flag format | ||
// { flag1: {}, flag2: {} } | ||
return Object.values(flags); | ||
})(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simplify it, I will finish 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left it because it would be easier to simplify after - #2626, as both configs will be objects so easy merge
1449e1e
ccddd6a
to
1449e1e
Compare
Small refactor |
|
||
// New options format | ||
// { flag1: {}, flag2: {} } | ||
return Object.keys(options).map((key) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will avoid it after switch on object options (part of perf)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep thanks
What kind of change does this PR introduce?
fix/feat/refactor?
Did you add tests for your changes?
tested manually, no way to test rn
If relevant, did you update the documentation?
no need I think
Summary
we're migrating all flags to a single format, core/cli built in/server flags so this is to handle backward compatibility with dev server flags in migration to new format, once this is released we can go ahead with the migration
Ref webpack/webpack-dev-server#3213
Does this PR introduce a breaking change?
no
Other information