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
3 changes: 2 additions & 1 deletion .github/actions/setup-vp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ runs:
id: versions
shell: bash
run: |
version=$(jq -er '.devDependencies["vite-plus"] | sub("^[~^]"; "")' package.json)
version=$(sed -n 's/^ vite-plus: //p' pnpm-workspace.yaml)
test -n "$version"
echo "vite-plus-version=${version}" >> "$GITHUB_OUTPUT"

- name: Set up Vite+
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,17 @@ jobs:
permission-pull-requests: write
- name: Resolve release bot identity
id: release-bot-identity
shell: bash
env:
GH_TOKEN: ${{ steps.release-bot.outputs.token }}
APP_SLUG: ${{ steps.release-bot.outputs.app-slug }}
run: |
set -euo pipefail
user_id="$(gh api "/users/${APP_SLUG}%5Bbot%5D" --jq .id)"
user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)"
if [[ ! "$user_id" =~ ^[0-9]+$ ]]; then
echo "failed to resolve numeric bot user id for ${APP_SLUG}[bot]" >&2
exit 1
fi
echo "user_id=${user_id}" >> "$GITHUB_OUTPUT"
echo "user-id=${user_id}" >> "$GITHUB_OUTPUT"
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -144,6 +143,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }}
GIT_AUTHOR_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot]
GIT_AUTHOR_EMAIL: ${{ steps.release-bot-identity.outputs.user_id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com
GIT_AUTHOR_EMAIL: ${{ steps.release-bot-identity.outputs.user-id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot]
GIT_COMMITTER_EMAIL: ${{ steps.release-bot-identity.outputs.user_id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com
GIT_COMMITTER_EMAIL: ${{ steps.release-bot-identity.outputs.user-id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com
Comment thread
altaywtf marked this conversation as resolved.
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,19 @@
- `vp config`
- `vp check .`
- `vp pack`
- `vp run clean`
- `vp run test`
- `vp run coverage`
- `vp run test:consumer`
- `vp run verify`

## Worktrees

`.worktreeinclude` declares which ignored local files managed worktrees carry
over. It is tracked and lists no files by design; a comment records that no
ignored local files are needed. In a fresh worktree run `vp install`,
`vp config`, then `vp run verify`.

## Repo-Specific Guidance

- Keep `README.md` consumer-facing. Put contributor workflow in `CONTRIBUTING.md` and keep `AGENTS.md` as the routing layer.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pas.pageView();

## Docs

- [Distribution](./docs/DISTRIBUTION.md)
- [Security](./SECURITY.md)

## Contributing
Expand Down
6 changes: 6 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": ["src/index.ts", "src/**/*.spec.ts", "scripts/**/*.mjs"],
"project": ["src/**/*.ts", "scripts/**/*.mjs", "*.config.ts"],
"ignoreExportsUsedInFile": true
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
"clean": "rm -rf coverage dist",
"coverage": "vp test run --coverage",
"dev": "vp pack --watch",
"lint:unused": "knip",
"lint:unused:prod": "vp pack && knip --production --no-gitignore",
"prepack": "vp pack",
"test": "vp test",
"test:consumer": "vp pack && node ./scripts/consumer-smoke.mjs",
"verify": "vp check . && vp pack && vp test && vp test run --coverage"
"verify": "vp check . && vp pack && knip && knip --production --no-gitignore && vp test run --coverage"
},
"dependencies": {
"js-cookie": "^3.0.8",
Expand All @@ -59,9 +61,10 @@
"@types/node": "^26.1.2",
"@vitest/coverage-v8": "catalog:",
"jsdom": "^30.0.1",
"knip": "^6.24.0",
"typescript": "^7.0.2",
"vite": "catalog:",
"vite-plus": "0.2.6",
"vite-plus": "catalog:",
"vitest": "catalog:",
"xhr-mock": "^2.5.1"
},
Expand Down
Loading