Skip to content

Build: Exempt @tailwindcss/turbopack from the sandbox age gate - #35783

Merged
valentinpalkovic merged 1 commit into
nextfrom
valentin/sandbox-exempt-tailwindcss-turbopack
Aug 6, 2026
Merged

valentinpalkovic merged 1 commit into
nextfrom
valentin/sandbox-exempt-tailwindcss-turbopack

Conversation

@valentinpalkovic

Copy link
Copy Markdown
Contributor

What I did

The Next.js prerelease sandbox does not generate at the moment. Sandbox generation applies a 7 day npm age gate, and create-next-app --tailwind pulls in @tailwindcss/turbopack, a package so new that ^4 has only ever matched a single release. That one release is inside the window, so the range has no installable version at all and the whole template dies:

❌ Failed to refresh Yarn 4 lockfile for prerelease template: Next.js Prerelease (Webpack | TypeScript)
   ➤ YN0016: @tailwindcss/turbopack@npm:^4: All versions satisfying "^4" are quarantined

Normally the generator works around that by narrowing the range to the newest release that clears the gate, inside the same major. Here there is nothing to narrow to, so it correctly refuses rather than dragging the template onto a different major. The only remaining lever is to let that one package past the gate:

-    minAgeGateExemptions: ['next', '@next/*', 'eslint-config-next'],
+    minAgeGateExemptions: ['next', '@next/*', 'eslint-config-next', '@tailwindcss/turbopack'],

The gate still applies to everything else in the template, and the canary line is unaffected. Generating it now succeeds with no ranges rewritten at all:

✅ Generated Next.js Prerelease (Webpack | TypeScript) (nextjs/prerelease) in 22 s
dependency range after generation resolved
next 16.3.1-canary.4 16.3.1-canary.4
eslint-config-next 16.3.1-canary.4 —
@tailwindcss/turbopack ^4 (untouched) 4.3.3
typescript ^5 —

One caveat worth stating plainly: this is a permanent entry for what is really a temporary condition. @tailwindcss/turbopack@4.3.3 was published on 2026-07-31, so it clears the 7 day window on its own on 2026-08-07, and once 4.x has a second release the range will always have an older candidate to fall back on. I would rather unblock generation now than wait a day for it, but the entry should come out again once that package has some history, and I noted that where it is declared.

Only one exemption was needed, by the way. I checked whether the rest of the family gets pulled in transitively, and it does not, so there is no reason to reach for a @tailwindcss/* glob here.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

This is one entry in a template's config. There is no logic to unit test, and asserting the array contents back would just restate the change. The nightly sandbox generation is what actually exercises it.

Manual testing

command what it does run from
yarn generate-sandboxes --templates nextjs/prerelease regenerates the affected sandbox code/
yarn build-storybook --quiet builds it repros/nextjs/prerelease/after-storybook
  1. Reproduce the failure on next first, so the change has something to prove:
    cd code && yarn generate-sandboxes --templates nextjs/prerelease
    It fails with All versions satisfying "^4" are quarantined for @tailwindcss/turbopack.
  2. Switch to this branch and run the same command. It must print ✅ Generated Next.js Prerelease.
  3. Check repros/nextjs/prerelease/before-storybook/package.json still tracks the canary: next and eslint-config-next on a -canary.N version, and @tailwindcss/turbopack still ^4 rather than a rewritten range.
  4. Confirm the gate is still on for the rest of the template: repros/nextjs/prerelease/before-storybook/.yarnrc.yml must still contain npmMinimalAgeGate: 10080, with the four names under npmPreapprovedPackages.
  5. Build it: cd repros/nextjs/prerelease/after-storybook && yarn build-storybook --quiet. Exit code must be 0.

Note

After 2026-08-07 step 1 will no longer reproduce, because the blocking release ages out of the window. That is expected, and is the same reason this entry should eventually be removed.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Sandbox template config only, so there is nothing user facing to document.

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

create-next-app --tailwind pulls in @tailwindcss/turbopack, which is new
enough that ^4 has only ever matched one release. That release is inside
the 7 day window, so the range has no installable version and the whole
nextjs/prerelease template fails to generate.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f62e88d-d001-4ddf-a297-34aefc0f7049

📥 Commits

Reviewing files that changed from the base of the PR and between 7bf0250 and 7dd780d.

📒 Files selected for processing (1)
  • code/lib/cli-storybook/src/sandbox-templates.ts

Walkthrough

The Next.js prerelease sandbox template now exempts @tailwindcss/turbopack from the minimum-age gate. Comments document the package-specific prerelease behavior.

Changes

Next.js prerelease template

Layer / File(s) Summary
Tailwind Turbopack age-gate exemption
code/lib/cli-storybook/src/sandbox-templates.ts
The template adds @tailwindcss/turbopack to minAgeGateExemptions and documents its Tailwind-driven prerelease gating behavior.

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@ndelangen ndelangen self-assigned this Aug 6, 2026
@ndelangen ndelangen added patch:yes Bugfix & documentation PR that need to be picked to main branch build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs). qa:skip Pull Requests that do not need any QA. (e.g. documentation) labels Aug 6, 2026
@ndelangen ndelangen moved this to In Progress in Core Team Projects Aug 6, 2026
@valentinpalkovic
valentinpalkovic merged commit 02804a0 into next Aug 6, 2026
20 of 31 checks passed
@valentinpalkovic
valentinpalkovic deleted the valentin/sandbox-exempt-tailwindcss-turbopack branch August 6, 2026 09:47
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Core Team Projects Aug 6, 2026
ndelangen pushed a commit that referenced this pull request Aug 6, 2026
…ilwindcss-turbopack

Build: Exempt @tailwindcss/turbopack from the sandbox age gate
(cherry picked from commit 02804a0)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs). patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch qa:skip Pull Requests that do not need any QA. (e.g. documentation)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants