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

feat(server): add stdin option to API #2186

Merged
merged 3 commits into from
Aug 10, 2019

Conversation

knagaitsev
Copy link
Collaborator

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes

Motivation / Use-Case

This makes stdin an option for both CLI and API, and helps in moving configuration changes out of the CLI for CLI refactor.

Same PR as #2106, but moved to next. It was faster to do this than an ugly rebase.

Breaking Changes

None, stdin will work the same as it did before on CLI.

Additional Info

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.

/cc @hiroppy

);
const childProcess = testBin(false, configPath, true);

setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

plz use timer. await timer(500)

childProcess.stdin.pause();
}, 500);

setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

ditto

);
const childProcess = testBin('--stdin', configPath);

setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@codecov
Copy link

codecov bot commented Aug 10, 2019

Codecov Report

Merging #2186 into next will increase coverage by 2.57%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #2186      +/-   ##
==========================================
+ Coverage   93.47%   96.05%   +2.57%     
==========================================
  Files          33       34       +1     
  Lines        1242     1191      -51     
  Branches      365      346      -19     
==========================================
- Hits         1161     1144      -17     
+ Misses         72       46      -26     
+ Partials        9        1       -8
Impacted Files Coverage Δ
lib/utils/createConfig.js 98.19% <0%> (+1.73%) ⬆️
lib/Server.js 97.11% <100%> (+0.01%) ⬆️
lib/utils/handleStdin.js 100% <100%> (ø)
client-src/clients/BaseClient.js 33.33% <0%> (-35.9%) ⬇️
client-src/clients/WebsocketClient.js 85.71% <0%> (+30.45%) ⬆️
client-src/clients/SockJSClient.js 100% <0%> (+39.47%) ⬆️

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 8d70774...cd26f64. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Aug 10, 2019

Codecov Report

Merging #2186 into next will increase coverage by 2.57%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #2186      +/-   ##
==========================================
+ Coverage   93.47%   96.05%   +2.57%     
==========================================
  Files          33       34       +1     
  Lines        1242     1191      -51     
  Branches      365      346      -19     
==========================================
- Hits         1161     1144      -17     
+ Misses         72       46      -26     
+ Partials        9        1       -8
Impacted Files Coverage Δ
lib/utils/createConfig.js 98.19% <0%> (+1.73%) ⬆️
lib/Server.js 97.11% <100%> (+0.01%) ⬆️
lib/utils/handleStdin.js 100% <100%> (ø)
client-src/clients/BaseClient.js 33.33% <0%> (-35.9%) ⬇️
client-src/clients/WebsocketClient.js 85.71% <0%> (+30.45%) ⬆️
client-src/clients/SockJSClient.js 100% <0%> (+39.47%) ⬆️

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 8d70774...cd26f64. Read the comment docs.

@hiroppy
Copy link
Member

hiroppy commented Aug 10, 2019

Need to update documentation.

@hiroppy hiroppy merged commit cf6ea3f into webpack:next Aug 10, 2019
@knagaitsev knagaitsev added gsoc Google Summer of Code scope: cli labels Aug 13, 2019
hiroppy pushed a commit that referenced this pull request Sep 10, 2019
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
hiroppy pushed a commit that referenced this pull request Dec 12, 2019
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
hiroppy pushed a commit that referenced this pull request Dec 18, 2019
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
hiroppy pushed a commit that referenced this pull request Dec 19, 2019
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
hiroppy pushed a commit that referenced this pull request Dec 23, 2019
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
hiroppy pushed a commit that referenced this pull request Dec 24, 2019
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
alexander-akait pushed a commit that referenced this pull request Jan 29, 2020
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
alexander-akait pushed a commit that referenced this pull request Jan 31, 2020
* feat(server): add stdin for api

* test(stdin): switch to async await tests for stdin

* test(cli): use await timer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Google Summer of Code scope: cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants