Skip to content

Conversation

ferdinando-ferreira
Copy link
Contributor

@ferdinando-ferreira ferdinando-ferreira commented Sep 10, 2018

Given that it is a simple removal there was no need to import a new dependency (rimraf, for instance)

Type

  • Refactor

Issues

SemVer

  • Patch

@codecov
Copy link

codecov bot commented Sep 10, 2018

Codecov Report

Merging #1498 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1498   +/-   ##
=======================================
  Coverage   74.02%   74.02%           
=======================================
  Files          10       10           
  Lines         666      666           
=======================================
  Hits          493      493           
  Misses        173      173

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 3d37cc5...0cb8ab3. Read the comment docs.

@michael-ciniawsky michael-ciniawsky changed the title Fixes instalation / preparation script (no rm command on Windows) refactor(package): cross-platform prepare script (scripts) Sep 10, 2018
@michael-ciniawsky michael-ciniawsky added this to the 3.1.8 milestone Sep 10, 2018
@ferdinando-ferreira
Copy link
Contributor Author

Please use e.g del-cli or rimraf instead and remove this file

"prepare: "del-cli ssl/*.pem && ..."
- "prepare:delete-certs: ..."

@michael-ciniawsky: done and done. Although I have no objection to the requested changes (and implemented as requested) the original decision to create a custom delete with a standalone rule was

  • to avoid pulling a dependency for something as trivial as removing some files from a folder
  • to allow for the certificates to be removed from the folder even when prepare is not called directly.

package.json Outdated
"test": "nyc --reporter lcovonly mocha --full-trace --check-leaks --exit",
"prepare": "npm run -s prepare:delete-certs && npm run -s transpile:index && npm run -s build:live && npm run -s build:index && npm run -s build:sockjs",
"prepare:delete-certs": "node lib/delete-certs.js",
"prepare:delete-certs": "./node_modules/.bin/rimraf ./ssl/*.pem",
Copy link
Member

Choose a reason for hiding this comment

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

you can avoid ./node_modules/.bin/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@michael-ciniawsky beat you to the punch. Already fixed :)

@michael-ciniawsky
Copy link
Member

to avoid pulling a dependency for something as trivial as removing some files from a folder

While e.g rimraf may contain slightly more code, it fits the use case (cross-platform rm), is tested and clearly separates itself from the rest of the code base (e.g delete-certs.js wouldn't have belonged into lib, since it's a build helper). Size doesn't really matter here since this module doesn't run in e.g the browser

to allow for the certificates to be removed from the folder even when prepare is not called directly.

You could propose a clean script and refactored it out of prepare, if it has a concrete benefit/use case. But please open a separate PR for this

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

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

@michael-ciniawsky
Copy link
Member

@ferdinando-ferreira Please sign the CLA

@ferdinando-ferreira
Copy link
Contributor Author

ferdinando-ferreira commented Sep 10, 2018

@michael-ciniawsky:

licence/cla Expected — Waiting for status to be reported

I believe I have to wait until the cla system somehow update it's status. Maybe something related to cla-assistant/cla-assistant#124?

@ferdinando-ferreira
Copy link
Contributor Author

@michael-ciniawsky: licence/cla stuck at

Expected — Waiting for status to be reported

May be related to cla-assistant/cla-assistant#303 and cla-assistant/cla-assistant#124, should I do something?

@michael-ciniawsky michael-ciniawsky merged commit cbe6813 into webpack:master Sep 10, 2018
@ferdinando-ferreira ferdinando-ferreira deleted the fix-rm branch September 10, 2018 20:28
@michael-ciniawsky michael-ciniawsky removed this from the 3.1.10 milestone Oct 8, 2018
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