From 84b34e9153ea33387d9bf8f4983fd81315ab02ee Mon Sep 17 00:00:00 2001 From: Ndungutse Charles <95475354+NdungutseCharles103@users.noreply.github.com> Date: Mon, 27 Nov 2023 07:52:07 +0200 Subject: [PATCH] fix: fix issue #7 + version 1.1.1 --- .../workflows/npm-publish-github-packages.yml | 37 +++++++++++++++++++ example/package.json | 2 +- example/yarn.lock | 6 +-- package.json | 2 +- src/AppProgressBar.tsx | 4 +- 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000..92edc28 --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -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}} diff --git a/example/package.json b/example/package.json index 9669074..2d83f94 100644 --- a/example/package.json +++ b/example/package.json @@ -20,4 +20,4 @@ "react-dom": "18.2.0", "typescript": "5.1.5" } -} +} \ No newline at end of file diff --git a/example/yarn.lock b/example/yarn.lock index a49fa8f..121c7e7 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -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" diff --git a/package.json b/package.json index 8fe5e89..3c975a7 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/AppProgressBar.tsx b/src/AppProgressBar.tsx index 1244f27..ba6e464 100644 --- a/src/AppProgressBar.tsx +++ b/src/AppProgressBar.tsx @@ -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;