Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !477
An error occurred while fetching the assigned milestone of the selected merge_request.

Use most recent React version

  • Review changes

  • Download
  • Email patches
  • Plain diff
Administrator requested to merge github/fork/wdhorton/install-latest-react into master 8 years ago
  • Overview 7
  • Commits 5
  • Pipelines 0
  • Changes 1

Created by: wdhorton

Fixes #473 (closed). I thought the best approach would be calling npm view react[-dom] version and then using the output. If it fails, it falls back to the old method of getting the version. The other alternative I considered was just doing a separate install of react and react-dom, but then you'd end up with more extra npm installs.

Test plan: I ran init and the new app had version ^15.3.1 in the package.json, instead of ^15.3.0, which is how it is in the create-react-app repo and when creating a new app off of master.

Loading
Loading

Activity


  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: gaearon

    Hmm. Can we change the script to run npm install --save react react-dom instead? It already adds them as a later step so seems like changing that would be simpler.

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: vjeux

    @gaearon that would be way better than trying to move dev dependencies around and re-run npm blindly on the host folder!

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: wdhorton

    Should I also run npm install --save-dev react-test-renderer so that there's no need for a blind npm install at all?

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: gaearon

    Yes please. (We might remove it until some issues are solved but I'll make the call before cutting the release.)

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: wdhorton

    @gaearon Updated it to run separate installs for each package.

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Merged by: gaearon at 2016-08-25 10:32:11 UTC

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: gaearon

    Thanks!

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/wdhorton/install-latest-react

Menu

Explore Projects Groups Snippets