File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : React 18 compatibility
2+ permissions :
3+ contents : read
4+ on :
5+ pull_request :
6+ branches :
7+ - main
8+ paths :
9+ - ' packages/**'
10+
11+ jobs :
12+ setup :
13+ uses : ./.github/workflows/_setup.yml
14+ secrets : inherit
15+ with :
16+ cacheKey : ${{ github.sha }}-react18
17+ checkout_paths : packages apps scripts .github
18+ react18 :
19+ name : Build & test with React 18
20+ runs-on : ubuntu-latest
21+ needs : setup
22+ steps :
23+ - name : Use "setup" cache
24+ id : setup-cache
25+ uses : actions/cache@v5
26+ with :
27+ path : |
28+ ./*
29+ ~/.pnpm-store
30+ key : ${{ github.sha }}-react18
31+ - name : Fallback checkout (cache miss)
32+ if : steps.setup-cache.outputs.cache-hit != 'true'
33+ uses : actions/checkout@v6
34+ - name : Install Node.js
35+ uses : actions/setup-node@v6
36+ with :
37+ node-version : ' 22.12.0'
38+ - name : Setup pnpm
39+ uses : pnpm/action-setup@v4
40+ - name : Fallback install (cache miss)
41+ if : steps.setup-cache.outputs.cache-hit != 'true'
42+ run : pnpm install
43+ - name : Override to React 18
44+ run : |
45+ pnpm add -Dw react@18 react-dom@18 @types/react@18 @types/react-dom@18
46+ - name : Build packages
47+ run : pnpm run build
48+ - name : Test packages
49+ run : pnpm run test
50+ - name : Type check packages
51+ run : pnpm run types
Original file line number Diff line number Diff line change 9595 "typescript" : " ^5.9.3"
9696 },
9797 "peerDependencies" : {
98- "react" : " ^19" ,
99- "react-dom" : " ^19" ,
98+ "react" : " ^18 || ^ 19" ,
99+ "react-dom" : " ^18 || ^ 19" ,
100100 "styled-components" : " ^6"
101101 },
102102 "dependencies" : {
Original file line number Diff line number Diff line change 3131 },
3232 "peerDependencies" : {
3333 "@equinor/eds-core-react" : " >=1 <3" ,
34- "react" : " ^19" ,
35- "react-dom" : " ^19" ,
34+ "react" : " ^18 || ^ 19" ,
35+ "react-dom" : " ^18 || ^ 19" ,
3636 "styled-components" : " ^6"
3737 },
3838 "dependencies" : {
Original file line number Diff line number Diff line change 8686 "typescript" : " ^5.9.3"
8787 },
8888 "peerDependencies" : {
89- "react" : " ^19" ,
90- "react-dom" : " ^19" ,
89+ "react" : " ^18 || ^ 19" ,
90+ "react-dom" : " ^18 || ^ 19" ,
9191 "styled-components" : " ^6"
9292 },
9393 "dependencies" : {
Original file line number Diff line number Diff line change 7777 "@vitejs/plugin-react" : " ^5.1.4"
7878 },
7979 "peerDependencies" : {
80- "react" : " ^19" ,
81- "react-dom" : " ^19" ,
80+ "react" : " ^18 || ^ 19" ,
81+ "react-dom" : " ^18 || ^ 19" ,
8282 "styled-components" : " ^6"
8383 },
8484 "dependencies" : {
You can’t perform that action at this time.
0 commit comments