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

Adds support for paths in the --scripts-version parameter #4267

Conversation

mAiNiNfEcTiOn
Copy link

@mAiNiNfEcTiOn mAiNiNfEcTiOn commented Apr 6, 2018

What does this PR do:

  • Adds a few checks to core functions to support paths in the --scripts…-version parameter

Where should the reviewer start:

  • Diffs
  • Run this version of the create-react-app with a (valid) path for react-scripts in the --scripts-version.

Closes #4266

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@mAiNiNfEcTiOn
Copy link
Author

mAiNiNfEcTiOn commented Apr 6, 2018

Ah, funny you don't support trailing commas 👍

const dependencyKey = Object.keys(packageJson.dependencies).find(dep => {
return packageJson.dependencies[dep] === packageName;
});
console.dir(dependencyKey);
Copy link
Author

Choose a reason for hiding this comment

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

Oh .... I left this here... Will quickly remove.

@mAiNiNfEcTiOn
Copy link
Author

mAiNiNfEcTiOn commented Apr 6, 2018

😆 I removed console.dir() and now it doesn't pass on the CI... lol. For what I understood, it has nothing to do with my changes, though.

@mAiNiNfEcTiOn
Copy link
Author

It's already the 2nd time I had to force the CI to run again. Let's see if it'll work on the 3rd 😄

@mAiNiNfEcTiOn
Copy link
Author

😄 done

@mAiNiNfEcTiOn
Copy link
Author

@iansu since the issue has been closed, I'll close this too. Pity, because this adds support for absolute paths on it.

Also there'd be another issue regarding relative paths. When I use a relative path to point to my custom react-scripts it ends up in the app's package.json with an absolute path, instead of a relative path between the resolved path and the app.

For CI's that rely on cloned repo's/non-published custom react-scripts it causes issues, since the package.json is versioned with the absolute path of the user that created it.

@mAiNiNfEcTiOn mAiNiNfEcTiOn deleted the add-support-for-paths-on-react-scripts branch April 13, 2018 11:19
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants