diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eed87b7..07a3490 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: push: branches: - - master + - main pull_request: jobs: @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@v3 - - name: Use Node.js v18 - uses: actions/setup-node@v3 + uses: actions/checkout@v4 + - name: Use Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 check-latest: true cache: yarn registry-url: https://registry.npmjs.org/ @@ -30,11 +30,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@v3 - - name: Use Node.js v18 - uses: actions/setup-node@v3 + uses: actions/checkout@v4 + - name: Use Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: yarn registry-url: https://registry.npmjs.org/ - name: Install Dependencies diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a9651dd..4ec5f7a 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: push: branches: - - master + - main pull_request: jobs: @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + uses: actions/checkout@v4 - name: Add problem matcher run: echo "::add-matcher::.github/problemMatchers/eslint.json" - - name: Use Node.js v16 - uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3 + - name: Use Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 cache: yarn registry-url: https://registry.npmjs.org/ - name: Install Dependencies @@ -31,13 +31,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + uses: actions/checkout@v4 - name: Add problem matcher run: echo "::add-matcher::.github/problemMatchers/tsc.json" - - name: Use Node.js v16 - uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 + - name: Use Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 cache: yarn registry-url: https://registry.npmjs.org/ - name: Install Dependencies diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index 1515789..63defe6 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -18,8 +18,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 cache: 'yarn' @@ -33,8 +33,8 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 registry-url: https://npm.pkg.github.com/ diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5fd0a65..cfe1cce 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,10 +8,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '18.x' + node-version: '20.x' registry-url: 'https://registry.npmjs.org' - run: yarn - run: yarn run build diff --git a/src/AppProgressBar.tsx b/src/AppProgressBar.tsx index b462e81..0496af5 100644 --- a/src/AppProgressBar.tsx +++ b/src/AppProgressBar.tsx @@ -150,12 +150,16 @@ export const Next13ProgressBar = React.memo( const mutationObserver = new MutationObserver(handleMutation); mutationObserver.observe(document, { childList: true, subtree: true }); - window.history.pushState = new Proxy(window.history.pushState, { + const proxyStateChange = new Proxy(window.history.pushState, { apply: (target, thisArg, argArray: PushStateInput) => { stopProgress(); return target.apply(thisArg, argArray); }, }); + + window.history.pushState = proxyStateChange; + window.history.replaceState = proxyStateChange; + }, []); return styles;