Nub 0.5.0 ships nub init — one command scaffolds a TypeScript project that runs and typechecks immediately:
$ nub init -y
created my-app
package.json
tsconfig.json
index.ts
.gitignore
README.md
.git/ initialized
devDependencies:
+ @nubjs/types@0.5.0
+ @types/node@26.1.1
+ typescript@7.0.2
next: nub index.tsnub init
- TypeScript 7 by default. The scaffold pins
typescript@^7— the native compiler — alongside@types/node@^26and@nubjs/types. Nub transpiles at run time, sotscexists purely to typecheck (noEmit) and the project has zero runtime dependencies. - Node types without
"dom".libstays["es2024"]; the globals Nub polyfills (Worker, …) are typed by@nubjs/types, sowindowanddocumentnever leak into a Node project. - Real
.tsimports.verbatimModuleSyntaxandallowImportingTsExtensions: import specifiers say./thing.tsand resolve exactly as Node and Nub do. - Strict from the first file.
strictplusnoUncheckedIndexedAccessandexactOptionalPropertyTypes,nodenextresolution,es2024target.
The generated tsconfig.json
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext",
"target": "es2024",
"lib": ["es2024"],
"types": ["node", "@nubjs/types"],
"moduleDetection": "force",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"noUncheckedSideEffectImports": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"skipLibCheck": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noEmit": true
}
}In a terminal, init asks three questions — name, TypeScript or JavaScript, git — each with a sensible default; -y skips them, non-interactive environments auto-default, and existing files are never overwritten without --force. The init docs have the full surface.
nub create
nub create <template> resolves the ecosystem's create-* convention (vue → create-vue) and runs the scaffolder. As of this release the scaffolder can tell Nub is calling — #529 exports the npm_config_user_agent these tools read — so scaffolders with Nub detection respond with Nub commands. Working today:
nub create vue my-app
nub create vite my-app
nub create nuxt my-app$ nub create vue my-app --default
└ Done. Now run:
cd my-app
nub install
nub run devDetection PRs are open across the ecosystem — track them to see your framework land: create-next-app, create-hono, create-t3-app, create-payload-app, create-strapi-app, create-medusa-app, create-qwik, and std-env. Already merged upstream: create-vue, Nuxt, solid-cli, react-router, create-cloudflare, and package-manager-detector. create-vite needs no patch — it reads the user agent directly.
nubx returns to npx parity
nubx <name> no longer tries file and script resolution first — it resolves the node_modules/.bin chain and falls back to the registry on a miss, exactly as npx does. Files are nub <file>, scripts are nub run <script>. (#525)
Package manager
Top-level packageExtensions in the root manifest is now honored in Nub-native projects — it was already supported in pnpm- and npm-compatibility mode (#507, #509). Alongside it, a batch of correctness fixes:
| Area | What changed | PR |
|---|---|---|
nub update | Accepts dist-tag specs (nub update pkg@beta) | #516 |
| Hoisted linker | Workspace-spanning hoisted planning for nodeLinker=hoisted | #511 |
approve-builds | Runs the approved build scripts instead of only recording approval | #503 |
dedupe | Workspace link packages no longer appear in the dedupe diff | #502 |
publish | Scope is preserved in the publish attachment key and tarball URI | #478 |
| Registry traffic | Dist-tag resolution is cached and metadata fetches slimmed | #505 |
Fixes and platforms
nub watchforwards an explicit--env-fileto the watched Node so restarts re-read it (#510).- A macOS group-reaper watcher prevents SIGKILL of Nub's process group from orphaning the workload (#504).
nub upgradesupports the self-owned channel on Windows (#506).- Node installs stream extraction during download and overlap the checksum fetch (#508).
- Source builds work on Android/Termux without a JVM (#501).
The full release notes list every change in this release.