Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v6
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-24.04
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Install dependencies
run: yarn install
- name: Build Storybook
run: yarn build-docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: "./docs"
publish-docs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Install dependencies
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: Lint, build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "lts/*"

Expand All @@ -36,9 +36,9 @@ jobs:
name: Cypress
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- uses: cypress-io/github-action@v6
Expand All @@ -47,12 +47,12 @@ jobs:
wait-on: "http://localhost:9009"
browser: chrome
env: port=9009
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
if: failure()
with:
name: cypress-videos
Expand All @@ -64,7 +64,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Check inclusive naming
uses: canonical/inclusive-naming@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tics-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
tics-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Build stage: Install yarn dependencies
# ===
FROM node:24 AS yarn-dependencies
FROM node:25 AS yarn-dependencies
WORKDIR /srv
ADD package.json .
ADD yarn.lock .
Expand Down
25 changes: 22 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export default [
{
ignores: ["src/external/"],
},
...fixupConfigRules(
compat.extends("plugin:cypress/recommended", "plugin:prettier/recommended"),
),
...fixupConfigRules(compat.extends("plugin:prettier/recommended")),
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue is that eslint-plugin-cypress doesn't fully support ESLint 9's flat config format yet so I removed the plugin:cypress/recommended preset and manually added most of the rules that the preset carries.

...tseslint.configs.recommended,
react.configs.flat.recommended,
{
Expand Down Expand Up @@ -91,6 +89,7 @@ export default [
varsIgnorePattern: "^_",
},
],
"react-hooks/exhaustive-deps": "warn",
},
},
...fixupConfigRules(compat.extends("plugin:prettier/recommended")).map(
Expand Down Expand Up @@ -134,4 +133,24 @@ export default [
"testing-library/no-render-in-lifecycle": "off",
},
},
{
files: ["cypress/**/*.js"],
plugins: {
cypress: fixupPluginRules(cypress),
},
rules: {
"cypress/no-assigning-return-values": "error",
"cypress/no-unnecessary-waiting": "error",
"cypress/assertion-before-screenshot": "warn",
"cypress/no-force": "warn",
"cypress/no-async-tests": "error",
"cypress/no-pause": "error",
},
languageOptions: {
globals: {
cy: "readonly",
Cypress: "readonly",
},
},
},
];
58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,81 +31,81 @@
"@babel/preset-env": "7.26.9",
"@babel/preset-react": "7.26.3",
"@babel/preset-typescript": "7.26.0",
"@eslint/compat": "1.2.6",
"@eslint/compat": "2.0.1",
"@eslint/eslintrc": "3.2.0",
"@eslint/js": "9.20.0",
"@percy/cli": "1.30.7",
"@percy/storybook": "6.0.3",
"@percy/storybook": "9.1.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@storybook/addon-a11y": "8.5.6",
"@storybook/addon-essentials": "8.5.6",
"@storybook/addon-interactions": "8.5.6",
"@storybook/addon-links": "8.5.6",
"@storybook/addon-onboarding": "8.5.6",
"@storybook/addon-webpack5-compiler-babel": "3.0.5",
"@storybook/blocks": "8.5.6",
"@storybook/react": "8.5.6",
"@storybook/react-webpack5": "8.5.6",
"@storybook/addon-a11y": "8.6.15",
"@storybook/addon-essentials": "8.6.14",
"@storybook/addon-interactions": "8.6.14",
"@storybook/addon-links": "8.6.15",
"@storybook/addon-onboarding": "8.6.15",
"@storybook/addon-webpack5-compiler-babel": "4.0.0",
"@storybook/blocks": "8.6.14",
"@storybook/react": "8.6.15",
"@storybook/react-webpack5": "8.6.15",
"@testing-library/cypress": "10.0.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
"babel-jest": "29.7.0",
"babel-loader": "9.2.1",
"babel-jest": "30.2.0",
"babel-loader": "10.0.0",
"babel-plugin-module-resolver": "5.0.2",
"babel-plugin-typescript-to-proptypes": "2.1.0",
"concurrently": "9.1.2",
"css-loader": "7.1.2",
"cypress": "14.0.3",
"cypress": "15.9.0",
"deepmerge": "4.3.1",
"eslint": "9.20.1",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-cypress": "4.1.0",
"eslint-plugin-cypress": "5.2.1",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-prettier": "5.2.3",
"eslint-plugin-react": "7.37.4",
"eslint-plugin-react-hooks": "5.1.0",
"eslint-plugin-storybook": "0.11.3",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-storybook": "0.12.0",
"eslint-plugin-testing-library": "7.1.1",
"formik": "2.4.6",
"jest": "29.7.0",
"npm-package-json-lint": "8.0.0",
"jest": "30.2.0",
"npm-package-json-lint": "9.1.0",
"prettier": "3.5.1",
"react": "19.0.0",
"react": "19.2.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Bumped this by a minor version to leverage useEffectEvent hook introduced in React v19.2. This hook was needed to fix a lint error flagging the usage of setState within useEffect. See: https://medium.com/@maroobsyed/error-calling-setstate-synchronously-within-an-effect-can-trigger-cascading-renders-7e6fb9d971b2

"react-docgen-typescript-loader": "3.7.2",
"react-dom": "19.0.0",
"react-dom": "19.2.0",
"sass": "1.85.0",
"sass-loader": "16.0.5",
"semantic-release": "25.0.2",
"storybook": "8.6.15",
Copy link
Contributor

Choose a reason for hiding this comment

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

