Skip to content

fix(ci): ignore npm scripts when publishing bazel pkg#55

Merged
Jesssullivan merged 2 commits intomainfrom
fix/npm-publish-ignore-scripts
Apr 16, 2026
Merged

fix(ci): ignore npm scripts when publishing bazel pkg#55
Jesssullivan merged 2 commits intomainfrom
fix/npm-publish-ignore-scripts

Conversation

@Jesssullivan
Copy link
Copy Markdown
Owner

Summary:

  • stop re-running package lifecycle scripts when publishing the validated Bazel pkg artifact to npm
  • apply the same ignore-scripts behavior to the dry-run path
  • keep release metadata and artifact validation in the upstream test job, where they already run

Validation:

  • pnpm run check:release-metadata
  • npx --yes @bazel/bazelisk build //:pkg
  • npm publish ./bazel-bin/pkg --access public --dry-run --ignore-scripts

Root cause:
The publish-npm job was publishing ./pkg, whose packaged prepublishOnly script referenced repo files like scripts/check-release-metadata.mjs that are not present inside the stripped Bazel artifact. The workflow had already validated the artifact in test, so rerunning lifecycle scripts during publish was redundant and broke the release lane.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 16, 2026

Greptile Summary

This PR adds --ignore-scripts to all npm publish invocations in publish.yml (both the npm and GitHub Packages jobs, and both the real and dry-run paths), preventing the Bazel artifact's prepublishOnly lifecycle script from executing against a stripped artifact that lacks scripts/check-release-metadata.mjs. Validation steps continue to run in the upstream test job, so nothing is lost.

Confidence Score: 5/5

Safe to merge — the fix is minimal, correctly targeted, and no P0/P1 issues found.

All publish commands now carry --ignore-scripts, the condition logic for publish vs dry-run is correctly mutually exclusive across release and workflow_dispatch triggers, and validation remains in the test job. The only finding is a pre-existing P2: the GitHub Packages dry-run skips the package.json name mutation, reducing its fidelity as a pre-flight check.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/publish.yml Adds --ignore-scripts to all npm publish commands (both npm and GitHub Packages, both real and dry-run paths); validation steps remain in the upstream test job.
.github/workflows/ci.yml CI workflow unchanged in substance; build job retains release-metadata verification and publint validation on every push/PR.

Sequence Diagram

sequenceDiagram
    participant T as test job (publish.yml)
    participant A as GitHub Artifact Store
    participant N as publish-npm job
    participant G as publish-github job
    participant NPM as registry.npmjs.org
    participant GHP as npm.pkg.github.com

    T->>T: Verify release metadata
    T->>T: npx bazelisk build //:pkg
    T->>T: npm pack --dry-run ./bazel-bin/pkg
    T->>T: tar -czf bazel-pkg.tgz -C bazel-bin pkg
    T->>A: upload-artifact (bazel-pkg)

    A->>N: download-artifact (bazel-pkg)
    N->>N: tar -xzf bazel-pkg.tgz → ./pkg
    N->>N: chmod -R u+w pkg
    N->>NPM: npm publish ./pkg --ignore-scripts [--provenance]

    A->>G: download-artifact (bazel-pkg)
    G->>G: tar -xzf bazel-pkg.tgz → ./pkg
    G->>G: cp -R pkg pkg-github
    G->>G: node -e mutate package.json (name + publishConfig)
    G->>GHP: npm publish ./pkg-github --ignore-scripts
Loading

Comments Outside Diff (1)

  1. .github/workflows/publish.yml, line 170-173 (link)

    P2 GitHub Packages dry-run skips package.json mutation

    The actual publish step (line 160–166) mutates pkg-github/package.json to override the package name to @jesssullivan/scheduling-kit and set publishConfig.registry before calling npm publish. The dry-run step at line 171 skips that mutation, so it publishes with whatever name is baked into the Bazel artifact. If the artifact's name, scope, or registry config is wrong for GitHub Packages, the dry-run will still succeed while the real publish would fail.

    Consider moving the mutation into a dedicated step so both paths share it:

    - name: Prepare GitHub Packages publish directory
      run: |
        cp -R pkg pkg-github
        chmod -R u+w pkg-github
        node -e "
          const pkg = require('./pkg-github/package.json');
          pkg.name = '@jesssullivan/scheduling-kit';
          pkg.publishConfig = { registry: 'https://npm.pkg.github.com' };
          require('fs').writeFileSync('./pkg-github/package.json', JSON.stringify(pkg, null, 2) + '\n');
        "
    
    - name: Publish to GitHub Packages
      if: ${{ github.event_name == 'release' || github.event.inputs.dry_run != 'true' }}
      run: npm publish ./pkg-github --ignore-scripts
      env:
        NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    
    - name: Publish dry run
      if: ${{ github.event.inputs.dry_run == 'true' }}
      run: npm publish ./pkg-github --dry-run --ignore-scripts
      env:
        NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Reviews (1): Last reviewed commit: "fix(ci): clean stale bazel publish artif..." | Re-trigger Greptile

