Skip to content

fix: apply Injectable programmatically so NestJS adapter loads in raw Node#107

Merged
mandarini merged 2 commits into
mainfrom
fix/nestjs-adapter-untranspiled-decorator
Jul 22, 2026
Merged

fix: apply Injectable programmatically so NestJS adapter loads in raw Node#107
mandarini merged 2 commits into
mainfrom
fix/nestjs-adapter-untranspiled-decorator

Conversation

@mandarini

Copy link
Copy Markdown
Collaborator

The @Injectable() decorator on the guard in withSupabase() shipped untranspiled (tsdown/oxc does not lower legacy decorators), crashing require/import of the adapter with SyntaxError under plain Node. Apply it as Injectable()(SupabaseAuthGuard) instead, and add a raw-Node load smoke test (pnpm smoke) in CI to catch this class of regression.

Fixes #87

… Node

The @Injectable() decorator on the guard in withSupabase() shipped
untranspiled (tsdown/oxc does not lower legacy decorators), crashing
`require`/`import` of the adapter with SyntaxError under plain Node.
Apply it as Injectable()(SupabaseAuthGuard) instead, and add a raw-Node
load smoke test (pnpm smoke) in CI to catch this class of regression.

Fixes #87
@mandarini mandarini self-assigned this Jul 22, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@supabase/server@107

commit: 58c634f

@mandarini
mandarini force-pushed the fix/nestjs-adapter-untranspiled-decorator branch from 9cf4838 to 58c634f Compare July 22, 2026 13:58
@mandarini
mandarini marked this pull request as ready for review July 22, 2026 13:59
@mandarini
mandarini requested review from a team as code owners July 22, 2026 13:59
@mandarini
mandarini merged commit 9e45b42 into main Jul 22, 2026
8 checks passed
@mandarini
mandarini deleted the fix/nestjs-adapter-untranspiled-decorator branch July 22, 2026 14:08
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.

NestJS adapter (v1.2.0) crashes at load: untranspiled decorator on a class expression (SyntaxError under Node CJS/ESM)

2 participants