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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): check for external urls in array #1980

Merged
merged 4 commits into from Jul 1, 2019

Conversation

EslamHiko
Copy link
Member

  • 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

fixes : #1879

Breaking Changes

no

Additional Info

Tests pass then errors show up 馃槙 maybe because I use windows, let's see will CI be green or not.

@codecov
Copy link

codecov bot commented Jun 6, 2019

Codecov Report

Merging #1980 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1980      +/-   ##
==========================================
- Coverage    92.8%   92.73%   -0.08%     
==========================================
  Files          31       31              
  Lines        1181     1183       +2     
  Branches      329      328       -1     
==========================================
+ Hits         1096     1097       +1     
- Misses         81       82       +1     
  Partials        4        4
Impacted Files Coverage 螖
lib/Server.js 92.74% <100%> (+0.01%) 猬嗭笍
lib/utils/createConfig.js 91.89% <100%> (+0.07%) 猬嗭笍
client-src/default/utils/reloadApp.js 95.65% <0%> (-4.35%) 猬囷笍

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 a732303...2ac39d3. Read the comment docs.

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.

Two notes

@@ -0,0 +1,91 @@
'use strict';
Copy link
Member

Choose a reason for hiding this comment

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

});

describe('testing single & multiple internal paths', () => {
it('Should not throw exception (single line)', (done) => {
Copy link
Member

Choose a reason for hiding this comment

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

single line -> string

testServer.close(() => {
done();
});
done();
}
});
});

describe('testing single & multiple internal paths', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

tests in this part are not necessary, all other tests already test with valid contentBase.

@EslamHiko
Copy link
Member Author

@evilebottnawi since we have now is-absolute-url what about using it instead of Regex?

@alexander-akait
Copy link
Member

@EslamHiko yes, will be great 馃憤

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

@alexander-akait
Copy link
Member

Sorry for delay

@hiroppy hiroppy merged commit fa78347 into webpack:master Jul 1, 2019
@hiroppy
Copy link
Member

hiroppy commented Jul 1, 2019

Thanks!

@alexander-akait alexander-akait deleted the handle-array-paths branch July 1, 2019 16:09
@EslamHiko
Copy link
Member Author

@evilebottnawi no problems 馃槂. @hiroppy My pleasure 馃槃.

knagaitsev pushed a commit to knagaitsev/webpack-dev-server that referenced this pull request Jul 31, 2019
* fix: check for external urls in array

* test: move tests to contentBase

* fix: use is-absolute-url & add test case for number type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] handle remote content base paths in array
3 participants