@Jesssullivan Jesssullivan merged commit 2eae00a into main Apr 16, 2026
5 of 7 checks passed
@Jesssullivan Jesssullivan deleted the fix/npm-publish-ignore-scripts branch April 16, 2026 15:34
Jesssullivan added a commit to tinyland-inc/scheduling-kit that referenced this pull request Apr 16, 2026
* refactor!: remove middleware code (belongs in acuity-middleware) (#10)

Removed: src/middleware/ (33 files), modal-app.py, Dockerfile,
live tests, playwright deps. Version 0.3.1 to 0.4.0.

* chore: bump version to 0.5.0

* refactor!: remove acuity-scraper adapter

Scraper belongs in acuity-middleware, not the scheduling library.
Deprecated since extract-business.ts + middleware wizard steps
replaced all scraper functionality.

BREAKING: AcuityScraper, createScraperAdapter, scrapeServicesOnce,
scrapeAvailabilityOnce removed from @tummycrypt/scheduling-kit/adapters.

* build: add Bazel 8 configuration with subpackage targets

- MODULE.bazel: bzlmod config with rules_js 2.9.1, rules_ts 3.8.4, SWC, pnpm 9
- BUILD.bazel: svelte-package build, npm_package, 6 subpackage ts_project
  targets (core, adapters, payments, reconciliation, lib, testing), vitest,
  svelte-check typecheck
- .bazelrc: build/CI/debug/release configs with disk cache
- .bazelversion: pin to 8.1.1
- .npmrc: hoist=false (required by rules_js)

* feat: v0.5.0 - remove acuity-scraper, add Bazel 8 config (#11)

* chore: bump version to 0.5.0

* refactor!: remove acuity-scraper adapter

Scraper belongs in acuity-middleware, not the scheduling library.
Deprecated since extract-business.ts + middleware wizard steps
replaced all scraper functionality.

BREAKING: AcuityScraper, createScraperAdapter, scrapeServicesOnce,
scrapeAvailabilityOnce removed from @tummycrypt/scheduling-kit/adapters.

* build: add Bazel 8 configuration with subpackage targets

- MODULE.bazel: bzlmod config with rules_js 2.9.1, rules_ts 3.8.4, SWC, pnpm 9
- BUILD.bazel: svelte-package build, npm_package, 6 subpackage ts_project
  targets (core, adapters, payments, reconciliation, lib, testing), vitest,
  svelte-check typecheck
- .bazelrc: build/CI/debug/release configs with disk cache
- .bazelversion: pin to 8.1.1
- .npmrc: hoist=false (required by rules_js)

* feat(venmo): add payeeEmail option to route payments to practitioner

When payeeEmail is set in VenmoAdapterConfig, the PayPal order
creation includes payee.email_address in purchase_units. This
routes payments directly to the practitioner's PayPal account
without requiring their API credentials.

Ref: PayPal "Pay another account" docs

* chore: bump version to 0.5.1 (payee-email support)

* fix(ci): use @Jesssullivan scope for GitHub Packages mirror (Jesssullivan#18)

* feat(venmo): add returnUrl/cancelUrl to experience_context (Jesssullivan#19)

* fix(ci): use @Jesssullivan scope for GitHub Packages mirror

* feat(venmo): add returnUrl/cancelUrl to experience_context

PayPal requires return_url and cancel_url in the Venmo payment source
experience_context for proper popup handling. Without them, PayPal may
force additional buyer verification loops or block the popup flow.

New optional fields on VenmoAdapterConfig: returnUrl, cancelUrl.

* chore: bump to 0.5.2 (PayPal return URLs) (Jesssullivan#20)

* fix(ci): use @Jesssullivan scope for GitHub Packages mirror

* feat(venmo): add returnUrl/cancelUrl to experience_context

PayPal requires return_url and cancel_url in the Venmo payment source
experience_context for proper popup handling. Without them, PayPal may
force additional buyer verification loops or block the popup flow.

New optional fields on VenmoAdapterConfig: returnUrl, cancelUrl.

* chore: bump to 0.5.2 (PayPal return URLs)

* feat: onboarding subpackage — provider credential management (Jesssullivan#21-Jesssullivan#27) (Jesssullivan#28)

New @tummycrypt/scheduling-kit/onboarding subpackage:

Interfaces:
- CredentialStore: app-provided key-value storage (PG, Redis, etc.)
- EncryptionProvider: app-provided encryption (AES, Vault, etc.)
- StripeConnectConfig, StripeAccountStatus, WebhookSetupResult types

Stripe:
- buildStripeAuthorizeUrl() + exchangeStripeCode() — Connect OAuth
- getStripeAccountStatus() — account onboarding status
- validateStripeKeys() — key validation against Stripe API
- createStripeWebhook() + deleteStripeWebhooks() — webhook CRUD

PayPal:
- validatePayPalCredentials() — OAuth token validation
- createPayPalWebhook() — webhook creation

Build:
- Bazel //src/onboarding target (deps: :core, :payments, effect)
- Package.json ./onboarding export

Pattern: library defines interfaces + helpers, application provides
CredentialStore implementation. Same pattern as HomegrownAdapter's
getDb callback — scheduling-kit doesn't know about databases.

Closes Jesssullivan#21, Jesssullivan#22, Jesssullivan#23, Jesssullivan#24, Jesssullivan#27. Partial Jesssullivan#25, Jesssullivan#26.

* chore: bump to 0.6.0 (onboarding subpackage) (Jesssullivan#29)

* feat: adapter factory pattern + 21 onboarding tests (Jesssullivan#25, Jesssullivan#26) (Jesssullivan#30)

- createAdapterFactory(): settings-driven singleton with cache,
  promise dedup, reset, and disable lifecycle
- 21 tests: Stripe OAuth URL, key validation, account status,
  PayPal credential validation, factory lifecycle (cache, reset,
  disable, store passthrough)
- Updated vitest.config.ts to include onboarding test glob

Closes Jesssullivan#25, Jesssullivan#26.

* chore: strip sourcemaps from npm package (Jesssullivan#31)

* feat: adapter factory pattern + 21 onboarding tests (Jesssullivan#25, Jesssullivan#26)

- createAdapterFactory(): settings-driven singleton with cache,
  promise dedup, reset, and disable lifecycle
- 21 tests: Stripe OAuth URL, key validation, account status,
  PayPal credential validation, factory lifecycle (cache, reset,
  disable, store passthrough)
- Updated vitest.config.ts to include onboarding test glob

Closes Jesssullivan#25, Jesssullivan#26.

* chore: strip sourcemaps from npm package (2,711 .map files excluded)

* feat: provider status helpers + SetupStep type (Jesssullivan#32) (Jesssullivan#33)

* chore: bump to 0.6.1 (status helpers) (Jesssullivan#34)

* align build truth and package boundaries (Jesssullivan#39)

* ci: enforce Bazel release metadata truth (Jesssullivan#40)

* docs: add agent and llm operating brief (Jesssullivan#42)

* feat(payments)!: converge PaymentCapabilities contract from tinyland-inc (Jesssullivan#45)

* feat(payments)!: converge PaymentCapabilities contract from tinyland-inc

Cherry-pick tinyland-inc/main squash (v0.7.0) onto Jesssullivan/main.
Keeps Jess's CI/publish workflows and Bazel structure.
Bumps all version references to 0.7.0.

- PaymentCapabilities, StripeCapability, VenmoCapability types
- getDefaultCapabilities() factory
- HybridCheckoutDrawer: capabilities prop replaces individual payment props
- Cash at Visit structurally removed (cash: false)

* fix(ci): skip prepublish scripts in gh packages mirror

* docs(release): clarify scheduling-kit authority (Jesssullivan#46)

* ci(publish): validate bazel package artifact (Jesssullivan#47)

* build(bazel): publish scheduling-kit from bazel artifact

* fix(ui): dark-mode skeleton shimmer and border parity (Jesssullivan#49)

Replace hardcoded hex CSS with light-dark() for 8 components:
skeleton loading shimmer, border colors, scrollbar tracks.
Ensures proper dark-mode rendering when consumed by host apps.

* ci: support honey self-hosted runner stopgap (Jesssullivan#50)

* ci: isolate pnpm store on self-hosted runners (Jesssullivan#51)

* fix: make publish workflow self-hosted-safe (Jesssullivan#52)

* fix(ci): make github package artifact writable (Jesssullivan#53)

* perf(components): drop zod from browser client form (Jesssullivan#54)

* fix(ci): ignore npm scripts when publishing bazel pkg (Jesssullivan#55)

* fix(ci): ignore npm scripts when publishing bazel pkg

* fix(ci): clean stale bazel publish artifacts on runners

* fix(ci): partition pnpm caches by runner (Jesssullivan#56)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant