Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

fix(cli): use latest version when stable unavailable #57

Merged
merged 2 commits into from
Jun 15, 2018

Conversation

samouss
Copy link
Contributor

@samouss samouss commented Jun 15, 2018

Summary

When we provide a template directly from the CLI we don't let the user choose the version. By default we pick the latest stable version available. When there is no stable available Yarn will ask for which version you want to install but the template is generated with an empty version.

This PR fix this issue by taking the latest version available in case the latest stable is not available. I also added the folder sample to the .gitignore to test the CLI with this folder name. We can test the template generation without pollute the git diff.

Before:

{
  "dependencies": {
    "react-instantsearch-native": "^"
  }
}

After:

{
  "dependencies": {
    "react-instantsearch-native": "^5.2.0-beta.1"
  }
}

@francoischalifour francoischalifour merged commit e764cd5 into master Jun 15, 2018
@francoischalifour francoischalifour deleted the fix/stable-version-unavailable-with-config branch June 15, 2018 13:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants