Skip to content

Make dir for babel --out-file#8622

Merged
nicolo-ribaudo merged 2 commits intobabel:masterfrom
TrySound:make-dir-out-file
Oct 29, 2019
Merged

Make dir for babel --out-file#8622
nicolo-ribaudo merged 2 commits intobabel:masterfrom
TrySound:make-dir-out-file

Conversation

@TrySound
Copy link
Copy Markdown
Contributor

@TrySound TrySound commented Sep 3, 2018

Currently there's unexpected regression after upgrade from babel 6.
On creating file with any depth like dist/index.js the error about
not existing directory is thrown.

In this diff I modified babel-cli to create deep directory for out-file
command.

I also replaced mkdirp with more supported make-dir package which
also have official promise support.

Q                       A
Fixed Issues?
Patch: Bug Fix? 6 -> 7 regression fix
Major: Breaking Change? no
Minor: New Feature? maybe
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? yes mkdirp -> make-dir
License MIT

Copy link
Copy Markdown
Member

@xtuc xtuc left a comment

Choose a reason for hiding this comment

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

Cool! thanks

yarn.lock Outdated
"@babel/cli@7.0.0-rc.2":
version "7.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.0.0-rc.2.tgz#0c64762f27ccd3fa255111570b6c404f81181c85"
"@babel/cli@^7.0.0":
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.

I'm not sure why Babel changed here? make-dir doesn't depends on Babel. Maybe we forgot to update the lock file after our own Babel bump.

@xtuc xtuc added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Sep 10, 2018
TrySound and others added 2 commits October 17, 2019 23:40
Currently there's unexpected regression after upgrade from babel 6.
On creating file with any depth like dist/index.js the error about
not existing directory is thrown.

In this diff I modified babel-cli to create deep directory for out-file
command.

I also replaced `mkdirp` with more supported `make-dir` package which
also have official promise support.
@nicolo-ribaudo nicolo-ribaudo added the PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release label Oct 17, 2019
@nicolo-ribaudo nicolo-ribaudo added this to the v7.7.0 milestone Oct 17, 2019
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

After it is merged we may also replace output-file-sync by make-dir + fs.writeFileSync.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants