From 1bdf58e6783e462ff80c9ee025154b997b66f71c Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 14 Oct 2023 15:22:02 +0800 Subject: [PATCH] ci: workaround for jest/globals env issue --- .github/workflows/ci.yml | 3 ++- .github/workflows/release.yml | 2 +- patches/eslint-config-kentcdodds+20.5.0.patch | 13 +++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 patches/eslint-config-kentcdodds+20.5.0.patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36751fc..79e00a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,10 @@ jobs: - 14 - 16 - 18 + - 20 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3559b2..7ec9fe3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 diff --git a/patches/eslint-config-kentcdodds+20.5.0.patch b/patches/eslint-config-kentcdodds+20.5.0.patch new file mode 100644 index 0000000..18c828f --- /dev/null +++ b/patches/eslint-config-kentcdodds+20.5.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/eslint-config-kentcdodds/jest.js b/node_modules/eslint-config-kentcdodds/jest.js +index bffd2c1..a35bac5 100644 +--- a/node_modules/eslint-config-kentcdodds/jest.js ++++ b/node_modules/eslint-config-kentcdodds/jest.js +@@ -30,7 +30,7 @@ try { + + module.exports = { + env: { +- 'jest/globals': true, ++ jest: true, + }, + plugins: [ + 'jest',