Skip to content

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

Merged
hiroppy merged 3 commits into
webpack:nextfrom
knagaitsev:stdin-option-next
Aug 10, 2019
Merged

feat(server): add stdin option to API#2186
hiroppy merged 3 commits into
webpack:nextfrom
knagaitsev:stdin-option-next

Conversation

@knagaitsev

Copy link
Copy Markdown
Contributor
  • 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

@alexander-akait alexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/cc @hiroppy

Comment thread test/cli/cli.test.js Outdated
);
const childProcess = testBin(false, configPath, true);

setTimeout(() => {

Copy link
Copy Markdown
Contributor

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)

Comment thread test/cli/cli.test.js Outdated
childProcess.stdin.pause();
}, 500);

setTimeout(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread test/cli/cli.test.js Outdated
);
const childProcess = testBin('--stdin', configPath);

setTimeout(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

@codecov

codecov Bot commented Aug 10, 2019

Copy link
Copy Markdown

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

codecov Bot commented Aug 10, 2019

Copy link
Copy Markdown

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

hiroppy commented Aug 10, 2019

Copy link
Copy Markdown
Contributor

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