Skip to content
GitLab
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
  • !2853

Allow use of scoped packages with a pinned version

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/wileybenet/master into master Jul 25, 2017
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: wileybenet

When specifying a --scripts-version, the first @ in a scoped package prevents the packageName from being trimmed of its version tag, if it has one. Hence, an uncaught error is thrown when the full, pinned package name is used in the path to read package.json:

screen shot 2017-07-25 at 3 38 14 pm

I added the .match() to yield a truthy value if the installPackage contains an @ symbol at char 0 and at char 1+. To test that this works, run create-react-app --scripts-version=@organization/my-react-scripts@0.0.1 and see that create-react-app completed successfully and that the correct package version was installed:

screen shot 2017-07-25 at 3 44 29 pm
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/wileybenet/master