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
  • !9964
An error occurred while fetching the assigned milestone of the selected merge_request.

Add TypeScript 4.x as peerDependency to react-scripts

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/sheepsteak/typescript-4-peer into master 4 years ago
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: sheepsteak

CRA is supposed to officially support TypeScript 4 as of 4.0.0 but react-scripts is still set at only allowing TypeScript as ^3.2.1. As the CRA TypeScript template comes with TypeScript 4 I think this is causing an install error for users on npm 7 as it now attempts to install peerDependencies by default but the TypeScript versions conflict.

If CRA now supports TypeScript 4 I think this is the correct change to make things right.

Closes #9892 (closed) Closes #9764 (closed) (not really related to this but it can close after this) Closes #9995 (closed)

Compare
  • master (base)

and
  • latest version
    228528c3
    1 commit, 2 years ago

1 file
+ 1
- 1

    Preferences

    File browser
    Compare changes
packages/react-scripts/package.json
+ 1
- 1
  • View file @ 228528c3

  • Edit in single-file editor

  • Open in Web IDE


@@ -94,7 +94,7 @@
"fsevents": "^2.1.3"
},
"peerDependencies": {
"typescript": "^3.2.1"
"typescript": "^3.2.1 || ^4"
},
"peerDependenciesMeta": {
"typescript": {
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/sheepsteak/typescript-4-peer

Menu

Explore Projects Groups Snippets