diff --git a/CHANGELOG.md b/CHANGELOG.md index 70818dd..eb4a7d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.13] - 2026-02-12 + +### Added +- **Centralized CDN configuration** (`src/config/cdn.ts`): Single source of truth for esm.sh, unpkg, and other CDN URLs used across the codebase +- **esm.sh version resolution**: `redirectNpmImports` now reads `package.json` dependencies and includes the major version in esm.sh URLs (e.g. `ai@4/react`), fixing 404s on subpath imports +- **Setup overlay dialogs**: Convex and Vercel AI SDK demos now show an API key setup dialog on load with privacy notice ("your key stays in your browser") +- **New tests**: `tests/cdn-config.test.ts` (12 tests) and `tests/code-transforms.test.ts` (11 tests) + +### Changed +- Renamed AI chatbot demo files: `demo-ai-chatbot.html` → `demo-vercel-ai-sdk.html`, `ai-chatbot-demo.ts` → `vercel-ai-sdk-demo.ts` +- Replaced hardcoded CDN URLs throughout codebase with imports from `src/config/cdn.ts` + +### Removed +- **`sentry` shim** (`src/shims/sentry.ts`): Was a no-op stub for a non-existent Node.js built-in +- **Custom `convex` command** in `child_process.ts`: Convex now runs through the generic bin stub system like any other CLI tool +- **Convex-specific path remaps** in `fs.ts`: `path.resolve()` with correct `cwd` handles this generically +- **`vfs:` prefix stripping** in `fs.ts`: Moved to esbuild shim where the artifact originates + ## [0.2.12] - 2026-02-12 ### Added diff --git a/README.md b/README.md index 7e1e234..51746e9 100644 --- a/README.md +++ b/README.md @@ -941,6 +941,22 @@ triggerHMR('/app/page.tsx', iframe); --- +## Demos + +Start the dev server with `npm run dev` and open any demo at `http://localhost:5173`: + +| Demo | Path | Description | +|------|------|-------------| +| **Next.js** | `/examples/next-demo.html` | Pages & App Router, CSS modules, route groups, API routes, HMR | +| **Vite** | `/examples/vite-demo.html` | Vite dev server with React and HMR | +| **Vitest** | `/examples/vitest-demo.html` | Real vitest execution with xterm.js terminal and watch mode | +| **Express** | `/examples/express-demo.html` | Express.js HTTP server running in the browser | +| **Convex** | `/examples/demo-convex-app.html` | Real-time todo app with Convex cloud deployment | +| **Vercel AI SDK** | `/examples/demo-vercel-ai-sdk.html` | Streaming AI chatbot with Next.js and OpenAI | +| **Bash** | `/examples/bash-demo.html` | Interactive POSIX shell emulator | + +--- + ## Development ### Setup @@ -967,7 +983,7 @@ npm run test:e2e npm run dev ``` -Open `http://localhost:5173/examples/next-demo.html` to see the Next.js demo. +See the [Demos](#demos) section for all available examples. --- diff --git a/docs/AI_CHATBOT_TUTORIAL.md b/docs/AI_CHATBOT_TUTORIAL.md index 4ed6a76..7302cbf 100644 --- a/docs/AI_CHATBOT_TUTORIAL.md +++ b/docs/AI_CHATBOT_TUTORIAL.md @@ -1,6 +1,6 @@ -# Just Node + AI Chatbot Tutorial +# almostnode — AI Chatbot Tutorial -Build a streaming AI chatbot entirely in the browser using Just Node's virtual Node.js runtime, Next.js, and Vercel AI SDK. +Build a streaming AI chatbot entirely in the browser using almostnode's virtual Node.js runtime, Next.js, and Vercel AI SDK. ## Table of Contents @@ -45,7 +45,7 @@ All code runs client-side - no backend server required. npm run dev ``` -2. Open `http://localhost:5173/examples/demo-ai-chatbot.html` +2. Open `http://localhost:5173/examples/demo-vercel-ai-sdk.html` 3. Enter your OpenAI API key and click "Connect" @@ -460,4 +460,4 @@ for (const chunk of chunks) { - [Vercel AI SDK Documentation](https://sdk.vercel.ai/docs) - [OpenAI API Reference](https://platform.openai.com/docs/api-reference) - [Next.js App Router](https://nextjs.org/docs/app) -- [Just Node API Documentation](./API.md) +- [almostnode API Documentation](../README.md#api-reference) diff --git a/docs/CONVEX_TUTORIAL.md b/docs/CONVEX_TUTORIAL.md index 3fe1c7d..5967437 100644 --- a/docs/CONVEX_TUTORIAL.md +++ b/docs/CONVEX_TUTORIAL.md @@ -1,6 +1,6 @@ -# Just Node + Convex Tutorial +# almostnode — Convex Tutorial -Build and deploy real-time Convex applications entirely in the browser using Just Node's virtual Node.js runtime. +Build and deploy real-time Convex applications entirely in the browser using almostnode's virtual Node.js runtime. ## Table of Contents @@ -15,7 +15,7 @@ Build and deploy real-time Convex applications entirely in the browser using Jus ## Introduction -**Just Node** provides a complete Node.js-compatible runtime that runs in your browser. You can: +**almostnode** provides a complete Node.js-compatible runtime that runs in your browser. You can: - Create a virtual filesystem with project files - Install npm packages (including Convex) @@ -52,7 +52,7 @@ vfs.writeFileSync('/package.json', JSON.stringify({ name: 'my-app' })); vfs.mkdirSync('/app', { recursive: true }); vfs.writeFileSync('/app/page.tsx', ` export default function Home() { - return