Skip to content

Commit

Permalink
chore(deps): update dependency jest to v30.0.0-alpha.3 (prettier#16106)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <[email protected]>
  • Loading branch information
renovate[bot] and fisker authored Feb 24, 2024
1 parent ec0584f commit 3bfabd0
Show file tree
Hide file tree
Showing 4 changed files with 458 additions and 492 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/prod-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,15 @@ jobs:
node-version: ${{ matrix.node }}
cache: "yarn"

# `[email protected]` is the last version that supports Node.js v14
- name: Install [email protected]
if: ${{ matrix.node == '14' }}
run: node ./scripts/prepare-nodejs-14-test.js

- name: Install Dependencies(yarn@3,mutable)
if: ${{ matrix.node == '14' || matrix.node == '16' }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
if: ${{ matrix.node == '14' || matrix.node == '16' }}
run: yarn install

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"eslint-plugin-unicorn": "51.0.1",
"esm-utils": "4.2.1",
"execa": "7.2.0",
"jest": "30.0.0-alpha.2",
"jest": "30.0.0-alpha.3",
"jest-light-runner": "0.6.0",
"jest-snapshot-serializer-ansi": "2.1.0",
"jest-snapshot-serializer-raw": "2.0.0",
Expand Down
77 changes: 77 additions & 0 deletions scripts/prepare-nodejs-14-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import fs from "node:fs";

const packageJsonFile = new URL("../package.json", import.meta.url);
const packageJson = JSON.parse(fs.readFileSync(packageJsonFile));

// Script to get dependencies
// console.log(
// Object.fromEntries(
// Array.from(
// fs
// .readFileSync("./yarn.lock", "utf8")
// .matchAll(/"(.*?)@npm:30\.0\.0-alpha\.3[",]/g),
// (match) => match[1],
// )
// .sort()
// .map((dependency) => [dependency, "30.0.0-alpha.2"]),
// ),
// );

fs.writeFileSync(
packageJsonFile,
JSON.stringify(
{
...packageJson,
resolutions: {
...packageJson.resolutions,
"@jest/console": "30.0.0-alpha.2",
"@jest/core": "30.0.0-alpha.2",
"@jest/environment": "30.0.0-alpha.2",
"@jest/expect": "30.0.0-alpha.2",
"@jest/expect-utils": "30.0.0-alpha.2",
"@jest/fake-timers": "30.0.0-alpha.2",
"@jest/globals": "30.0.0-alpha.2",
"@jest/reporters": "30.0.0-alpha.2",
"@jest/schemas": "30.0.0-alpha.2",
"@jest/source-map": "30.0.0-alpha.2",
"@jest/test-result": "30.0.0-alpha.2",
"@jest/test-sequencer": "30.0.0-alpha.2",
"@jest/transform": "30.0.0-alpha.2",
// "@jest/types": "30.0.0-alpha.2",
"babel-jest": "30.0.0-alpha.2",
"babel-plugin-jest-hoist": "30.0.0-alpha.2",
"babel-preset-jest": "30.0.0-alpha.2",
"diff-sequences": "30.0.0-alpha.2",
expect: "30.0.0-alpha.2",
jest: "30.0.0-alpha.2",
"jest-changed-files": "30.0.0-alpha.2",
"jest-circus": "30.0.0-alpha.2",
"jest-cli": "30.0.0-alpha.2",
"jest-config": "30.0.0-alpha.2",
"jest-diff": "30.0.0-alpha.2",
// "jest-docblock": "30.0.0-alpha.2",
"jest-each": "30.0.0-alpha.2",
"jest-environment-node": "30.0.0-alpha.2",
"jest-get-type": "30.0.0-alpha.2",
"jest-haste-map": "30.0.0-alpha.2",
"jest-leak-detector": "30.0.0-alpha.2",
"jest-matcher-utils": "30.0.0-alpha.2",
"jest-message-util": "30.0.0-alpha.2",
"jest-mock": "30.0.0-alpha.2",
"jest-regex-util": "30.0.0-alpha.2",
"jest-resolve": "30.0.0-alpha.2",
"jest-resolve-dependencies": "30.0.0-alpha.2",
"jest-runner": "30.0.0-alpha.2",
"jest-runtime": "30.0.0-alpha.2",
"jest-snapshot": "30.0.0-alpha.2",
"jest-util": "30.0.0-alpha.2",
"jest-validate": "30.0.0-alpha.2",
"jest-watcher": "30.0.0-alpha.2",
"jest-worker": "30.0.0-alpha.2",
"pretty-format": "30.0.0-alpha.2",
},
},
undefined,
2,
),
);
Loading

0 comments on commit 3bfabd0

Please sign in to comment.