Skip to content

Commit

Permalink
fix: fix issue #7 + version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ndungtse committed Nov 27, 2023
1 parent b3f52bc commit 84b34e9
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm ci
- run: npm lint

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm prepack
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
"react-dom": "18.2.0",
"typescript": "5.1.5"
}
}
}
6 changes: 3 additions & 3 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1507,9 +1507,9 @@ natural-compare@^1.4.0:
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==

next13-progressbar@latest:
version "1.0.2"
resolved "https://registry.yarnpkg.com/next13-progressbar/-/next13-progressbar-1.0.2.tgz#6353a71a47b6aedfa98744bf11ce24aa432ff9e4"
integrity sha512-Cd5IHpXfIwRGYmQ6eLJzstC41NyU6oAE8TSm5SNR0RE2DjHz/ZEVvGBSolA/ctaDhjF08Y0h0vp7/XKkC3J+Ag==
version "1.1.0"
resolved "https://registry.yarnpkg.com/next13-progressbar/-/next13-progressbar-1.1.0.tgz#6092fe7539a72e9683afcfdb2630d905a0264d31"
integrity sha512-UOCTLqaJhQfoh/SHAJu1Masrd7sKShV0rf4ExxHswjc3t2JF82UZTANaevyad31ldujVFSShkx7+fSnbC+Hm9Q==
dependencies:
"@types/nprogress" "^0.2.0"
nprogress "^0.2.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next13-progressbar",
"version": "1.1.0",
"version": "1.1.1",
"description": "A ProgressBar for next.js >=13 with app directory ",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/AppProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export const Next13ProgressBar = React.memo(
const currentUrl = new URL(location.href);
const isSameUrl = targetUrl?.pathname === currentUrl?.pathname;

// detect ctrl/cmd click
if (event.metaKey || event.ctrlKey) return;
// detect ctrl/cmd option/alt shift click
if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;

if (showOnShallow && isSameUrl) return;
if (isSameUrl) return;
Expand Down

0 comments on commit 84b34e9

Please sign in to comment.