Skip to content

feat: add @varlock/nuxt package and docs - #982

Closed
atinux wants to merge 8 commits into
dmno-dev:mainfrom
atinux:atinux-add-nuxt-integration
Closed

feat: add @varlock/nuxt package and docs#982
atinux wants to merge 8 commits into
dmno-dev:mainfrom
atinux:atinux-add-nuxt-integration

Conversation

@atinux

@atinux atinux commented Aug 5, 2026

Copy link
Copy Markdown

Summary

This PR adds first-class Nuxt support to varlock as @varlock/nuxt.

Changes

  • Added new package @varlock/nuxt in packages/integrations/nuxt/
    • Nuxt module built on top of @varlock/vite-integration
    • Uses addVitePlugin from @nuxt/kit
    • Keeps module compatibility at >=3.0.0
    • Targets Nuxt 4 in dev dependencies
  • Added docs page at packages/varlock-website/src/content/docs/integrations/nuxt.mdx
  • Added Nuxt to docs sidebar and homepage works-with tiles
  • Added @varlock/nuxt to the root README integrations table
  • Added required bump files for @varlock/nuxt and @varlock/vite-integration

- Add packages/integrations/nuxt with Nuxt module wrapping the Vite plugin
- Add docs page at integrations/nuxt
- Add Nuxt to sidebar, works-with tiles, and root README

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The new package currently fails repository install, build, typecheck, and release checks, and one documented config-time use throws under the standard setup.

Reviewed changes in d277f843, covering the new Nuxt module, its package/build configuration, and all documentation and navigation additions.

  • Nuxt module: Adds a defineNuxtModule wrapper that injects varlockVitePlugin into Nuxt's Vite configurations and forwards module options.
  • Package build: Adds package metadata, TypeScript configuration, and telemetry substitutions in the tsup build.
  • Documentation: Adds setup, ENV access, multi-environment, and SSR injection guidance, plus package and site discovery links.

⚠️ Required repository artifacts are absent

The committed tree cannot pass the repository's frozen install or release check, so CI and the pre-push hook are blocked before this package can ship.

Technical details
# Add the generated lockfile and release metadata

## Affected sites
- `bun.lock` (absent change) — `bun install --frozen-lockfile --dry-run --ignore-scripts` fails with `lockfile had changes, but lockfile is frozen` because the new workspace package is missing.
- `.bumpy/*.md` (absent change) — `bunx @varlock/bumpy check` reports `@varlock/nuxt-integration` as a changed package missing a bump file.

## Required outcome
- Commit the lockfile update for the new workspace package.
- Add the package's required bumpy entry so the release check recognizes and publishes it.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using azure/gpt-5.6-sol𝕏

Comment thread packages/integrations/nuxt/src/index.ts Outdated
Comment thread packages/integrations/nuxt/src/index.ts Outdated
Comment thread packages/varlock-website/src/content/docs/integrations/nuxt.mdx Outdated
atinux and others added 2 commits August 5, 2026 12:07
- Rename package to @varlock/nuxt across package metadata and docs
- Use addVitePlugin from @nuxt/kit in the Nuxt module
- Target Nuxt 4 in devDependencies while keeping compatibility >=3.0.0
- Add bumpy changeset for @varlock/nuxt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add inline declarations for __VARLOCK_INTEGRATION_NAME__ and __VARLOCK_INTEGRATION_VERSION__
- Keeps ts-src consumers type-safe during workspace typecheck

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@atinux atinux changed the title feat: add @varlock/nuxt-integration package and docs feat: add @varlock/nuxt package and docs Aug 5, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues found in the incremental changes.

Reviewed changes since the prior Pullfrog review at d277f843, covering the three follow-up commits.

  • Renamed the package: Changed the public package from @varlock/nuxt-integration to @varlock/nuxt across package metadata and documentation.
  • Reworked Vite registration: Replaced the readonly plugin-array mutation with Nuxt Kit's addVitePlugin helper while preserving forwarded options and integration telemetry.
  • Fixed source typechecking: Declared the Vite integration's build identity constants in its source module for ts-src consumers.
  • Added release artifacts: Updated bun.lock and added bumpy entries for the new Nuxt package and Vite declaration fix.

Pullfrog  | Fix it ➔View workflow run | Using azure/gpt-5.6-sol𝕏

atinux and others added 3 commits August 5, 2026 12:16
- Add a vitest for @varlock/nuxt module setup
- Verify addVitePlugin registration and option forwarding
- Add test and test:ci scripts to the Nuxt package

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove claim that ENV is available during nuxt.config evaluation
- Document varlock run + process.env pattern for config-time usage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues. One package test setup issue is noted inline.

Reviewed changes since the prior Pullfrog review at 9726165b, covering the two follow-up commits.

  • Added module wiring coverage: Tested Nuxt compatibility metadata, Vite plugin registration, forwarded options, and package telemetry.
  • Corrected test typing: Reworked the imported module cast so the new test passes TypeScript checking.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using azure/gpt-5.6-sol𝕏

Comment thread packages/integrations/nuxt/test/module.test.ts
@philmillman

Copy link
Copy Markdown
Member

Awesome! Thanks so much for this @atinux ! Will review today

- Build @varlock/vite-integration before running Nuxt package tests
- Ensures clean workspace runs do not depend on prebuilt dist artifacts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the last reviewed version, covering the package-local test setup fix.

  • Made the Nuxt CI test self-sufficient: Built @varlock/vite-integration before Vitest so the Nuxt package test passes from a clean frozen workspace install.

Pullfrog  | View workflow run | Using azure/gpt-5.6-sol𝕏

@pkg-pr-new

pkg-pr-new Bot commented Aug 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/dmno-dev/varlock/@varlock/astro-integration@982
npm i https://pkg.pr.new/dmno-dev/varlock/@varlock/cloudflare-integration@982
npm i https://pkg.pr.new/dmno-dev/varlock/@varlock/nuxt@982
npm i https://pkg.pr.new/dmno-dev/varlock/@varlock/vite-integration@982

commit: bfd5253

@philmillman

philmillman commented Aug 5, 2026

Copy link
Copy Markdown
Member

@atinux I created #985 with some followups after some local testing to keep this PR clean. I'm definitely open to feedback here, I'm no nuxt expert so your input is welcome if any of this feels off. @theoephraim will also have some thoughts but he's a little tied up at the moment, so there's no rush!

@theoephraim

Copy link
Copy Markdown
Member

@atinux - Thank you so much for this. Nuxt has been on the to-do list for quite a while. Very happy to see it added :)
Will get this all merged in (via the new PR) asap!

@theoephraim theoephraim closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants