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

React types dependency version should be overwritten when generating React Typescript extensions #578

Conversation

alvaro-shopify
Copy link
Contributor

WHY are these changes introduced?

Fixes #395

WHAT is this pull request doing?

  • When generating a Typescript React extension, "@types/react": "17.0.30" dependency is add inside the resolutions or overrides block inside the root package.json of the app directory
  • Depending on the package manager used to create the app, either resolution (yarn) or overrides (npm, pnpm) are set

How to test your changes?

  • Run yarn shopify app generate extension
  • Select checkout UI and Typescript React as flavor
  • Open the app with VS Code and there should be no problems with React components resolution

Post-release steps

  • Maybe there should be added some instructions for users that have generated Typescript React extensions without this dependency

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@alvaro-shopify alvaro-shopify requested a review from a team October 5, 2022 12:23
@alvaro-shopify alvaro-shopify deleted the feature/add_resolution_or_override_for_react_typescript_extensions branch October 5, 2022 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Use yarn resolutions to fix typescript errors in newly scaffolded checkout ui extension
1 participant