From b0b08d59963eeb185133c9272524fbee0f64680a Mon Sep 17 00:00:00 2001 From: gaearon Date: Wed, 29 Nov 2023 00:13:03 +0000 Subject: [PATCH] Update list source --- .github/workflows/release.yml | 17 ++++++++++++++++- CHANGELOG.md | 5 +++++ package.json | 4 ++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fac453..3176b70 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,22 @@ jobs: exit 1 fi - run: npm run build - - run: npm t + - run: npm t -- -u + - name: commit auto fixes + env: + USERNAME: ${{ github.actor }} + BRANCH: ${{ github.ref_name }} + REPO: ${{ github.repository }} + TOKEN: ${{ secrets.GH_TOKEN }} + run: | + if [ "$(git diff --quiet && echo 0 || echo $?)" -gt 0 ]; then + git config --global user.email "${USERNAME}@users.noreply.github.com" --replace-all + git config --global user.name "$USERNAME" --replace-all + git commit -am "😎 Autofix" + git remote set-url origin https://${TOKEN}@github.com/$REPO.git + git push origin $BRANCH + exit 1 + fi - name: Add NPM token if: github.ref == 'refs/heads/main' env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 91abb93..400e1db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 2.0.5 + +- Update list source +- Add: 477-500 + ## 2.0.4 - Add: 476 diff --git a/package.json b/package.json index d05ee2c..c83fe90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-error-decoder", - "version": "2.0.4", + "version": "2.0.5", "description": "⚛︎ Decode React minified error message", "keywords": [ "react", @@ -45,7 +45,7 @@ }, "types": "index.d.ts", "scripts": { - "prepare": "curl https://legacy.reactjs.org/page-data/docs/error-decoder.html/page-data.json | jq '.result.data.errorCodesJson.internal.contentDigest' -r > src/collection.json", + "prepare": "curl https://raw.githubusercontent.com/facebook/react/main/scripts/error-codes/codes.json > src/collection.json", "build": "./scripts/build.sh", "format": "prettier --write .", "lint": "prettier --check .",