Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/eight-peas-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Update to React.useId() when using React 18
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@
{
"ts-ignore": "allow-with-description"
}
],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "@react-aria/ssr",
"importNames": ["useSSRSafeId"],
"message": "Please use the `useId` hook from `src/hooks/useId.ts` instead"
}
],
"patterns": []
}
]
}
},
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ jobs:
run: node script/set-react-version.js ${{ matrix.react }}

- name: Install dependencies
if: ${{ matrix.react == 18 }}
if: ${{ matrix.react == 17 }}
run: npm install --legacy-peer-deps

- name: Install dependencies
if: ${{ matrix.react == 17 }}
if: ${{ matrix.react == 18 }}
run: npm ci

- name: Build
Expand Down Expand Up @@ -80,11 +80,11 @@ jobs:
run: node script/set-react-version.js ${{ matrix.react }}

- name: Install dependencies
if: ${{ matrix.react == 18 }}
if: ${{ matrix.react == 17 }}
run: npm install --legacy-peer-deps

- name: Install dependencies
if: ${{ matrix.react != 18 }}
if: ${{ matrix.react != 17 }}
run: npm ci

- name: Type check
Expand Down
19 changes: 8 additions & 11 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,26 @@ module.exports = {
{
name: 'storybook-addon-turbo-build',
options: {
optimizationLevel: 2
}
optimizationLevel: 2,
},
},
...(process.env.NODE_ENV === 'production' && process.env.GITHUB_JOB !== 'chromatic'
? ['@whitespace/storybook-addon-html']
: [])
],
core: {
builder: {
name: 'webpack5',
options: {
fsCache: true
}
}
fsCache: true,
},
},
},
features: {
interactionsDebugger: true,
storyStoreV7: true,
buildStoriesJson: true
buildStoriesJson: true,
},
framework: '@storybook/react',
reactOptions: {
fastRefresh: true,
strictMode: true
}
strictMode: true,
},
}
Loading