Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ changelog:
policy: auto
versioning:
policy: auto
preReleaseCommand: node --experimental-strip-types script/bump-version.ts --pre
postReleaseCommand: node --experimental-strip-types script/bump-version.ts --post
preReleaseCommand: bash -c 'cd packages/cli && node --experimental-strip-types script/bump-version.ts --pre'
postReleaseCommand: bash -c 'cd packages/cli && node --experimental-strip-types script/bump-version.ts --post'
artifactProvider:
name: github
config:
Expand Down
132 changes: 77 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ jobs:
with:
filters: |
skill:
- 'src/**'
- 'docs/**'
- 'package.json'
- 'README.md'
- 'DEVELOPMENT.md'
- 'script/generate-skill.ts'
- 'script/generate-command-docs.ts'
- 'script/generate-docs-sections.ts'
- 'script/eval-skill.ts'
- 'test/skill-eval/**'
- 'packages/cli/src/**'
- 'apps/cli-docs/**'
- 'packages/cli/package.json'
- 'packages/cli/README.md'
- 'packages/cli/DEVELOPMENT.md'
- 'packages/cli/script/generate-skill.ts'
- 'packages/cli/script/generate-command-docs.ts'
- 'packages/cli/script/generate-docs-sections.ts'
- 'packages/cli/script/eval-skill.ts'
- 'packages/cli/test/skill-eval/**'
code:
- 'src/**'
- 'test/**'
- 'script/**'
- 'patches/**'
- 'docs/**'
- 'plugins/**'
- 'package.json'
- 'packages/cli/src/**'
- 'packages/cli/test/**'
- 'packages/cli/script/**'
- 'packages/cli/patches/**'
- 'apps/cli-docs/**'
- 'packages/cli/plugins/**'
- 'packages/cli/package.json'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI filter omits workspace root

Medium Severity

The code paths filter still watches packages/cli/package.json but no longer includes the workspace-root package.json, where pnpm.patchedDependencies and pnpm.overrides now live after the monorepo split. Commits that only change root workspace config (or .npmrc / pnpm-workspace.yaml) may skip lint, unit tests, builds, and check:patches.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 20669e5. Configure here.