Downgraded storybook as the latest version was not compatible with various addons. Will upgrade it when the addons release a version supporting 10.x.x

"strip-ansi": "7.1.0",
"style-loader": "4.0.0",
"stylelint": "16.14.1",
"stylelint": "17.0.0",
"stylelint-config-prettier": "9.0.5",
"stylelint-config-recommended-scss": "14.1.0",
"stylelint-order": "6.0.4",
"stylelint-config-recommended-scss": "17.0.0",
"stylelint-order": "7.0.1",
"stylelint-prettier": "5.0.3",
"ts-jest": "29.2.5",
"tsc-alias": "1.8.10",
"typescript": "5.7.3",
"typescript-eslint": "8.24.1",
"vanilla-framework": "4.39.0",
"wait-on": "8.0.2",
"wait-on": "9.0.3",
"webpack": "5.98.0"
},
"dependencies": {
"@types/jest": "29.5.14",
"@types/jest": "30.0.0",
"@types/node": "20.17.19",
"@types/react": "19.0.10",
"@types/react-dom": "19.0.4",
"@types/react": "19.2.0",
"@types/react-dom": "19.2.0",
"@types/react-table": "7.7.20",
"classnames": "2.5.1",
"fast-deep-equal": "3.1.3",
"jest-environment-jsdom": "29.7.0",
"jest-environment-jsdom": "30.2.0",
"prop-types": "15.8.1",
"react-table": "7.8.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

react-table has been replaced by @tanstack/react-table and is currently on version 8. Do we want to include that migration as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

We could either include it as a part of the PR for minor and patch upgrades as it has more relevance on that repo OR I could implement this migration in a separate PR to separate the concerns. Let me know what you think.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be alright to include it in a separate PR, since it looks like we will need a few additional changes for the migration: https://tanstack.com/table/latest/docs/guide/migrating

By the way, I have a related issue up in case you want to reference it: #1299

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for linking the issue! I definitely ran into this issue while working on minor dependency upgrades. I'm looking into the migration right now.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that it's the best to do it separately once we untangle the current dependencies PRs.

},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Accordion/Accordion.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("Accordion", () => {
);
const tab = screen.getByRole("tab", { name: "Advanced topics" });
await userEvent.click(tab);
expect(onExpandedChange).toHaveBeenCalledWith(":r6:", "Advanced topics");
expect(onExpandedChange).toHaveBeenCalledWith("_r_6_", "Advanced topics");
// Clicking the tab again should close the accordion section.
await userEvent.click(tab);
expect(onExpandedChange).toHaveBeenCalledWith(null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe("AccordionSection ", () => {
/>,
);
await userEvent.click(screen.getByRole("tab", { name: "Test section" }));
expect(onTitleClick).toHaveBeenCalledWith(true, ":r4:");
expect(onTitleClick).toHaveBeenCalledWith(true, "_r_4_");
rerender(
<AccordionSection
content={<span>Test</span>}
Expand All @@ -64,7 +64,7 @@ describe("AccordionSection ", () => {
// Clicking the title again should close the accordion section.
await userEvent.click(screen.getByRole("tab", { name: "Test section" }));

expect(onTitleClick.mock.calls[1]).toEqual([false, ":r4:"]);
expect(onTitleClick.mock.calls[1]).toEqual([false, "_r_4_"]);
});

it("can use a key for expanded state", async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`AccordionSection renders 1`] = `
<li
Expand All @@ -10,10 +10,10 @@ exports[`AccordionSection renders 1`] = `
role="heading"
>
<button
aria-controls="#:r0:"
aria-controls="#_r_0_"
aria-expanded="false"
class="p-accordion__tab"
id=":r1:"
id="_r_1_"
role="tab"
type="button"
>
Expand All @@ -22,9 +22,9 @@ exports[`AccordionSection renders 1`] = `
</div>
<section
aria-hidden="true"
aria-labelledby=":r1:"
aria-labelledby="_r_1_"
class="p-accordion__panel"
id=":r0:"
id="_r_0_"
role="tabpanel"
>
<span>
Expand Down
18 changes: 9 additions & 9 deletions src/components/Accordion/__snapshots__/Accordion.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Accordion renders 1`] = `
<aside
Expand All @@ -18,10 +18,10 @@ exports[`Accordion renders 1`] = `
role="heading"
>
<button
aria-controls="#:r0:"
aria-controls="#_r_0_"
aria-expanded="false"
class="p-accordion__tab"
id=":r1:"
id="_r_1_"
role="tab"
type="button"
>
Expand All @@ -30,9 +30,9 @@ exports[`Accordion renders 1`] = `
</div>
<section
aria-hidden="true"
aria-labelledby=":r1:"
aria-labelledby="_r_1_"
class="p-accordion__panel"
id=":r0:"
id="_r_0_"
role="tabpanel"
>
test content
Expand All @@ -47,10 +47,10 @@ exports[`Accordion renders 1`] = `
role="heading"
>
<button
aria-controls="#:r2:"
aria-controls="#_r_2_"
aria-expanded="false"
class="p-accordion__tab"
id=":r3:"
id="_r_3_"
role="tab"
type="button"
>
Expand All @@ -59,9 +59,9 @@ exports[`Accordion renders 1`] = `
</div>
<section
aria-hidden="true"
aria-labelledby=":r3:"
aria-labelledby="_r_3_"
class="p-accordion__panel"
id=":r2:"
id="_r_2_"
role="tabpanel"
>
More test content
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`ActionButton matches loading snapshot 1`] = `
<button
Expand Down
Loading
Loading