Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/purple-weeks-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@shopify/hydrogen-react': patch
'@shopify/cli-hydrogen': patch
'demo-store': patch
---

Update to TypeScript 5. If you have `typescript` as a dev dependency in your app, change its version as follows:

```diff
"devDependencies": {
...
- "typescript": "^4.9.5",
+ "typescript": "^5.1.6",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if the type fixes are still compatible with TS 4? Is moving to TS 5 a requirement if we merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works in TS4 as well. These are just generic fixes we needed but TS4 was not catching.
For example, see a prop like measurement should throw a TS error but it wasn't doing it before (it does now): https://github.com/Shopify/hydrogen/pull/1240/files#r1297221747

TS5 is not a requirement but, since the CLI installs it for tarnspiling stuff, it's better to update projects and avoid dependency duplication.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworded the changeset to make this more clear and also explained how to change the TS version in VSCode 👍

},
```
6 changes: 3 additions & 3 deletions examples/customer-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"@shopify/oxygen-workers-types": "^3.17.2",
"@shopify/prettier-config": "^1.1.2",
"@types/eslint": "^8.4.10",
"@types/react": "^18.0.20",
"@types/react-dom": "^18.0.6",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"eslint": "^8.20.0",
"eslint-plugin-hydrogen": "0.12.2",
"prettier": "^2.8.4",
"typescript": "^4.9.5"
"typescript": "^5.1.6"
},
"engines": {
"node": ">=16.13"
Expand Down
6 changes: 3 additions & 3 deletions examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
"@types/compression": "^1.7.2",
"@types/express": "^4.17.17",
"@types/morgan": "^1.9.4",
"@types/react": "^18.0.35",
"@types/react-dom": "^18.0.11",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"dotenv": "^16.0.3",
"eslint": "^8.38.0",
"nodemon": "^2.0.22",
"npm-run-all": "^4.1.5",
"typescript": "^5.0.4"
"typescript": "^5.1.6"
},
"engines": {
"node": ">=14"
Expand Down
Loading