- 'pnpm-lock.yaml'
- '.github/workflows/ci.yml'
codemod:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
TS=$(date -d "$COMMIT_TIMESTAMP" +%s)
CURRENT=$(jq -r .version package.json)
CURRENT=$(jq -r .version packages/cli/package.json)
VERSION=$(echo "$CURRENT" | sed "s/-dev\.[0-9]*$/-dev.${TS}/")
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Nightly version: ${VERSION}"
Expand Down Expand Up @@ -163,8 +163,11 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
Comment thread
cursor[bot] marked this conversation as resolved.
- if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Generate API Schema
Expand All @@ -176,7 +179,7 @@ jobs:
- name: Check skill files
id: check-skill
run: |
if git diff --quiet plugins/sentry-cli/skills/sentry-cli/; then
if git diff --quiet packages/cli/plugins/sentry-cli/skills/sentry-cli/; then
echo "Skill files are up to date"
else
echo "stale=true" >> "$GITHUB_OUTPUT"
Expand All @@ -185,7 +188,7 @@ jobs:
- name: Check docs sections
id: check-sections
run: |
if git diff --quiet README.md DEVELOPMENT.md docs/src/content/docs/contributing.md docs/src/content/docs/self-hosted.md docs/src/content/docs/getting-started.mdx; then
if git diff --quiet packages/cli/README.md packages/cli/DEVELOPMENT.md apps/cli-docs/src/content/docs/contributing.md apps/cli-docs/src/content/docs/self-hosted.md apps/cli-docs/src/content/docs/getting-started.mdx; then
echo "Docs sections are up to date"
else
echo "stale=true" >> "$GITHUB_OUTPUT"
Expand All @@ -196,7 +199,7 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add plugins/sentry-cli/skills/sentry-cli/ README.md DEVELOPMENT.md docs/src/content/docs/contributing.md docs/src/content/docs/self-hosted.md docs/src/content/docs/getting-started.mdx
git add packages/cli/plugins/sentry-cli/skills/sentry-cli/ packages/cli/README.md packages/cli/DEVELOPMENT.md apps/cli-docs/src/content/docs/contributing.md apps/cli-docs/src/content/docs/self-hosted.md apps/cli-docs/src/content/docs/getting-started.mdx
git diff --cached --quiet || (git commit -m "chore: regenerate docs" && git push)
- name: Fail for fork PRs with stale generated files
if: (steps.check-skill.outputs.stale == 'true' || steps.check-sections.outputs.stale == 'true') && steps.token.outcome != 'success'
Expand All @@ -218,8 +221,11 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- run: pnpm run generate:schema
Expand Down Expand Up @@ -249,8 +255,11 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Generate API Schema
Expand Down Expand Up @@ -284,8 +293,11 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ matrix.os }}-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ matrix.os }}-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
Expand Down Expand Up @@ -331,8 +343,8 @@ jobs:
if: needs.changes.outputs.nightly-version != ''
shell: bash
run: |
jq --arg v "${{ needs.changes.outputs.nightly-version }}" '.version = $v' package.json > package.json.tmp
mv package.json.tmp package.json
jq --arg v "${{ needs.changes.outputs.nightly-version }}" '.version = $v' packages/cli/package.json > packages/cli/package.json.tmp
mv packages/cli/package.json.tmp packages/cli/package.json
- name: Build
env:
# Environment-scoped (production) — must be set at step level to
Expand All @@ -351,9 +363,9 @@ jobs:
shell: bash
run: |
if [[ "${{ matrix.target }}" == "windows-x64" ]]; then
./dist-bin/sentry-windows-x64.exe --help
./packages/cli/dist-bin/sentry-windows-x64.exe --help
else
./dist-bin/sentry-${{ matrix.target }} --help
./packages/cli/dist-bin/sentry-${{ matrix.target }} --help
fi
- name: Smoke test (deep — SQLite, telemetry, auth DB)
if: matrix.can-test
Expand All @@ -363,9 +375,9 @@ jobs:
SENTRY_TOKEN: ""
run: |
if [[ "${{ matrix.target }}" == "windows-x64" ]]; then
BIN=./dist-bin/sentry-windows-x64.exe
BIN=./packages/cli/dist-bin/sentry-windows-x64.exe
else
BIN=./dist-bin/sentry-${{ matrix.target }}
BIN=./packages/cli/dist-bin/sentry-${{ matrix.target }}
fi
# auth status without a token exercises SQLite init, schema
# migrations, telemetry lazy import, and the CJS require chain.
Expand All @@ -391,23 +403,23 @@ jobs:
(github.ref_name == 'main' || startsWith(github.ref_name, 'release/'))
shell: bash
run: |
BIN=./dist-bin/sentry-${{ matrix.target }}
BIN=./packages/cli/dist-bin/sentry-${{ matrix.target }}
echo "Verifying code signature on $BIN..."
rcodesign verify "$BIN"
- name: Upload binary artifact
uses: actions/upload-artifact@v7
with:
name: sentry-${{ matrix.target }}
path: |
dist-bin/sentry-*
!dist-bin/*.gz
packages/cli/dist-bin/sentry-*
!packages/cli/dist-bin/*.gz

- name: Upload compressed artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: sentry-${{ matrix.target }}-gz
path: dist-bin/*.gz
path: packages/cli/dist-bin/*.gz

generate-patches:
name: Generate Delta Patches
Expand Down Expand Up @@ -748,8 +760,11 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Download Linux binary
Expand Down Expand Up @@ -790,8 +805,11 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Bundle
Expand All @@ -800,7 +818,7 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: pnpm run bundle
- name: Smoke test (Node.js)
run: node dist/bin.cjs --help
run: node packages/cli/dist/bin.cjs --help
- name: Smoke test (Node.js — deep)
shell: bash
env:
Expand All @@ -810,7 +828,7 @@ jobs:
# auth status without a token exercises SQLite init, schema
# migrations, telemetry lazy import, and the CJS require chain.
# Expected: exit 10 (AUTH_NOT_AUTHENTICATED), NOT a crash/syntax error.
OUTPUT=$(node dist/bin.cjs auth status 2>&1) && EXIT_CODE=$? || EXIT_CODE=$?
OUTPUT=$(node packages/cli/dist/bin.cjs auth status 2>&1) && EXIT_CODE=$? || EXIT_CODE=$?
if [[ $EXIT_CODE -ne 10 ]]; then
echo "::error::Expected exit code 10 (not authenticated), got $EXIT_CODE"
echo "$OUTPUT"
Expand All @@ -822,12 +840,13 @@ jobs:
exit 1
fi
- run: npm pack
working-directory: packages/cli
- name: Upload artifact
if: matrix.node == '22'
uses: actions/upload-artifact@v7
with:
name: npm-package
path: "*.tgz"
path: "packages/cli/*.tgz"

build-docs:
name: Build Docs
Expand All @@ -853,13 +872,16 @@ jobs:
- uses: actions/cache@v5
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'patches/**') }}
path: |
node_modules
packages/*/node_modules
apps/*/node_modules
key: node-modules-${{ hashFiles('pnpm-lock.yaml', '.npmrc', 'packages/cli/patches/**') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Get CLI version
id: version
run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"
run: echo "version=$(node -p 'require("./packages/cli/package.json").version')" >> "$GITHUB_OUTPUT"
- name: Download compiled CLI binary
uses: actions/download-artifact@v8
with:
Expand All @@ -870,7 +892,7 @@ jobs:
- name: Generate docs content
run: pnpm run generate:schema && pnpm run generate:docs
- name: Build Docs
working-directory: docs
working-directory: apps/cli-docs
env:
PUBLIC_SENTRY_ENVIRONMENT: production
SENTRY_RELEASE: ${{ steps.version.outputs.version }}
Expand All @@ -887,18 +909,18 @@ jobs:
SENTRY_ORG: sentry
SENTRY_PROJECT: cli-website
run: |
./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/
./dist-bin/sentry-linux-x64 sourcemap upload docs/dist/ \
./dist-bin/sentry-linux-x64 sourcemap inject apps/cli-docs/dist/
./dist-bin/sentry-linux-x64 sourcemap upload apps/cli-docs/dist/ \
--release "${{ steps.version.outputs.version }}" \
--url-prefix "~/"
# Remove .map files — they were uploaded to Sentry but shouldn't
# be deployed to production.
- name: Remove sourcemaps from output
run: find docs/dist -name '*.map' -delete
run: find apps/cli-docs/dist -name '*.map' -delete
- name: Package Docs
run: |
cp .nojekyll docs/dist/
cd docs/dist && zip -r ../../gh-pages.zip .
cp .nojekyll apps/cli-docs/dist/
cd apps/cli-docs/dist && zip -r "$GITHUB_WORKSPACE/gh-pages.zip" .
- name: Upload docs artifact
uses: actions/upload-artifact@v7
with:
Expand Down
Loading
Loading