Skip to content

Commit

Permalink
Merge pull request #33 from ndungtse/test
Browse files Browse the repository at this point in the history
fix: Disable loader on replace state and update ci versions
  • Loading branch information
ndungtse authored Oct 16, 2024
2 parents 846776f + bb3324a commit 6dd44cc
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Continuous Integration
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand All @@ -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/
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Continuous Integration
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/AppProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6dd44cc

Please sign in to comment.