Repository navigation
@varlock/nextjs-integration v2.0.0
-
#1232 (major)
Builds no longer bake the resolved env into their output unless they freeze it, controlled by the newfreezeIntoBundleoption ('auto'by default: freeze on Vercel, Netlify, Cloudflare Workers Builds, AWS Amplify and OpenNext; resolve at boot elsewhere). What to check when upgrading:output: 'standalone'(e.g. Docker images): the build now fails until you setfreezeIntoBundle: true(bake the env, encrypted; the server needs only_VARLOCK_ENV_KEY) orfalse(the server resolves at boot, so the varlock CLI must be available, e.g.varlock run -- node server.js). Previously a standalone server with no CLI silently booted from build-time values.- Frozen builds must be encrypted: set
_VARLOCK_ENV_KEYat build and runtime (generate one withvarlock generate-key), or opt out with_VARLOCK_ALLOW_PLAINTEXT_FROZEN_ENV=1. next startwithout the varlock CLI fails at boot with the fixes instead of falling back to build-time values.
A frozen env wins over the environment at boot (with a warning when they differ), and
@dynamic=bootkeys can be set per instance. -
#1239 (patch)
Newvarlock/auto-initentry: a single edge-safe import that initializes the runtime from an already-resolved env (decrypting it if needed) and applies all runtime patches, without calling the CLI. The same sequence is available as a function,initVarlockRuntime()fromvarlock/init, for code that has to set up its inputs first. The Next.js integration now injects onevarlock/init-bundlefile into both server and edge runtimes (varlock/init-serverandvarlock/init-edgeremain as aliases of it).varlock/patch-server-responsenow loads node builtins lazily and is a no-op wherenode:httpdoes not exist, so the same init code runs in Node, Bun, Cloudflare Workers and Vercel Edge. The vite, Cloudflare and Astro integrations use it instead of assembling the init sequence module by module; the vite plugin'sssrEdgeRuntimeoption is no longer needed and is ignored. -
#1237 (patch)
Fix env file watchers keeping short-lived processes (such as Next's telemetry helper afternext devstops) running forever
Published to
- ✅ npm