@esh-vibe/version-sync
v0.1.0
Published
Sync Bun, Node, and Playwright versions into Dockerfile ARGs
Readme
@esh-vibe/version-sync
Sync Bun, Node, and Playwright versions from your project into a Dockerfile.
What It Syncs
BUN_VERSION: frompackage.json->packageManager(for example[email protected])NODE_VERSION: from.nvmrc(leadingvis removed, sov24.13.0becomes24.13.0)PLAYWRIGHT_VERSION: fromnode_modulesby reading one of:@playwright/testplaywrightplaywright-core
Installation
pnpm add -D @esh-vibe/version-syncOr run it directly:
npx version-syncUsage
# Sync versions to Dockerfile in current directory
npx version-sync
# Sync versions to a specific Dockerfile
npx version-sync docker/Dockerfile.prod
# Check mode for CI
npx version-sync --checkOptions
[dockerfile]: Path to Dockerfile (default:Dockerfile)--root <path>: Project root containingpackage.json,.nvmrc, andnode_modules(default: current directory)--check: Check if Dockerfile ARGs are in sync without updating. Exits with code1if not in sync.
Dockerfile Requirements
Your Dockerfile should include these ARGs:
ARG BUN_VERSION=1.0.0
ARG NODE_VERSION=24.13.0
ARG PLAYWRIGHT_VERSION=1.55.0API
import {
getVersions,
syncVersionsToDockerfile,
checkVersionsInDockerfile,
} from "@esh-vibe/version-sync";
const versions = getVersions(".");
syncVersionsToDockerfile("Dockerfile", versions);License
MIT
