feat(vercel-basic-auth): add only-preview value to vercelEnvTarget#114
Merged
Conversation
Applies Basic Auth only on Vercel preview deployments. Useful for protecting preview URLs while keeping production open. Refs PC-274
akameco
reviewed
Jul 22, 2026
| ).toBeNull(); | ||
| }); | ||
|
|
||
| test("vercelEnvTarget=only-preview で VERCEL_ENV=preview のとき username が undefined でも null を返す", () => { |
Contributor
There was a problem hiding this comment.
テスト名が VERCEL_ENV=preview と書かれているが、テスト本体ではVERCEL_ENV=production をセットしてるっぽい
akameco
approved these changes
Jul 22, 2026
akameco
left a comment
Contributor
There was a problem hiding this comment.
1件コメントしました。タイポなので再レビュー不要です。
既存の"only-production"と対称になってるしいいと思いますLGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@plainbrew/vercel-basic-authのvercelEnvTargetにonly-previewを追加しました。Vercel の preview 環境のみ Basic 認証を適用したいケースで使えます。only-productiononly-previewalldisabledCloses PC-274
Test plan
pnpm --filter @plainbrew/vercel-basic-auth test:run(27 passed)pnpm --filter @plainbrew/vercel-basic-auth type-check