chore(pie-monorepo): DSW-000 upgrade node 22 #2222
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes (can list changeset entries if preferable)
Just wanted to see what needs to be done in order to upgrade the repo for Node 22 compatibility.
Issues
Type 'FSWatcher' is missing the following properties from type 'FSWatcher'
I encountered this error when trying to build
pie-icons-webc
- vitejs/vite#15714Cause: This is an issue in Vite 4. While we have a direct dependency of vite 5.x in the repo, our version of Vitest uses Vite 4.
Fix: Update vitest from
0.29.8
>3.5.0
.Note
Given how old our version of Vitest is, it looks like the new version causes some slightly different formatting in snapshots. A couple of tests also needed to be updated.
Typecheck errors when building components
More info here - vitest-dev/vitest#4921
Fix: Modify
@justeattakeaway/pie-components-config tsconfig.json
"moduleResolution": "bundler": Updated from
node
>bundler
. - Not sure if this has any unintended side effects, but I got a warning in my IDE sayingnode
was deprecated anyway."skipLibCheck": true - This was suggested in open issues I saw related to this issue. Probably not ideal, but I noticed we have this set in other TS configs across the repo.
Author Checklist (complete before requesting a review, do not delete any)
PIE Storybook
/PIE Docs
PR preview./test-aperture
command.Not-applicable Checklist items
Please move any Author checklist items that do not apply to this pull request here.
Testing
How do I test my changes?
Reviewer checklists (complete before approving)
Mark items as
[-] N/A
if not applicable.Reviewer 1
PIE Storybook
/PIE Docs
PR preview.Reviewer 2
PIE Storybook
/PIE Docs
PR preview.