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

Upgrade babel-plugin-emotion's touch dependency to ^2.0.1 #861

Closed
mtzhang opened this issue Sep 18, 2018 · 5 comments
Closed

Upgrade babel-plugin-emotion's touch dependency to ^2.0.1 #861

mtzhang opened this issue Sep 18, 2018 · 5 comments

Comments

@mtzhang
Copy link
Contributor

mtzhang commented Sep 18, 2018

  • emotion version: 9.1.2
  • react version: 16.2.0

Relevant code.

import { touchSync } from 'touch'

touchSync(cssFileOnDisk)

What you did:
Within my project makefile

$ npm install
$ touch node_modules

What happened / Problem description:

$ npm install
$ touch node_modules
bad touch!
/Users/mzhang1/Documents/dev/node_modules/touch/bin/touch.js:28
      throw er
      ^

Error: EISDIR: illegal operation on a directory, open 'node_modules'
    at Error (native)

I'm using react-select in a project, which in turn is using emotion. I'm running into a problem with builds because of emotion's outdated dependency (specifically within babel-package-emotion) on touch.

During my project build, the $PATH variable is prepended with node_modules/.bin, so local executables can be conveniently used in the Makefile. Because it's prepended, the touch dependency takes precedence over the system touch, and because the older version of this library doesn't work with directories, builds are failing.

Suggested solution:

Changing the $PATH to append node_modules/.bin to $PATH, as opposed to prepending it, is not a solution for my project, and so my suggested solution is to

update the touch dependency to at least v2.0.1.

This is because the name of the CLI installed by the package was changed from touch.js to nodetouch.js in v2.0.0 (commit), with a small correction to the bin file name in v2.0.1 (commit). This will eliminate the problem of the same-named dependency.

For additional context, a similar request to upgrade touch was made to nodemon in July 2017 – see the following issue: remy/nodemon#1072.

@mtzhang mtzhang changed the title Upgrade babel-plugin-emotion's touch dependency to ^2.0.0 Upgrade babel-plugin-emotion's touch dependency to ^2.0.1 Sep 19, 2018
@Andarist
Copy link
Member

Would you like to create a PR for this?

@mtzhang
Copy link
Contributor Author

mtzhang commented Sep 19, 2018

@Andarist Here it is! #866

PR template asks me to do the following, but I suspect I do not have permissions to do so:

<!-- Please add a `Tag:` prefixed label from the labels so that this PR shows up in the changelog -->

@mtzhang
Copy link
Contributor Author

mtzhang commented Sep 19, 2018

Thanks for @mitchellhamilton for merging the submitted PR!

Is it possible to cut a patch release with this upgrade soon? Can I get an ETA on that? /cc @Andarist

@emmatown
Copy link
Member

Fixed by #866

@mtzhang
Copy link
Contributor Author

mtzhang commented Sep 19, 2018

@mitchellhamilton Amazing, thank you so much! 🙏

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

No branches or pull requests

3 participants