Skip to content

Install Supabase CLI from npm#442

Merged
jgoux merged 1 commit into
mainfrom
julien/cli-1480-source-cli-install-from-npm-registry
Jul 3, 2026
Merged

Install Supabase CLI from npm#442
jgoux merged 1 commit into
mainfrom
julien/cli-1480-source-cli-install-from-npm-registry

Conversation

@jgoux

@jgoux jgoux commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • install the Supabase CLI through the supabase npm package instead of GitHub release archives
  • support npm-backed latest, beta, and fixed published versions, with root lockfile detection preserved
  • remove the github-token input and use Node.js/npm without clobbering an already configured Node.js 20+ runtime
  • update CI/docs for the v3 action contract and remove stale license cache entries for removed dependencies

Addresses CLI-1480: https://linear.app/supabase/issue/CLI-1480/source-cli-install-from-npm-registry

No earlier pull request found to supersede.

Validation

  • bun run ci
  • real npm install spot checks for supabase@latest, supabase@beta, supabase@1.178.2, supabase@2.33.0, and legacy supabase@1.15.1 preinstall handling
  • external fixture run: https://github.com/jgoux/setup-cli-testing/actions/runs/28656824691
    • hosted runners: Ubuntu, macOS, and Windows for latest, beta, 1.178.2, and 2.33.0
    • package-lock detection: resolved and installed supabase@2.108.0
    • legacy preinstall: installed supabase@1.15.1
    • Node preservation: kept a caller-provided Node.js 22 runtime active after the action
    • Alpine 3.20 container: latest, beta, and 2.100.0, including Node.js 20+ and runtime dependency checks
    • Alpine 3.18 container: rejected Node.js 18 with a clear setup error

@jgoux jgoux force-pushed the julien/cli-1480-source-cli-install-from-npm-registry branch 2 times, most recently from 7cc9c39 to d383628 Compare July 3, 2026 10:15
@jgoux jgoux marked this pull request as ready for review July 3, 2026 10:46
@jgoux jgoux requested a review from a team as a code owner July 3, 2026 10:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3836289fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.ts Outdated
Comment thread action.yml
Comment thread action.yml
@jgoux jgoux force-pushed the julien/cli-1480-source-cli-install-from-npm-registry branch from d383628 to b1369a8 Compare July 3, 2026 11:11
@jgoux jgoux enabled auto-merge (squash) July 3, 2026 11:57
@jgoux jgoux force-pushed the julien/cli-1480-source-cli-install-from-npm-registry branch from b1369a8 to 46f1990 Compare July 3, 2026 11:59
@jgoux jgoux merged commit 23ef4b0 into main Jul 3, 2026
25 checks passed
@jgoux jgoux deleted the julien/cli-1480-source-cli-install-from-npm-registry branch July 3, 2026 12:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46f19906ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.ts
Comment thread action.yml
jgoux added a commit that referenced this pull request Jul 7, 2026
## Summary
- Run npm commands from the caller workspace so npm remains the source
of truth for `.npmrc` parsing, auth, delegated config files, env
expansion, quoting, and precedence.
- Keep the CLI install isolated with `--prefix`, while explicitly
overriding action-owned npm policy such as `offline=false`,
`bin-links=true`, and no package lock.
- Treat existing `node` and `npm` commands on musl as sufficient only
when they actually run, probing Alpine `/usr/bin` binaries with
`/usr/bin` first on PATH.
- Prefer Alpine `/usr/bin` runtime binaries when an earlier PATH entry
shadows them, and keep apk installation for missing runtime libraries or
missing commands.

## Validation
- `bun run ci`
- Real npm sanity check for workspace `.npmrc` with quoted/env delegated
config, `globalconfig`, relative `cafile`, mTLS path keys,
`offline=true`, `bin-links=false`, and package-lock policy
- Fixture workflow:
https://github.com/jgoux/setup-cli-testing/actions/runs/28663875606

Addresses
#442 (comment)
Addresses
#442 (comment)
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.

2 participants