Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/check-provenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
has_unpublished: ${{ steps.check.outputs.has_unpublished }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*

- name: Check npm provenance
id: check
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const fs = require('node:fs');
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
core.setOutput('unpublished_packages', results.notPublished);

- name: Upload results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: provenance-results
path: provenance-results.json
Expand All @@ -154,12 +154,12 @@ jobs:
pull-requests: write
steps:
- name: Download results
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: provenance-results

- name: Comment on PR
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: "lts/*"
cache: 'yarn'
cache: 'pnpm'

- name: Install
run: yarn install
run: pnpm install

- name: Update Version
run: |
git config --global user.email "${GIT_AUTHOR_EMAIL}"
git config --global user.name "${GIT_AUTHOR_NAME}"
yarn run ci:versionup:${SEMVER}
pnpm run ci:versionup:${SEMVER}
env:
SEMVER: ${{ github.event.inputs.semver }}
GIT_AUTHOR_NAME: ${{ github.actor }}
Expand All @@ -49,7 +52,7 @@ jobs:

- name: Set GitHub Release Note
id: release_note
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const result = await exec.getExecOutput(`gh api "/repos/{owner}/{repo}/releases/generate-notes" -f tag_name="v${process.env.PACKAGE_VERSION}" --jq .body`, [], {
Expand All @@ -62,7 +65,7 @@ jobs:

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(release): v${{ env.PACKAGE_VERSION }}"
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

Expand Down Expand Up @@ -51,12 +51,15 @@ jobs:
id-token: write # Required for OIDC authentication
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
# Release workflow should not use cache for avoiding cache poisoning
# https://docs.zizmor.sh/audits/#cache-poisoning
Expand All @@ -79,13 +82,13 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Install
run: yarn install
run: pnpm install

- name: Build
run: yarn run build
run: pnpm run build

- name: Publish
run: yarn run ci:release
run: pnpm run ci:release
env:
# OIDC authentication for npm publishing
# https://docs.npmjs.com/generating-provenance-statements
Expand All @@ -105,8 +108,7 @@ jobs:
run: |
RELEASE_URL=$(gh release create "v${PACKAGE_VERSION}" \
--title "${GITHUB_EVENT_PULL_REQUEST_TITLE}" \
--notes "${GITHUB_EVENT_PULL_REQUEST_BODY}" \
--json url -q .url)
--notes "${GITHUB_EVENT_PULL_REQUEST_BODY}")
echo "release-url=$RELEASE_URL" >> $GITHUB_OUTPUT
echo "released=true" >> $GITHUB_OUTPUT
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: andresz1/size-limit-action@e7493a72a44b113341c0cf6186ab49c17c4b65c1 # v1.6.1
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d # v1.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
56 changes: 32 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,77 +8,85 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20, 22]
node-version: [ 22, 24 ]
os: [ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: "yarn"
cache: "pnpm"
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
run: pnpm install
- name: Test
run: yarn test
run: pnpm test

test-chrome:
name: "Test Chromium browser"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: "yarn"
node-version: 20
cache: "pnpm"
node-version: 22
- name: Install
run: yarn install
run: pnpm install
- name: Test
run: yarn run test:chrome
run: pnpm run test:chrome

test-firefox:
name: "Test Firefox browser"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: "yarn"
node-version: 20
cache: "pnpm"
node-version: 22
- name: Install
run: yarn install
run: pnpm install
- name: Install Playwright Firefox with dependencies
run: npx playwright install --with-deps firefox
- name: Test
run: yarn run test:firefox
run: pnpm run test:firefox

test-webkit:
name: "Test WebKit browser"
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: "yarn"
node-version: 20
cache: "pnpm"
node-version: 22
- name: Install
run: yarn install
run: pnpm install
- name: Install Playwright WebKit with dependencies
run: npx playwright install --with-deps webkit
- name: Test
run: yarn run test:webkit
run: pnpm run test:webkit
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages/*"
],
"version": "2.2.1",
"npmClient": "yarn"
"npmClient": "pnpm"
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"license": "MIT",
"author": "azu",
"scripts": {
"prepublishOnly": "npm run clean && npm run build",
"prepublishOnly": "pnpm run clean && pnpm run build",
"build": "lerna run build",
"clean": "lerna run clean",
"test": "lerna run test && npm run size",
"test": "lerna run test && pnpm run size",
"test:browser": "lerna run test:browser",
"test:chrome": "lerna run test:chrome",
"test:firefox": "lerna run test:firefox",
Expand Down Expand Up @@ -54,5 +54,6 @@
"lint-staged": "^13.2.3",
"prettier": "^3.0.0",
"size-limit": "^8.2.6"
}
},
"packageManager": "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48"
}
2 changes: 1 addition & 1 deletion packages/common-test-case/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"trailingComma": "none"
},
"dependencies": {
"@kvs/types": "^2.2.1"
"@kvs/types": "workspace:^"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
Expand Down
6 changes: 4 additions & 2 deletions packages/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
"trailingComma": "none"
},
"dependencies": {
"@kvs/indexeddb": "^2.2.1",
"@kvs/node-localstorage": "^2.2.1"
"@kvs/indexeddb": "workspace:^",
"@kvs/node-localstorage": "workspace:^",
"@kvs/storage": "workspace:^",
"@kvs/types": "workspace:^"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
Expand Down
5 changes: 3 additions & 2 deletions packages/indexeddb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
"trailingComma": "none"
},
"dependencies": {
"@kvs/types": "^2.2.1"
"@kvs/storage": "workspace:^",
"@kvs/types": "workspace:^"
},
"devDependencies": {
"@kvs/common-test-case": "^2.2.1",
"@kvs/common-test-case": "workspace:^",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"mocha": "^10.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/localstorage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"trailingComma": "none"
},
"dependencies": {
"@kvs/storage": "^2.2.1"
"@kvs/storage": "workspace:^",
"@kvs/types": "workspace:^"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
Expand Down
6 changes: 5 additions & 1 deletion packages/memorystorage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@
"tabWidth": 4,
"trailingComma": "none"
},
"dependencies": {
"@kvs/storage": "workspace:^",
"@kvs/types": "workspace:^"
},
"devDependencies": {
"@kvs/common-test-case": "^2.2.1",
"@kvs/common-test-case": "workspace:^",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"mocha": "^10.2.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/node-localstorage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@
"trailingComma": "none"
},
"dependencies": {
"@kvs/storage": "^2.2.1",
"@kvs/storage": "workspace:^",
"@kvs/types": "workspace:^",
"app-root-path": "^3.1.0",
"node-localstorage": "^2.1.6"
},
"devDependencies": {
"@kvs/common-test-case": "^2.2.1",
"@kvs/common-test-case": "workspace:^",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"mocha": "^10.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/storage-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"trailingComma": "none"
},
"dependencies": {
"@kvs/types": "^2.2.1"
"@kvs/types": "workspace:^"
},
"devDependencies": {
"@kvs/common-test-case": "^2.2.1",
"@kvs/common-test-case": "workspace:^",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"mocha": "^10.2.0",
Expand Down
Loading