-
-
Notifications
You must be signed in to change notification settings - Fork 10
chore: pre-shape repo into pnpm-workspace monorepo layout #1254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
31ce517
2e73660
0c4fbfe
faa626b
7a07b00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,24 +67,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' | ||
| - 'pnpm-lock.yaml' | ||
| - '.github/workflows/ci.yml' | ||
| codemod: | ||
|
|
@@ -119,7 +119,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}" | ||
|
|
@@ -169,8 +169,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/**') }} | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| - if: steps.cache.outputs.cache-hit != 'true' | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Generate API Schema | ||
|
|
@@ -182,7 +185,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" | ||
|
|
@@ -191,7 +194,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" | ||
|
|
@@ -202,7 +205,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' | ||
|
|
@@ -224,8 +227,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 | ||
|
|
@@ -255,8 +261,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 | ||
|
|
@@ -290,8 +299,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 | ||
|
|
@@ -337,8 +349,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 | ||
|
|
@@ -357,9 +369,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 | ||
|
|
@@ -369,9 +381,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. | ||
|
|
@@ -397,23 +409,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 | ||
|
|
@@ -754,8 +766,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 | ||
|
|
@@ -801,8 +816,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 | ||
|
|
@@ -831,7 +849,7 @@ jobs: | |
| # create and open the database reliably. The runner's ~/.sentry | ||
| # may not exist under the switched Node 20 runtime. | ||
| SENTRY_CONFIG_DIR: ${{ runner.temp }}/.sentry-smoke | ||
| run: node dist/bin.cjs --help | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stale root npm pack stepMedium Severity The original root Additional Locations (1)Reviewed by Cursor Bugbot for commit faa626b. Configure here. |
||
| run: node packages/cli/dist/bin.cjs --help | ||
| - name: Smoke test (Node.js — deep) | ||
| shell: bash | ||
| env: | ||
|
|
@@ -843,7 +861,7 @@ jobs: | |
| # migrations, telemetry lazy import, and the CJS require chain. | ||
| # On Node 20 this runs entirely through the bundled WASM SQLite | ||
| # driver. Expected: exit 10 (AUTH_NOT_AUTHENTICATED), NOT a crash. | ||
| 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" | ||
|
|
@@ -854,12 +872,14 @@ jobs: | |
| echo "$OUTPUT" | ||
| 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 | ||
|
|
@@ -885,13 +905,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: | ||
|
|
@@ -902,7 +925,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 }} | ||
|
|
@@ -919,18 +942,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: | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.