Repository navigation
fix(examples): migrate StackBlitz + stale examples to v1 RC - #1905
Conversation
Replace the v0 `arkenv` ^0.11 import with `@arkenv/[email protected]` and modern host/port schema helpers so the StackBlitz playground matches the v1 API. Co-authored-by: Yam Borodetsky <[email protected]>
Bump `@arkenv/standard`, `@arkenv/nextjs`, and `@arkenv/vite-plugin` off stale alpha pins, and add legacy-peer-deps `.npmrc` files for the framework Zod examples (same pattern as synced npm examples). Co-authored-by: Yam Borodetsky <[email protected]>
Nav and `@arkenv/core` README badges now open `tree/v1/examples/stackblitz` instead of the stale `main` path. Co-authored-by: Yam Borodetsky <[email protected]>
🦋 Changeset detectedLatest commit: 5603363 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@arkenv/agent-plugin
arkenv
@arkenv/build
@arkenv/bun-plugin
@arkenv/core
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/rsbuild-plugin
@arkenv/standard
@arkenv/tanstack-addon
@arkenv/vite-plugin
commit: |
There was a problem hiding this comment.
Caution
Adding "type": "module" to examples/stackblitz breaks the very playground this PR tries to fix: npm run dev (the StackBlitz startCommand) and npm run start both abort with Error: Must use import to load ES Module: .../index.ts. Reproduced locally after npm install.
Reviewed changes
- StackBlitz demo on
@arkenv/coreRC —index.tsswitches to@arkenv/coreand the v1string.host/number.portschema;package.jsonrenames the package, bumps deps, and adds"type": "module"; README reworded. - Stale alpha pins →
1.0.0-rc.1—with-zod,with-valibot,with-nextjs-zod,with-vite-react-zodrepinned exactly (plus.npmrc legacy-peer-deps=trueon the two zod framework examples, matching the other examples). - v1 links —
packages/core/README.mdandapps/www/lib/stackblitz.tsnow opentree/v1/examples/stackblitz; changeset bumps@arkenv/corepatch since the README ships with the package.
ℹ️ examples/README.md links still point at main
The example index links every entry at tree/main/examples/..., so readers following it from the v1 branch land on the v0 archive rather than the v1 examples being migrated here. Not introduced by this diff, but worth folding into the same link-freshness pass if the intent is for all example links to track v1.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
ts-node-dev cannot load type:module entries, so StackBlitz's npm run dev never started. Switch start/dev to tsx, drop dotenv for --env-file, and point examples/README links at the v1 tree. Co-authored-by: Yam Borodetsky <[email protected]>
|
Addressed the Pullfrog CAUTION + the README link note in b8ab8d8:
|
|
@pullfrog review |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-review after b8ab8d81 (fix(examples): run StackBlitz demo with tsx), which resolves both findings from the prior pullfrog review — the ts-node-dev + "type": "module" break and the stale examples/README.md links.
- StackBlitz runner switched to
tsx—start/devnow runtsx --env-file=.env/tsx watch --env-file=.env,ts-node-dev+dotenvare dropped, and"type": "module"is retained; the README note is updated totsx. Verified locally that both scripts load.envand print the validated object. examples/README.mdlinks moved tov1— the example index now points attree/v1/examples/...instead of the v0mainarchive.- Regenerated StackBlitz lockfile — adds the
tsx/esbuildtree and dropsts-node-dev; the root block still pins@arkenv/core1.0.0-rc.1(integrity matches the registry). - Unchanged since the prior review — RC pins for
with-zod/with-valibot/with-nextjs-zod/with-vite-react-zod(with the two new.npmrcfiles), thetree/v1StackBlitz links inapps/www/lib/stackblitz.tsandpackages/core/README.md, and the@arkenv/corepatch changeset.
ℹ️ Stale main links remain in the v1 community docs
apps/www/content/docs/community.mdx still points its Documentation / Examples / Code links at tree/main and blob/main, so the Examples link sends v1 readers to the v0 archive. This file is outside the PR's scope, so flagging it only to close out the link-freshness pass this PR started — not a blocker.
Technical details
# Community docs still link to `main`
## Affected sites
- `apps/www/content/docs/community.mdx:15` — Documentation → `tree/main/apps/www/content/docs`
- `apps/www/content/docs/community.mdx:17` — Examples → `tree/main/examples`
- `apps/www/content/docs/community.mdx:19` — Code → `blob/main/docs/CONTRIBUTING.md`
## Open questions for the human
- Should the v1 community page point at `v1` (or the site's own `/docs` routes) in a follow-up, or is `main` intentional for contribution entry points?DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Bring in #1903 community.mdx v1 pointers (addresses Pullfrog note on #1905) plus subsequent www commits on v1. Co-authored-by: Yam Borodetsky <[email protected]>
|
Addressed the Pullfrog ℹ️ note about stale |
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@arkenv/core](https://arkenv.js.org) ([source](https://redirect.github.com/yamcodes/arkenv)) | [`1.0.0-rc.1` → `1.0.0-rc.4`](https://renovatebot.com/diffs/npm/@arkenv%2fcore/1.0.0-rc.1/1.0.0-rc.4) |  |  | | [@arkenv/nextjs](https://arkenv.js.org) ([source](https://redirect.github.com/yamcodes/arkenv)) | [`1.0.0-rc.1` → `1.0.0-rc.4`](https://renovatebot.com/diffs/npm/@arkenv%2fnextjs/1.0.0-rc.1/1.0.0-rc.4) |  |  | | [@arkenv/standard](https://arkenv.js.org) ([source](https://redirect.github.com/yamcodes/arkenv)) | [`1.0.0-rc.1` → `1.0.0-rc.4`](https://renovatebot.com/diffs/npm/@arkenv%2fstandard/1.0.0-rc.1/1.0.0-rc.4) |  |  | | [@arkenv/vite-plugin](https://arkenv.js.org) ([source](https://redirect.github.com/yamcodes/arkenv)) | [`1.0.0-rc.1` → `1.0.0-rc.4`](https://renovatebot.com/diffs/npm/@arkenv%2fvite-plugin/1.0.0-rc.1/1.0.0-rc.4) |  |  | --- ### Release Notes <details> <summary>yamcodes/arkenv (@​arkenv/core)</summary> ### [`v1.0.0-rc.4`](https://redirect.github.com/yamcodes/arkenv/releases/tag/%40arkenv/core%401.0.0-rc.4) [Compare Source](https://redirect.github.com/yamcodes/arkenv/compare/@arkenv/[email protected]...@arkenv/[email protected]) No changes in this release. ### [`v1.0.0-rc.3`](https://redirect.github.com/yamcodes/arkenv/releases/tag/%40arkenv/core%401.0.0-rc.3) [Compare Source](https://redirect.github.com/yamcodes/arkenv/compare/@arkenv/[email protected]...@arkenv/[email protected]) ##### Patch Changes - #### Restore keyword suggestions inside inline schemas *[`#1975`](https://redirect.github.com/yamcodes/arkenv/pull/1975) [`089ef43`](https://redirect.github.com/yamcodes/arkenv/commit/089ef436d3e007fa636e3948734d3911b1065758) [@​yamcodes](https://redirect.github.com/yamcodes)* A partial keyword in an inline schema string suggests ArkType keywords again. `arkenv({ PORT: "n" })` offers `never`, `null`, and `number`. The same suggestions are back on `arkenv` from `@arkenv/core/safe`. ```ts import arkenv from "@arkenv/core"; export const env = arkenv({ PORT: "number.port = 3000", }); ``` ### [`v1.0.0-rc.2`](https://redirect.github.com/yamcodes/arkenv/releases/tag/%40arkenv/core%401.0.0-rc.2) [Compare Source](https://redirect.github.com/yamcodes/arkenv/compare/@arkenv/[email protected]...@arkenv/[email protected]) ##### Major Changes - #### Remove reserved `safe` from main-factory config *[`#1924`](https://redirect.github.com/yamcodes/arkenv/pull/1924) [`ed09bb0`](https://redirect.github.com/yamcodes/arkenv/commit/ed09bb05c27b5409a49430c0f2897b28fe26484d) [@​yamcodes](https://redirect.github.com/yamcodes)* `ArkEnvConfig` and `StandardEnvConfig` no longer declare the reserved `safe?: false` field. Safe-mode parsing stays on the `/safe` subpaths. ```ts import arkenv from "@arkenv/core"; import arkenvSafe from "@arkenv/core/safe"; export const env = arkenv({ PORT: "number.port = 3000", }); const result = arkenvSafe( { PORT: "number.port" }, { env: { PORT: "invalid" } }, ); ``` `@arkenv/standard` mirrors the same shape via `@arkenv/standard/safe`. **BREAKING CHANGE**: Passing `safe: false` on the main `arkenv()` config is no longer accepted. Delete the property; use `/safe` for result-object parsing. ```diff - export const env = arkenv(schema, { safe: false }); + export const env = arkenv(schema); ``` ##### Patch Changes - #### Avoid Node-only `process` APIs in color detection *[`#1939`](https://redirect.github.com/yamcodes/arkenv/pull/1939) [`7684644`](https://redirect.github.com/yamcodes/arkenv/commit/76846449b8a634e24b59a6126958b2826cf975ef) [@​yamcodes](https://redirect.github.com/yamcodes)* ANSI color helpers no longer read `process.versions` or `process.stdout` as static member expressions, so Next.js edge instrumentation no longer flags `@arkenv/core` when `env` is imported from edge files. - #### Point StackBlitz README link at the v1 example *[`#1905`](https://redirect.github.com/yamcodes/arkenv/pull/1905) [`f71bee1`](https://redirect.github.com/yamcodes/arkenv/commit/f71bee184ed2f2abfbc69a514a551310d14b3ca5) [@​yamcodes](https://redirect.github.com/yamcodes)* The core package README StackBlitz badge now opens `tree/v1/examples/stackblitz`, matching the v1 `@arkenv/core` playground instead of the stale `main` path. - #### Sync the package README with the repo README *[`#1949`](https://redirect.github.com/yamcodes/arkenv/pull/1949) [`2fd0f33`](https://redirect.github.com/yamcodes/arkenv/commit/2fd0f335835f3c0918da7b547b6a43fed3dfa3d7) [@​yamcodes](https://redirect.github.com/yamcodes)* The published `@arkenv/core` README now matches the root project README (v1 imports, validator examples, RC callout). The outdated demo GIF that showed a v0-shaped `import` is gone. </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Almaty) - Branch creation - "on friday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/yamcodes/arkenv). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoidjEiLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Summary
Playgrounds were already on
@arkenv/core/ workspace*. Several standalone examples were still on v0 or stale alpha pins.examples/stackblitz: switched fromimport arkenv from "arkenv"(^0.11.0) toimport arkenv from "@arkenv/core"(1.0.0-rc.1) with modernstring.host/number.portschema; runner istsx(StackBlitz-compatible ESM)with-zod/with-valibot:@arkenv/standard^1.0.0-alpha.2→1.0.0-rc.1with-nextjs-zod/with-vite-react-zod: alpha plugin/standard pins →1.0.0-rc.1, pluslegacy-peer-deps=true.npmrctree/v1/...; merged latestv1socommunity.mdxcontribution links match (fix: point Playground and example links at v1 #1903)Verification
Ran stackblitz / with-zod / with-valibot against published
1.0.0-rc.1. Pullfrog re-review approved after thetsxfix; community.mdx note closed via merge fromv1.