From 247972d2fc694bcae2baf949d8a08f21c623c67b Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Wed, 10 Apr 2024 18:37:51 -0400 Subject: [PATCH 01/10] Introduce workflow for codecov upload --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 18 +++++++--- README.md | 28 ++++++++------- 3 files changed, 85 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e8e4acbf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: Code Coverage + +on: + pull_request: + branches: [ main, prod-beta, prod-stable, stage-beta, stage-stable ] + push: + branches: [ main, prod-beta, prod-stable, stage-beta, stage-stable ] + +env: + BRANCH: ${{ github.base_ref }} + +jobs: + build: + name: koku-ui codecov + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + run: npm install + + - name: Test + run: npm test -- --collect-coverage --max-workers=4 + + - name: Upload coverage report + if: ${{ success() }} + uses: codecov/codecov-action@v4.2.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + directory: coverage + plugin: pycoverage # Only run one plugin so that all do not run. There is no way to disable plugins entirely. + diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d944a6de..b28964a6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,9 +1,11 @@ -# Run this workflow for PRs only. Travis is required to push via insights-frontend-builder-common scripts +# Run this workflow for PRs only to confirm container build is working properly name: Pull request + on: pull_request: branches: [ main, master, prod-beta, prod-stable, stage-beta, stage-stable ] + env: BRANCH: ${{ github.base_ref }} @@ -16,14 +18,16 @@ jobs: node-version: [18] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Cache node modules id: cache-npm - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -34,13 +38,17 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- + - name: Install dependencies run: npm install + - name: Build run: npm run build + - name: Lint if: ${{ success() }} run: npm run lint + - name: Test if: ${{ success() }} - run: npm test --coverage --maxWorkers=4 + run: npm test diff --git a/README.md b/README.md index 5cd16c03..8403f78e 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,23 @@ # Koku microfrontend (MFE) with Module Federation -[![AGPLv3][license-badge]][license] -[![Build Status][build-badge]][build] + +[![Apache 2.0][license-badge]](https://github.com/project-koku/koku-ui/blob/main/LICENSE) +[![CI Status][build-badge]](https://github.com/project-koku/koku-ui/actions/workflows/tag_release.yml) +[![codecov][codecov-badge]](https://codecov.io/gh/project-koku/koku-ui) React.js app for Cost Management. -User interface is based on Patternfly [![Patternfly][pf-logo]][patternfly] +User interface is based on [Patternfly]. -To submit an issue, please visit https://issues.redhat.com/projects/COST/ +Submit issues in [Jira]. ## Requirements * [NodeJS v18.15+][nodejs] * [npm v9.5+][npm] -## Setup /etc/hosts entries (do this once) +## Setup `hosts` entries (do this once) -Edit the /etc/hosts file and add the following entries +Edit the `/etc/hosts` file and add the following entries ``` 127.0.0.1 prod.foo.redhat.com 127.0.0.1 stage.foo.redhat.com @@ -28,7 +30,7 @@ sudo bash scripts/patch-etc-hosts.sh ## Getting Started 1. Install requirements listed above. -2. Setup /etc/hosts entries listed above. +2. Setup `/etc/hosts` entries listed above. 3. Clone the repository, and open a terminal in the base of this project. 4. Run the command `npm install` to install all the dependencies. @@ -113,12 +115,14 @@ npm start:csb:mfe This [RELEASE][release-doc] doc describes how to release Koku MFE to each staging environment. +[build-badge]: https://github.com/project-koku/koku-ui-mfe/actions/workflows/tag_release.yml/badge.svg +[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui-mfe.svg?longCache=true +[codecov-badge]: https://codecov.io/gh/project-koku/koku-ui-mfe/graph/badge.svg?token=1hjFIy1cRe + [koku-readme]: https://github.com/project-koku/koku#readme -[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui-mfe.svg?longCache=true&style=for-the-badge -[license]: https://github.com/project-koku/koku-ui-mfe/blob/main/LICENSE [nodejs]: https://nodejs.org/en/ [patch-etc-hosts]: https://github.com/RedHatInsights/insights-proxy/blob/master/scripts/patch-etc-hosts.sh -[pf-logo]: https://www.patternfly.org/v4/images/logo.4189e7eb1a0741ea2b3b51b80d33c4cb.svg -[patternfly]: https://www.patternfly.org/ +[Patternfly]: https://www.patternfly.org/ [release-doc]: https://github.com/project-koku/koku-ui-mfe/blob/main/RELEASE.md -[npm]: https://https://www.npmjs.com/ +[npm]: https://www.npmjs.com/ +[Jira]: https://issues.redhat.com/projects/COST/ From 2a358a87ced7d7581fda074e5c2efb88981cb9fe Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Wed, 10 Apr 2024 21:51:19 -0400 Subject: [PATCH 02/10] Update README --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8403f78e..0a65cf24 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Koku microfrontend (MFE) with Module Federation -[![Apache 2.0][license-badge]](https://github.com/project-koku/koku-ui/blob/main/LICENSE) -[![CI Status][build-badge]](https://github.com/project-koku/koku-ui/actions/workflows/tag_release.yml) -[![codecov][codecov-badge]](https://codecov.io/gh/project-koku/koku-ui) +[![Apache 2.0][license-badge]](https://github.com/project-koku/koku-ui-mfe/blob/main/LICENSE) +[![CI Status][build-badge]](https://github.com/project-koku/koku-ui-mfe/actions/workflows/tag_release.yml) +[![codecov][codecov-badge]](https://codecov.io/gh/project-koku/koku-ui-mfe) React.js app for Cost Management. @@ -45,6 +45,7 @@ npm test ``` ## Running Koku MFE against a hosted Koku API, using webpack proxy + Note that this approach currently supports the Insights stage-beta, stage-stable, prod-beta, and prod-stable environments. 1. Start development server @@ -65,7 +66,7 @@ https://stage.foo.redhat.com:1337/beta/staging/cost-management ### Running Koku MFE with local Cloud Services Backend -See https://github.com/RedHatInsights/chrome-service-backend/blob/main/docs/cloud-services-config.md#serving-files-locally +Refer to the [serving files locally][serving-files-locally] section of cloud services config for more details 1. Serve files locally from Cloud Services Backend repo ``` @@ -79,7 +80,7 @@ npm start:csb ### Running Koku MFE with local Koku UI -See https://github.com/project-koku/koku-ui +Refer to the [koku-ui README][koku-ui-readme] for more details 1. Start development server in Koku MFE repo ``` @@ -93,8 +94,7 @@ npm start:mfe ### Running Koku MFE with local Koku UI and Cloud Services Backend -See https://github.com/RedHatInsights/chrome-service-backend/blob/main/docs/cloud-services-config.md#serving-files-locally -and https://github.com/project-koku/koku-ui +Refer to the [serving files locally][serving-files-locally] section of cloud services config and the [koku-ui README][koku-ui-readme] for more details 1. Serve files locally from Cloud Services Backend repo ``` @@ -116,13 +116,13 @@ npm start:csb:mfe This [RELEASE][release-doc] doc describes how to release Koku MFE to each staging environment. [build-badge]: https://github.com/project-koku/koku-ui-mfe/actions/workflows/tag_release.yml/badge.svg -[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui-mfe.svg?longCache=true [codecov-badge]: https://codecov.io/gh/project-koku/koku-ui-mfe/graph/badge.svg?token=1hjFIy1cRe - -[koku-readme]: https://github.com/project-koku/koku#readme +[Jira]: https://issues.redhat.com/projects/COST/ +[koku-ui-readme]: https://github.com/project-koku/koku-ui#readme +[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui-mfe.svg?longCache=true [nodejs]: https://nodejs.org/en/ +[npm]: https://www.npmjs.com/ [patch-etc-hosts]: https://github.com/RedHatInsights/insights-proxy/blob/master/scripts/patch-etc-hosts.sh [Patternfly]: https://www.patternfly.org/ [release-doc]: https://github.com/project-koku/koku-ui-mfe/blob/main/RELEASE.md -[npm]: https://www.npmjs.com/ -[Jira]: https://issues.redhat.com/projects/COST/ +[serving-files-locally]: https://github.com/RedHatInsights/chrome-service-backend/blob/main/docs/cloud-services-config.md#serving-files-locally From 5a07e2ad5f133d755cd0971528864f19c4d7a028 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Wed, 10 Apr 2024 22:33:34 -0400 Subject: [PATCH 03/10] Format README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0a65cf24..c7beabf1 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ User interface is based on [Patternfly]. Submit issues in [Jira]. ## Requirements + * [NodeJS v18.15+][nodejs] * [npm v9.5+][npm] @@ -29,6 +30,7 @@ sudo bash scripts/patch-etc-hosts.sh ``` ## Getting Started + 1. Install requirements listed above. 2. Setup `/etc/hosts` entries listed above. 3. Clone the repository, and open a terminal in the base of this project. From bc71e4a464501706828decb81c777bacd69183aa Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Wed, 10 Apr 2024 23:00:43 -0400 Subject: [PATCH 04/10] Update user name for tag release --- .github/workflows/tag_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag_release.yml b/.github/workflows/tag_release.yml index d1bcac7d..c6c57e3a 100644 --- a/.github/workflows/tag_release.yml +++ b/.github/workflows/tag_release.yml @@ -30,7 +30,7 @@ jobs: esac TAG="r.$DATE.$MINOR_VERSION" git config --local user.email "cost-mgmt@redhat.com" - git config --local user.name "Cost Management Release Action" + git config --local user.name "Cost Management MFE Release Action" git log $(git tag --list | tail -1)..prod-stable | git tag -a $TAG -F - git push origin $TAG shell: bash From c67a1316f6beba743e109df0e3df2d78d20397d0 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Thu, 11 Apr 2024 14:53:23 -0400 Subject: [PATCH 05/10] Consolidate workflows --- .github/workflows/ci.yml | 76 ++++++++++++++++++++++++++---- .github/workflows/pull_request.yml | 54 --------------------- README.md | 5 +- 3 files changed, 70 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8e4acbf..da8322a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Code Coverage +name: CI on: pull_request: @@ -8,22 +8,59 @@ on: env: BRANCH: ${{ github.base_ref }} + NODEJS_VERSION: '18' jobs: build: - name: koku-ui codecov + # This job is run for PRs only, as a sanity check, to confirm ci.ext.devshift.net is working properly + if: ${{ github.event_name == 'pull_request' }} + name: Build runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEJS_VERSION }} + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Lint + run: npm run lint + + units: + name: Units + runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Node.js ${{ matrix.node-version }} + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ env.NODEJS_VERSION }} - name: Cache node modules id: cache-npm @@ -43,8 +80,32 @@ jobs: run: npm install - name: Test + id: test_run run: npm test -- --collect-coverage --max-workers=4 + - uses: actions/upload-artifact@v4 + if: ${{ steps.test_run.outcome == 'success' }} + name: Save coverage report + with: + name: coverage_report + path: coverage/ + retention-days: 10 + + coverage: + name: Coverage + needs: [units] + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download coverage report + uses: actions/download-artifact@v4 + with: + name: coverage_report + path: coverage + - name: Upload coverage report if: ${{ success() }} uses: codecov/codecov-action@v4.2.0 @@ -53,4 +114,3 @@ jobs: with: directory: coverage plugin: pycoverage # Only run one plugin so that all do not run. There is no way to disable plugins entirely. - diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index b28964a6..00000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Run this workflow for PRs only to confirm container build is working properly - -name: Pull request - -on: - pull_request: - branches: [ main, master, prod-beta, prod-stable, stage-beta, stage-stable ] - -env: - BRANCH: ${{ github.base_ref }} - -jobs: - build: - name: koku-ui-mfe build - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18] - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Cache node modules - id: cache-npm - uses: actions/cache@v4 - env: - cache-name: cache-node-modules - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build - - - name: Lint - if: ${{ success() }} - run: npm run lint - - - name: Test - if: ${{ success() }} - run: npm test diff --git a/README.md b/README.md index c7beabf1..19f41354 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # Koku microfrontend (MFE) with Module Federation - [![Apache 2.0][license-badge]](https://github.com/project-koku/koku-ui-mfe/blob/main/LICENSE) -[![CI Status][build-badge]](https://github.com/project-koku/koku-ui-mfe/actions/workflows/tag_release.yml) +[![CI Status][build-badge]](https://github.com/project-koku/koku-ui-mfe/actions/workflows/ci.yml?query=branch%3Amain) [![codecov][codecov-badge]](https://codecov.io/gh/project-koku/koku-ui-mfe) React.js app for Cost Management. @@ -117,7 +116,7 @@ npm start:csb:mfe This [RELEASE][release-doc] doc describes how to release Koku MFE to each staging environment. -[build-badge]: https://github.com/project-koku/koku-ui-mfe/actions/workflows/tag_release.yml/badge.svg +[build-badge]: https://github.com/project-koku/koku-ui-mfe/actions/workflows/ci.yml/badge.svg?branch=main [codecov-badge]: https://codecov.io/gh/project-koku/koku-ui-mfe/graph/badge.svg?token=1hjFIy1cRe [Jira]: https://issues.redhat.com/projects/COST/ [koku-ui-readme]: https://github.com/project-koku/koku-ui#readme From 6b64e5c32b495ccc0dd260a061efe7e541b37be9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:08:23 +0000 Subject: [PATCH 06/10] (chore): Bump the lint-dependencies group with 2 updates Bumps the lint-dependencies group with 2 updates: [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) and [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library). Updates `eslint-plugin-simple-import-sort` from 12.0.0 to 12.1.0 - [Changelog](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/CHANGELOG.md) - [Commits](https://github.com/lydell/eslint-plugin-simple-import-sort/compare/v12.0.0...v12.1.0) Updates `eslint-plugin-testing-library` from 6.2.0 to 6.2.2 - [Release notes](https://github.com/testing-library/eslint-plugin-testing-library/releases) - [Changelog](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/.releaserc.json) - [Commits](https://github.com/testing-library/eslint-plugin-testing-library/compare/v6.2.0...v6.2.2) --- updated-dependencies: - dependency-name: eslint-plugin-simple-import-sort dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint-dependencies - dependency-name: eslint-plugin-testing-library dependency-type: direct:development update-type: version-update:semver-patch dependency-group: lint-dependencies ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- package.json | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bb6feb1..1ca4c98f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,9 +71,9 @@ "eslint-plugin-patternfly-react": "^5.2.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.1", - "eslint-plugin-simple-import-sort": "^12.0.0", + "eslint-plugin-simple-import-sort": "^12.1.0", "eslint-plugin-sort-keys-fix": "^1.1.2", - "eslint-plugin-testing-library": "^6.2.0", + "eslint-plugin-testing-library": "^6.2.2", "git-revision-webpack-plugin": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", @@ -9973,9 +9973,9 @@ } }, "node_modules/eslint-plugin-simple-import-sort": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.0.0.tgz", - "integrity": "sha512-8o0dVEdAkYap0Cn5kNeklaKcT1nUsa3LITWEuFk3nJifOoD+5JQGoyDUW2W/iPWwBsNBJpyJS9y4je/BgxLcyQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.0.tgz", + "integrity": "sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==", "dev": true, "peerDependencies": { "eslint": ">=5.0.0" @@ -10055,9 +10055,9 @@ } }, "node_modules/eslint-plugin-testing-library": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.0.tgz", - "integrity": "sha512-+LCYJU81WF2yQ+Xu4A135CgK8IszcFcyMF4sWkbiu6Oj+Nel0TrkZq/HvDw0/1WuO3dhDQsZA/OpEMGd0NfcUw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.2.tgz", + "integrity": "sha512-1E94YOTUDnOjSLyvOwmbVDzQi/WkKm3WVrMXu6SmBr6DN95xTGZmI6HJ/eOkSXh/DlheRsxaPsJvZByDBhWLVQ==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.58.0" diff --git a/package.json b/package.json index 829746c5..9c6b3708 100644 --- a/package.json +++ b/package.json @@ -109,9 +109,9 @@ "eslint-plugin-patternfly-react": "^5.2.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.1", - "eslint-plugin-simple-import-sort": "^12.0.0", + "eslint-plugin-simple-import-sort": "^12.1.0", "eslint-plugin-sort-keys-fix": "^1.1.2", - "eslint-plugin-testing-library": "^6.2.0", + "eslint-plugin-testing-library": "^6.2.2", "git-revision-webpack-plugin": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", From 9e613f3069bc835c5466493646671f6b294c3d86 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Mon, 15 Apr 2024 12:28:16 -0400 Subject: [PATCH 07/10] Dependency updates --- package-lock.json | 81 +++++++++++++++++++++++------------------------ package.json | 20 ++++++------ 2 files changed, 50 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bb6feb1..c460b656 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@patternfly/react-icons": "5.2.0", "@patternfly/react-table": "5.2.0", "@patternfly/react-tokens": "5.2.0", - "@redhat-cloud-services/frontend-components": "^4.2.5", + "@redhat-cloud-services/frontend-components": "^4.2.6", "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.7", "@redhat-cloud-services/frontend-components-utilities": "^4.0.10", @@ -28,12 +28,12 @@ "date-fns": "^3.6.0", "js-file-download": "^0.4.12", "lodash": "^4.17.21", - "qs": "^6.12.0", + "qs": "^6.12.1", "react": "^18.2.0", "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", "react-intl": "^6.6.5", - "react-redux": "^9.1.0", + "react-redux": "^9.1.1", "react-router-dom": "^6.22.3", "redux": "^5.0.1", "redux-thunk": "^3.1.0", @@ -50,12 +50,12 @@ "@swc/core": "1.3.105", "@swc/jest": "^0.2.36", "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^14.3.0", + "@testing-library/react": "^14.3.1", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", "@types/qs": "^6.9.14", - "@types/react": "^18.2.75", - "@types/react-dom": "^18.2.24", + "@types/react": "^18.2.78", + "@types/react-dom": "^18.2.25", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "^7.6.0", @@ -71,9 +71,9 @@ "eslint-plugin-patternfly-react": "^5.2.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.1", - "eslint-plugin-simple-import-sort": "^12.0.0", + "eslint-plugin-simple-import-sort": "^12.1.0", "eslint-plugin-sort-keys-fix": "^1.1.2", - "eslint-plugin-testing-library": "^6.2.0", + "eslint-plugin-testing-library": "^6.2.2", "git-revision-webpack-plugin": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", @@ -87,8 +87,8 @@ "rimraf": "^5.0.5", "ts-jest": "^29.1.2", "ts-patch": "^3.1.2", - "typescript": "^5.4.4", - "webpack-bundle-analyzer": "^4.10.1" + "typescript": "^5.4.5", + "webpack-bundle-analyzer": "^4.10.2" }, "engines": { "node": ">=18.15.0", @@ -2496,9 +2496,9 @@ } }, "node_modules/@redhat-cloud-services/frontend-components": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.2.5.tgz", - "integrity": "sha512-lTVew1R6LccTMqDoaevtk6WBbH0VoiNPspPMSuEYT+/JIQLjs5NgpBNWTGImyp/4/JFwMiQq0ewtimQLq0E3Ig==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.2.6.tgz", + "integrity": "sha512-ErM9sWQUQpKwdKBOQlDBFI6IHyi3mRzTZ3wYJ57pouTzQzOhPozsIpPsPgB2gN/88khenjFEy+7SYuIZDaH5TA==", "dependencies": { "@patternfly/react-component-groups": "^5.0.0", "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", @@ -3706,9 +3706,9 @@ } }, "node_modules/@testing-library/react": { - "version": "14.3.0", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.3.0.tgz", - "integrity": "sha512-AYJGvNFMbCa5vt1UtDCa/dcaABrXq8gph6VN+cffIx0UeA0qiGqS+sT60+sb+Gjc8tGXdECWYQgaF0khf8b+Lg==", + "version": "14.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.3.1.tgz", + "integrity": "sha512-H99XjUhWQw0lTgyMN05W3xQG1Nh4lq574D8keFf1dDoNTJgp66VbJozRaczoF+wsiaPJNt/TcnfpLGufGxSrZQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.12.5", @@ -4163,18 +4163,18 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.75", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.75.tgz", - "integrity": "sha512-+DNnF7yc5y0bHkBTiLKqXFe+L4B3nvOphiMY3tuA5X10esmjqk7smyBZzbGTy2vsiy/Bnzj8yFIBL8xhRacoOg==", + "version": "18.2.78", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.78.tgz", + "integrity": "sha512-qOwdPnnitQY4xKlKayt42q5W5UQrSHjgoXNVEtxeqdITJ99k4VXJOP3vt8Rkm9HmgJpH50UNU+rlqfkfWOqp0A==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.2.24", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.24.tgz", - "integrity": "sha512-cN6upcKd8zkGy4HU9F1+/s98Hrp6D4MOcippK4PoE8OZRngohHZpbJn1GsaDLz87MqvHNoT13nHvNqM9ocRHZg==", + "version": "18.2.25", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz", + "integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==", "dev": true, "dependencies": { "@types/react": "*" @@ -9973,9 +9973,9 @@ } }, "node_modules/eslint-plugin-simple-import-sort": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.0.0.tgz", - "integrity": "sha512-8o0dVEdAkYap0Cn5kNeklaKcT1nUsa3LITWEuFk3nJifOoD+5JQGoyDUW2W/iPWwBsNBJpyJS9y4je/BgxLcyQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.0.tgz", + "integrity": "sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==", "dev": true, "peerDependencies": { "eslint": ">=5.0.0" @@ -10055,9 +10055,9 @@ } }, "node_modules/eslint-plugin-testing-library": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.0.tgz", - "integrity": "sha512-+LCYJU81WF2yQ+Xu4A135CgK8IszcFcyMF4sWkbiu6Oj+Nel0TrkZq/HvDw0/1WuO3dhDQsZA/OpEMGd0NfcUw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.2.tgz", + "integrity": "sha512-1E94YOTUDnOjSLyvOwmbVDzQi/WkKm3WVrMXu6SmBr6DN95xTGZmI6HJ/eOkSXh/DlheRsxaPsJvZByDBhWLVQ==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.58.0" @@ -18022,9 +18022,9 @@ ] }, "node_modules/qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", + "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", "dependencies": { "side-channel": "^1.0.6" }, @@ -18241,9 +18241,9 @@ "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, "node_modules/react-redux": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.0.tgz", - "integrity": "sha512-6qoDzIO+gbrza8h3hjMA9aq4nwVFCKFtY2iLxCtVT38Swyy2C/dJCGBXHeHLtx6qlg/8qzc2MrhOeduf5K32wQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.1.tgz", + "integrity": "sha512-5ynfGDzxxsoV73+4czQM56qF43vsmgJsO22rmAvU5tZT2z5Xow/A2uhhxwXuGTxgdReF3zcp7A80gma2onRs1A==", "dependencies": { "@types/use-sync-external-store": "^0.0.3", "use-sync-external-store": "^1.0.0" @@ -20747,9 +20747,9 @@ } }, "node_modules/typescript": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", - "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "devOptional": true, "bin": { "tsc": "bin/tsc", @@ -21764,9 +21764,9 @@ } }, "node_modules/webpack-bundle-analyzer": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", - "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "0.5.7", @@ -21777,7 +21777,6 @@ "escape-string-regexp": "^4.0.0", "gzip-size": "^6.0.0", "html-escaper": "^2.0.2", - "is-plain-object": "^5.0.0", "opener": "^1.5.2", "picocolors": "^1.0.0", "sirv": "^2.0.3", diff --git a/package.json b/package.json index 829746c5..b2aa8187 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "@patternfly/react-icons": "5.2.0", "@patternfly/react-table": "5.2.0", "@patternfly/react-tokens": "5.2.0", - "@redhat-cloud-services/frontend-components": "^4.2.5", + "@redhat-cloud-services/frontend-components": "^4.2.6", "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.7", "@redhat-cloud-services/frontend-components-utilities": "^4.0.10", @@ -66,12 +66,12 @@ "date-fns": "^3.6.0", "js-file-download": "^0.4.12", "lodash": "^4.17.21", - "qs": "^6.12.0", + "qs": "^6.12.1", "react": "^18.2.0", "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", "react-intl": "^6.6.5", - "react-redux": "^9.1.0", + "react-redux": "^9.1.1", "react-router-dom": "^6.22.3", "redux": "^5.0.1", "redux-thunk": "^3.1.0", @@ -88,12 +88,12 @@ "@swc/core": "1.3.105", "@swc/jest": "^0.2.36", "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^14.3.0", + "@testing-library/react": "^14.3.1", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", "@types/qs": "^6.9.14", - "@types/react": "^18.2.75", - "@types/react-dom": "^18.2.24", + "@types/react": "^18.2.78", + "@types/react-dom": "^18.2.25", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "^7.6.0", @@ -109,9 +109,9 @@ "eslint-plugin-patternfly-react": "^5.2.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.1", - "eslint-plugin-simple-import-sort": "^12.0.0", + "eslint-plugin-simple-import-sort": "^12.1.0", "eslint-plugin-sort-keys-fix": "^1.1.2", - "eslint-plugin-testing-library": "^6.2.0", + "eslint-plugin-testing-library": "^6.2.2", "git-revision-webpack-plugin": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", @@ -125,8 +125,8 @@ "rimraf": "^5.0.5", "ts-jest": "^29.1.2", "ts-patch": "^3.1.2", - "typescript": "^5.4.4", - "webpack-bundle-analyzer": "^4.10.1" + "typescript": "^5.4.5", + "webpack-bundle-analyzer": "^4.10.2" }, "overrides": { "redux": "^5.0.1" From ba76219940c86a67e7110d1320d38b3c9f888159 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Mon, 15 Apr 2024 13:30:11 -0400 Subject: [PATCH 08/10] Upgrade @testing-library/react dependency --- package-lock.json | 207 +++++++++++++----- package.json | 6 +- .../selectCheckboxWrapper.test.tsx | 6 +- .../selectWrapper/selectWrapper.test.tsx | 6 +- 4 files changed, 165 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index c460b656..d0e55a69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "@swc/core": "1.3.105", "@swc/jest": "^0.2.36", "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^14.3.1", + "@testing-library/react": "^15.0.2", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", "@types/qs": "^6.9.14", @@ -58,8 +58,8 @@ "@types/react-dom": "^18.2.25", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "^7.6.0", - "@typescript-eslint/parser": "^7.6.0", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", "@xstate/test": "^0.5.1", "aphrodite": "^2.4.0", "copy-webpack-plugin": "^12.0.2", @@ -3503,6 +3503,7 @@ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "dev": true, + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -3522,6 +3523,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -3537,6 +3539,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3553,6 +3556,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -3564,13 +3568,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "peer": true }, "node_modules/@testing-library/dom/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -3580,6 +3586,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -3706,23 +3713,121 @@ } }, "node_modules/@testing-library/react": { - "version": "14.3.1", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.3.1.tgz", - "integrity": "sha512-H99XjUhWQw0lTgyMN05W3xQG1Nh4lq574D8keFf1dDoNTJgp66VbJozRaczoF+wsiaPJNt/TcnfpLGufGxSrZQ==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-15.0.2.tgz", + "integrity": "sha512-5mzIpuytB1ctpyywvyaY2TAAUQVCZIGqwiqFQf6u9lvj/SJQepGUzNV18Xpk+NLCaCE2j7CWrZE0tEf9xLZYiQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.12.5", - "@testing-library/dom": "^9.0.0", + "@testing-library/dom": "^10.0.0", "@types/react-dom": "^18.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" }, "peerDependencies": { "react": "^18.0.0", "react-dom": "^18.0.0" } }, + "node_modules/@testing-library/react/node_modules/@testing-library/dom": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.0.0.tgz", + "integrity": "sha512-PmJPnogldqoVFf+EwbHvbBJ98MmqASV8kLrBYgsDNxQcFMeIS7JFL48sfyXvuMtgmWO/wMhh25odr+8VhDmn4g==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/react/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/react/node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/@testing-library/react/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@testing-library/react/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@testing-library/react/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@testing-library/react/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/react/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@testing-library/user-event": { "version": "14.5.2", "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", @@ -4413,16 +4518,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz", - "integrity": "sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz", + "integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/type-utils": "7.6.0", - "@typescript-eslint/utils": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/scope-manager": "7.7.0", + "@typescript-eslint/type-utils": "7.7.0", + "@typescript-eslint/utils": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.3.1", @@ -4481,15 +4586,15 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz", + "integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/scope-manager": "7.7.0", + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/typescript-estree": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0", "debug": "^4.3.4" }, "engines": { @@ -4509,13 +4614,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz", - "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz", + "integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0" + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -4526,13 +4631,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz", - "integrity": "sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz", + "integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/utils": "7.6.0", + "@typescript-eslint/typescript-estree": "7.7.0", + "@typescript-eslint/utils": "7.7.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -4553,9 +4658,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz", - "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz", + "integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -4566,13 +4671,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz", - "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz", + "integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4642,17 +4747,17 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.6.0.tgz", - "integrity": "sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz", + "integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.15", "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", + "@typescript-eslint/scope-manager": "7.7.0", + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/typescript-estree": "7.7.0", "semver": "^7.6.0" }, "engines": { @@ -4700,12 +4805,12 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz", - "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz", + "integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", + "@typescript-eslint/types": "7.7.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { diff --git a/package.json b/package.json index b2aa8187..dd0cb2d8 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@swc/core": "1.3.105", "@swc/jest": "^0.2.36", "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^14.3.1", + "@testing-library/react": "^15.0.2", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", "@types/qs": "^6.9.14", @@ -96,8 +96,8 @@ "@types/react-dom": "^18.2.25", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "^7.6.0", - "@typescript-eslint/parser": "^7.6.0", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", "@xstate/test": "^0.5.1", "aphrodite": "^2.4.0", "copy-webpack-plugin": "^12.0.2", diff --git a/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx b/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx index 034ed0b1..96dc4807 100644 --- a/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx +++ b/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@testing-library/react'; +import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -24,11 +24,11 @@ test('checkbox selector', async () => { expect(screen.queryAllByText('CPU').length).toBe(0); expect(screen.queryAllByText('Memory').length).toBe(0); expect(screen.queryAllByText('Storage').length).toBe(0); - await user.click(screen.getByRole('button')); + await act(async () => user.click(screen.getByRole('button'))); expect(screen.queryAllByText('CPU').length).toBe(1); expect(screen.queryAllByText('Memory').length).toBe(1); expect(screen.queryAllByText('Storage').length).toBe(1); expect(handleOnSelect.mock.calls.length).toBe(0); - await user.click(screen.getAllByRole('checkbox')[0]); + await act(async () => user.click(screen.getAllByRole('checkbox')[0])); expect(handleOnSelect.mock.calls).toEqual([['cpu']]); }); diff --git a/src/routes/components/selectWrapper/selectWrapper.test.tsx b/src/routes/components/selectWrapper/selectWrapper.test.tsx index afe4dd9e..ff53f7f9 100644 --- a/src/routes/components/selectWrapper/selectWrapper.test.tsx +++ b/src/routes/components/selectWrapper/selectWrapper.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@testing-library/react'; +import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -23,9 +23,9 @@ test('primary selector', async () => { expect(screen.queryAllByText('CPU').length).toBe(1); expect(screen.queryAllByText('Memory').length).toBe(0); const button = screen.getByRole('button'); - await user.click(button); + await act(async () => user.click(button)); const options = screen.getAllByRole('option'); expect(options.length).toBe(3); - await user.click(options[1]); + await act(async () => user.click(options[1])); expect(handleOnSelect.mock.calls).toEqual([['memory']]); }); From 6e7a8d8a696a96c05c0d6a530e00e2c3892e3a3b Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Tue, 16 Apr 2024 12:47:43 -0400 Subject: [PATCH 09/10] Dependency updates --- package-lock.json | 16 ++++++++-------- package.json | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index d0e55a69..91c275e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,8 +53,8 @@ "@testing-library/react": "^15.0.2", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", - "@types/qs": "^6.9.14", - "@types/react": "^18.2.78", + "@types/qs": "^6.9.15", + "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", @@ -4256,9 +4256,9 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/qs": { - "version": "6.9.14", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", - "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==", + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", "dev": true }, "node_modules/@types/range-parser": { @@ -4268,9 +4268,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.78", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.78.tgz", - "integrity": "sha512-qOwdPnnitQY4xKlKayt42q5W5UQrSHjgoXNVEtxeqdITJ99k4VXJOP3vt8Rkm9HmgJpH50UNU+rlqfkfWOqp0A==", + "version": "18.2.79", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz", + "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" diff --git a/package.json b/package.json index dd0cb2d8..fc1be8bc 100644 --- a/package.json +++ b/package.json @@ -91,8 +91,8 @@ "@testing-library/react": "^15.0.2", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", - "@types/qs": "^6.9.14", - "@types/react": "^18.2.78", + "@types/qs": "^6.9.15", + "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", From f39502aabe16b3ac220b43d23e227d1ead770415 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Tue, 16 Apr 2024 13:38:13 -0400 Subject: [PATCH 10/10] The jest-workaround plugin was renamed as swc_mut_cjs_exports --- jest.config.js | 2 +- package-lock.json | 112 +++++++++++++++++++++++----------------------- package.json | 4 +- 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/jest.config.js b/jest.config.js index f1aa95d7..8ce11ad2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -29,7 +29,7 @@ module.exports = { $schema: 'http://json.schemastore.org/swcrc', jsc: { experimental: { - plugins: [['jest_workaround', {}]], + plugins: [['swc_mut_cjs_exports', {}]], }, parser: { jsx: true, diff --git a/package-lock.json b/package-lock.json index 91c275e3..4ec2fb5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^2.0.4", "@redhat-cloud-services/frontend-components-config": "^6.0.12", "@redhat-cloud-services/tsc-transform-imports": "^1.0.9", - "@swc/core": "1.3.105", + "@swc/core": "^1.4.14", "@swc/jest": "^0.2.36", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^15.0.2", @@ -77,7 +77,6 @@ "git-revision-webpack-plugin": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", - "jest_workaround": "^0.79.19", "jest-environment-jsdom": "^29.7.0", "jest-mock-axios": "^4.7.3", "jest-transform-stub": "^2.0.0", @@ -85,6 +84,7 @@ "npm-run-all": "^4.1.5", "prettier": "^3.2.5", "rimraf": "^5.0.5", + "swc_mut_cjs_exports": "^0.90.24", "ts-jest": "^29.1.2", "ts-patch": "^3.1.2", "typescript": "^5.4.5", @@ -3261,13 +3261,13 @@ } }, "node_modules/@swc/core": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.105.tgz", - "integrity": "sha512-me2VZyr3OjqRpFrYQJJYy7x/zbFSl9nt+MAGnIcBtjDsN00iTVqEaKxBjPBFQV9BDAgPz2SRWes/DhhVm5SmMw==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.14.tgz", + "integrity": "sha512-tHXg6OxboUsqa/L7DpsCcFnxhLkqN/ht5pCwav1HnvfthbiNIJypr86rNx4cUnQDJepETviSqBTIjxa7pSpGDQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.1", + "@swc/counter": "^0.1.2", "@swc/types": "^0.1.5" }, "engines": { @@ -3278,16 +3278,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.105", - "@swc/core-darwin-x64": "1.3.105", - "@swc/core-linux-arm-gnueabihf": "1.3.105", - "@swc/core-linux-arm64-gnu": "1.3.105", - "@swc/core-linux-arm64-musl": "1.3.105", - "@swc/core-linux-x64-gnu": "1.3.105", - "@swc/core-linux-x64-musl": "1.3.105", - "@swc/core-win32-arm64-msvc": "1.3.105", - "@swc/core-win32-ia32-msvc": "1.3.105", - "@swc/core-win32-x64-msvc": "1.3.105" + "@swc/core-darwin-arm64": "1.4.14", + "@swc/core-darwin-x64": "1.4.14", + "@swc/core-linux-arm-gnueabihf": "1.4.14", + "@swc/core-linux-arm64-gnu": "1.4.14", + "@swc/core-linux-arm64-musl": "1.4.14", + "@swc/core-linux-x64-gnu": "1.4.14", + "@swc/core-linux-x64-musl": "1.4.14", + "@swc/core-win32-arm64-msvc": "1.4.14", + "@swc/core-win32-ia32-msvc": "1.4.14", + "@swc/core-win32-x64-msvc": "1.4.14" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -3299,9 +3299,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.105.tgz", - "integrity": "sha512-buWeweLVDXXmcnfIemH4PGnpjwsDTUGitnPchdftb0u1FU8zSSP/lw/pUCBDG/XvWAp7c/aFxgN4CyG0j7eayA==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.14.tgz", + "integrity": "sha512-8iPfLhYNspBl836YYsfv6ErXwDUqJ7IMieddV3Ey/t/97JAEAdNDUdtTKDtbyP0j/Ebyqyn+fKcqwSq7rAof0g==", "cpu": [ "arm64" ], @@ -3315,9 +3315,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.105.tgz", - "integrity": "sha512-hFmXPApqjA/8sy/9NpljHVaKi1OvL9QkJ2MbbTCCbJERuHMpMUeMBUWipHRfepGHFhU+9B9zkEup/qJaJR4XIg==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.14.tgz", + "integrity": "sha512-9CqSj8uRZ92cnlgAlVaWMaJJBdxtNvCzJxaGj5KuIseeG6Q0l1g+qk8JcU7h9dAsH9saHTNwNFBVGKQo0W0ujg==", "cpu": [ "x64" ], @@ -3331,9 +3331,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.105.tgz", - "integrity": "sha512-mwXyMC41oMKkKrPpL8uJpOxw7fyfQoVtIw3Y5p0Blabk+espNYqix0E8VymHdRKuLmM//z5wVmMsuHdGBHvZeg==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.14.tgz", + "integrity": "sha512-mfd5JArPITTzMjcezH4DwMw+BdjBV1y25Khp8itEIpdih9ei+fvxOOrDYTN08b466NuE2dF2XuhKtRLA7fXArQ==", "cpu": [ "arm" ], @@ -3347,9 +3347,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.105.tgz", - "integrity": "sha512-H7yEIVydnUtqBSUxwmO6vpIQn7j+Rr0DF6ZOORPyd/SFzQJK9cJRtmJQ3ZMzlJ1Bb+1gr3MvjgLEnmyCYEm2Hg==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.14.tgz", + "integrity": "sha512-3Lqlhlmy8MVRS9xTShMaPAp0oyUt0KFhDs4ixJsjdxKecE0NJSV/MInuDmrkij1C8/RQ2wySRlV9np5jK86oWw==", "cpu": [ "arm64" ], @@ -3363,9 +3363,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.105.tgz", - "integrity": "sha512-Jg7RTFT3pGFdGt5elPV6oDkinRy7q9cXpenjXnJnM2uvx3jOwnsAhexPyCDHom8SHL0j+9kaLLC66T3Gz1E4UA==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.14.tgz", + "integrity": "sha512-n0YoCa64TUcJrbcXIHIHDWQjdUPdaXeMHNEu7yyBtOpm01oMGTKP3frsUXIABLBmAVWtKvqit4/W1KVKn5gJzg==", "cpu": [ "arm64" ], @@ -3379,9 +3379,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.105.tgz", - "integrity": "sha512-DJghplpyusAmp1X5pW/y93MmS/u83Sx5GrpJxI6KLPa82+NItTgMcl8KBQmW5GYAJpVKZyaIvBanS5TdR8aN2w==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.14.tgz", + "integrity": "sha512-CGmlwLWbfG1dB4jZBJnp2IWlK5xBMNLjN7AR5kKA3sEpionoccEnChOEvfux1UdVJQjLRKuHNV9yGyqGBTpxfQ==", "cpu": [ "x64" ], @@ -3395,9 +3395,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.105.tgz", - "integrity": "sha512-wD5jL2dZH/5nPNssBo6jhOvkI0lmWnVR4vnOXWjuXgjq1S0AJpO5jdre/6pYLmf26hft3M42bteDnjR4AAZ38w==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.14.tgz", + "integrity": "sha512-xq4npk8YKYmNwmr8fbvF2KP3kUVdZYfXZMQnW425gP3/sn+yFQO8Nd0bGH40vOVQn41kEesSe0Z5O/JDor2TgQ==", "cpu": [ "x64" ], @@ -3411,9 +3411,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.105.tgz", - "integrity": "sha512-UqJtwILUHRw2+3UTPnRkZrzM/bGdQtbR4UFdp79mZQYfryeOUVNg7aJj/bWUTkKtLiZ3o+FBNrM/x2X1mJX5bA==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.14.tgz", + "integrity": "sha512-imq0X+gU9uUe6FqzOQot5gpKoaC00aCUiN58NOzwp0QXEupn8CDuZpdBN93HiZswfLruu5jA1tsc15x6v9p0Yg==", "cpu": [ "arm64" ], @@ -3427,9 +3427,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.105.tgz", - "integrity": "sha512-Z95C6vZgBEJ1snidYyjVKnVWiy/ZpPiIFIXGWkDr4ZyBgL3eZX12M6LzZ+NApHKffrbO4enbFyFomueBQgS2oA==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.14.tgz", + "integrity": "sha512-cH6QpXMw5D3t+lpx6SkErHrxN0yFzmQ0lgNAJxoDRiaAdDbqA6Col8UqUJwUS++Ul6aCWgNhCdiEYehPaoyDPA==", "cpu": [ "ia32" ], @@ -3443,9 +3443,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.105", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.105.tgz", - "integrity": "sha512-3J8fkyDPFsS3mszuYUY4Wfk7/B2oio9qXUwF3DzOs2MK+XgdyMLIptIxL7gdfitXJBH8k39uVjrIw1JGJDjyFA==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.14.tgz", + "integrity": "sha512-FmZ4Tby4wW65K/36BKzmuu7mlq7cW5XOxzvufaSNVvQ5PN4OodAlqPjToe029oma4Av+ykJiif64scMttyNAzg==", "cpu": [ "x64" ], @@ -13449,16 +13449,6 @@ } } }, - "node_modules/jest_workaround": { - "version": "0.79.19", - "resolved": "https://registry.npmjs.org/jest_workaround/-/jest_workaround-0.79.19.tgz", - "integrity": "sha512-g/MtKSwyb4Ohnd5GHeJaduTgznkyst81x+eUBGOSGK7f8doWuRMPpt6XM/13sM2jLB2QNzT/7Djj7o2PhsozIA==", - "dev": true, - "peerDependencies": { - "@swc/core": "^1.3.68", - "@swc/jest": "^0.2.26" - } - }, "node_modules/jest-changed-files": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", @@ -19935,6 +19925,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swc_mut_cjs_exports": { + "version": "0.90.24", + "resolved": "https://registry.npmjs.org/swc_mut_cjs_exports/-/swc_mut_cjs_exports-0.90.24.tgz", + "integrity": "sha512-8OBb1kaouRrpB42XFD7q7KGEaGxnGsEqxIFaUiCFp9w4pCy4rzzrpntlX3nZDhdAKnk4bLL6K979DUKRaBaBRg==", + "dev": true, + "peerDependencies": { + "@swc/core": "^1.4.0", + "@swc/jest": "^0.2.36" + } + }, "node_modules/swc-loader": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.6.tgz", diff --git a/package.json b/package.json index fc1be8bc..c5a413ba 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^2.0.4", "@redhat-cloud-services/frontend-components-config": "^6.0.12", "@redhat-cloud-services/tsc-transform-imports": "^1.0.9", - "@swc/core": "1.3.105", + "@swc/core": "^1.4.14", "@swc/jest": "^0.2.36", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^15.0.2", @@ -115,7 +115,6 @@ "git-revision-webpack-plugin": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", - "jest_workaround": "^0.79.19", "jest-environment-jsdom": "^29.7.0", "jest-mock-axios": "^4.7.3", "jest-transform-stub": "^2.0.0", @@ -123,6 +122,7 @@ "npm-run-all": "^4.1.5", "prettier": "^3.2.5", "rimraf": "^5.0.5", + "swc_mut_cjs_exports": "^0.90.24", "ts-jest": "^29.1.2", "ts-patch": "^3.1.2", "typescript": "^5.4.5",