Update Bun example for plugin and add Bun+React example#459
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughRemoves explicit BUN_PUBLIC properties from the playground ambient types and adds a new examples/with-bun-react full‑stack example that integrates the ArkEnv Bun plugin: Bun server, React frontend, HMR, ArkEnv schema, build script, and supporting configs/docs. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s in `with-bun-react` example, and correct `with-vite-react` workspace path.
… the default development port.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (5)
examples/with-bun-react/src/api-tester.tsx (1)
15-18: Consider adding response status check.The code assumes the response is always JSON-parseable without checking the response status or content-type. While the error handling will catch failures, it would be more user-friendly to check
res.okand provide specific error messages.const res = await fetch(url, { method }); +if (!res.ok) { + throw new Error(`HTTP ${res.status}: ${res.statusText}`); +} + const data = await res.json(); responseInputRef.current!.value = JSON.stringify(data, null, 2);examples/with-bun-react/src/App.tsx (1)
31-37: Environment variables display as strings after build transformation.The code displays
process.env.BUN_PUBLIC_TESTandprocess.env.BUN_PUBLIC_BOOLEANdirectly. The ArkEnv Bun plugin replaces these references with JSON-stringified values at build time, sotypeofwill always show"string"even for boolean values.If the goal is to demonstrate type-safe environment access, consider importing and displaying the validated
envobject from./envinstead:import { env } from "./env"; // Then in the table: <td>{String(env.BUN_PUBLIC_TEST)}</td> <td>{typeof env.BUN_PUBLIC_TEST}</td>This would show the actual types after validation. However, if the intent is to demonstrate the plugin's variable replacement behavior, the current approach is correct.
examples/with-bun-react/src/env.ts (1)
3-7: Consider adding default values for better developer experience.The schema requires all variables without defaults. For an example demonstrating ArkEnv capabilities, consider showing optional variables with defaults using ArkType's default syntax:
const Env = type({ - PORT: "number.port", + PORT: "number.port = 3000", BUN_PUBLIC_TEST: "string", - BUN_PUBLIC_BOOLEAN: "boolean", + BUN_PUBLIC_BOOLEAN: "boolean = false", });This would demonstrate ArkType's default value feature (per coding guidelines) and provide a better developer experience. However, if the intent is to show strict validation, the current approach is fine.
examples/with-bun-react/src/index.ts (2)
12-23: Consider removing or prefixing unusedreqparameter.The
reqparameter in both GET and PUT handlers is declared but never used. You can either remove it or prefix it with an underscore to indicate it's intentionally unused.Apply this diff to remove the unused parameter:
"/api/hello": { - async GET(req) { + async GET() { return Response.json({ message: "Hello, world!", method: "GET", }); }, - async PUT(req) { + async PUT() { return Response.json({ message: "Hello, world!", method: "PUT", }); }, },
34-34: Consider validating NODE_ENV through the env schema.Direct access to
process.env.NODE_ENVbypasses ArkEnv validation. For consistency, consider addingNODE_ENVto your environment schema with appropriate defaults.Example addition to your env schema:
NODE_ENV: "'development' | 'production' | 'test' = 'development'"Then update the condition:
-development: process.env.NODE_ENV !== "production" && { +development: env.NODE_ENV !== "production" && {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
examples/with-bun-react/bun.lockis excluded by!**/*.lockexamples/with-bun-react/src/logo.svgis excluded by!**/*.svgexamples/with-bun-react/src/react.svgis excluded by!**/*.svg
📒 Files selected for processing (20)
apps/playgrounds/bun-react/bun-env.d.ts(1 hunks)arkenv.code-workspace(1 hunks)examples/README.md(1 hunks)examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc(1 hunks)examples/with-bun-react/.env.development(1 hunks)examples/with-bun-react/.env.production(1 hunks)examples/with-bun-react/.gitignore(1 hunks)examples/with-bun-react/README.md(1 hunks)examples/with-bun-react/build.ts(1 hunks)examples/with-bun-react/bun-env.d.ts(1 hunks)examples/with-bun-react/bunfig.toml(1 hunks)examples/with-bun-react/package.json(1 hunks)examples/with-bun-react/src/App.tsx(1 hunks)examples/with-bun-react/src/api-tester.tsx(1 hunks)examples/with-bun-react/src/env.ts(1 hunks)examples/with-bun-react/src/frontend.tsx(1 hunks)examples/with-bun-react/src/index.css(1 hunks)examples/with-bun-react/src/index.html(1 hunks)examples/with-bun-react/src/index.ts(1 hunks)examples/with-bun-react/tsconfig.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)
**/*.{ts,tsx}: Prefertypeoverinterfacefor type definitions in TypeScript
Use TypeScript 5.1+ features when appropriate
Leverageconsttype parameters for better inference in TypeScript
Use JSDoc comments for public APIs
Use tabs for indentation (configured in Biome)
Use double quotes for strings (configured in Biome)
Organize imports automatically (Biome handles this)
Avoid explicit types when TypeScript can infer them (noInferrableTypeserror)
Useas constwhere appropriate for immutable values (useAsConstAssertionerror)
Don't reassign function parameters (noParameterAssignerror)
Place default parameters last in function signatures (useDefaultParameterLasterror)
Always initialize enum values (useEnumInitializerserror)
Declare one variable per statement (useSingleVarDeclaratorerror)
Avoid unnecessary template literals (noUnusedTemplateLiteralerror)
PreferNumber.parseIntover globalparseInt(useNumberNamespaceerror)
Use kebab-case for TypeScript filenames (e.g.,create-env.ts)
Use camelCase for function names (e.g.,createEnv)
Use PascalCase for type names (e.g.,ArkEnvError)
Use UPPER_SNAKE_CASE for environment variables and constants
Include examples in JSDoc comments when helpful for public APIs
Document complex type logic with JSDoc comments
UseArkEnvErrorfor environment variable validation errors
Provide clear, actionable error messages that include the variable name and expected type
Files:
examples/with-bun-react/src/App.tsxexamples/with-bun-react/src/env.tsexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.tsexamples/with-bun-react/bun-env.d.tsexamples/with-bun-react/src/api-tester.tsx
**/*.tsx
📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)
Use self-closing JSX elements (
useSelfClosingElementserror)
Files:
examples/with-bun-react/src/App.tsxexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/api-tester.tsx
{bin,examples,playgrounds}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)
Console usage is allowed in
bin/and example/playground directories, otherwise treated as warning
Files:
examples/with-bun-react/src/App.tsxexamples/with-bun-react/src/env.tsexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/build.tsexamples/with-bun-react/bun-env.d.tsexamples/with-bun-react/src/api-tester.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx,js,jsx}: Use the main functioncreateEnv(schema)or default importarkenvto create validated environment objects with TypeScript type inference from ArkType schemas
Use built-in validators (host,port,url,src/types.tswhen available instead of writing custom validation logic
Provide descriptive variable names that indicate purpose and format in environment schema definitions
Group related environment variables in logical schemas for better organization and maintainability
Provide default values for optional environment variables using ArkType's default value syntax (e.g.,"boolean = false")
Files:
examples/with-bun-react/src/App.tsxexamples/with-bun-react/src/env.tsexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.tsexamples/with-bun-react/bun-env.d.tsexamples/with-bun-react/src/api-tester.tsx
examples/*/package.json
📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)
Examples in examples/ directory are not published, may have their own lock files, and are used as test fixtures
Files:
examples/with-bun-react/package.json
**/package.json
📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)
Use workspace:* protocol for workspace dependencies between packages
Files:
examples/with-bun-react/package.json
**/index.ts
📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)
Use barrel exports (
index.ts) for package entry points
Files:
examples/with-bun-react/src/index.ts
apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx}: Usebun <file>instead ofnode <file>orts-node <file>for running TypeScript and JavaScript files
Bun automatically loads .env files, so don't use the dotenv package
UseBun.serve()with built-in WebSocket, HTTPS, and route support instead ofexpress
Usebun:sqlitefor SQLite database operations instead ofbetter-sqlite3
UseBun.redisfor Redis operations instead ofioredis
UseBun.sqlfor Postgres database operations instead ofpgorpostgres.js
Use built-inWebSocketinstead of thewspackage
PreferBun.fileovernode:fsreadFile/writeFile methods for file operations
UseBun.$template literal syntax for shell commands instead ofexeca
Files:
apps/playgrounds/bun-react/bun-env.d.ts
apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html,css}
📄 CodeRabbit inference engine (apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
Use
bun build <file.html|file.ts|file.css>instead ofwebpackoresbuildfor bundling
Files:
apps/playgrounds/bun-react/bun-env.d.ts
apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html}
📄 CodeRabbit inference engine (apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
CSS files can be imported directly in TypeScript/JavaScript or referenced in HTML
<link>tags, and Bun will automatically bundle them
Files:
apps/playgrounds/bun-react/bun-env.d.ts
apps/playgrounds/bun-react/**/*.ts
📄 CodeRabbit inference engine (apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
Use
bun --hotto run TypeScript entry files with hot module reloading enabled
Files:
apps/playgrounds/bun-react/bun-env.d.ts
🧠 Learnings (64)
📓 Common learnings
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 132
File: packages/arkenv/README.md:13-14
Timestamp: 2025-09-09T17:37:19.650Z
Learning: For yamcodes/arkenv project: Runtime support documentation should link to specific examples: Node.js (examples/basic), Bun (examples/with-bun), Vite (examples/with-vite-react-ts).
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Bun automatically loads .env files, so don't use the dotenv package
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `Bun.redis` for Redis operations instead of `ioredis`
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.ts : Use `bun --hot` to run TypeScript entry files with hot module reloading enabled
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `bun <file>` instead of `node <file>` or `ts-node <file>` for running TypeScript and JavaScript files
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `Bun.serve()` with built-in WebSocket, HTTPS, and route support instead of `express`
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Bun automatically loads .env files, so don't use `dotenv` library
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Use `Bun.redis` for Redis operations instead of `ioredis`
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/index.ts : Run frontend development with `bun --hot ./index.ts` for hot module reloading
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html,css} : Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild` for bundling
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : Use HTML imports with `Bun.serve()` and don't use Vite for frontend bundling and development
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html} : CSS files can be imported directly in TypeScript/JavaScript or referenced in HTML `<link>` tags, and Bun will automatically bundle them
Applied to files:
examples/with-bun-react/src/index.cssarkenv.code-workspaceexamples/with-bun-react/src/App.tsxexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.htmlexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html,css} : Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild` for bundling
Applied to files:
examples/with-bun-react/src/index.cssarkenv.code-workspaceexamples/with-bun-react/README.mdexamples/with-bun-react/.gitignoreexamples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/package.jsonexamples/with-bun-react/.env.developmentexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.htmlexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : Use HTML imports with `Bun.serve()` and don't use Vite for frontend bundling and development
Applied to files:
examples/with-bun-react/src/index.cssarkenv.code-workspaceexamples/with-bun-react/README.mdexamples/with-bun-react/src/App.tsxexamples/with-bun-react/.env.developmentexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.htmlexamples/README.md
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.html : Use `<link>` tags in HTML for stylesheets; Bun's CSS bundler will handle bundling automatically
Applied to files:
examples/with-bun-react/src/index.css
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : HTML files can import `.tsx`, `.jsx`, or `.js` files directly as modules, and Bun will automatically transpile and bundle them
Applied to files:
examples/with-bun-react/src/index.cssexamples/with-bun-react/README.mdexamples/with-bun-react/src/App.tsxexamples/with-bun-react/package.jsonexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.htmlexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Bun automatically loads .env files, so don't use the dotenv package
Applied to files:
examples/with-bun-react/src/index.cssexamples/with-bun-react/.gitignoreexamples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/src/env.tsexamples/with-bun-react/package.jsonexamples/with-bun-react/.env.developmentexamples/with-bun-react/bunfig.tomlapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/bun-env.d.tsexamples/README.md
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{html,ts,tsx,css} : Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild` for bundling
Applied to files:
examples/with-bun-react/src/index.cssarkenv.code-workspaceexamples/with-bun-react/README.mdexamples/with-bun-react/.gitignoreexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.html
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Bun automatically loads .env files, so don't use `dotenv` library
Applied to files:
examples/with-bun-react/src/index.cssexamples/with-bun-react/.gitignoreexamples/with-bun-react/.env.productionexamples/with-bun-react/src/env.tsexamples/with-bun-react/.env.developmentexamples/with-bun-react/bunfig.tomlapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.tsexamples/with-bun-react/bun-env.d.tsexamples/README.md
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{html,tsx,jsx} : Use HTML imports with `Bun.serve()` instead of Vite for frontend development
Applied to files:
examples/with-bun-react/src/index.cssarkenv.code-workspaceexamples/with-bun-react/README.mdexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcexamples/with-bun-react/src/index.htmlexamples/README.md
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.html : HTML files can import .tsx, .jsx, or .js files directly; Bun will automatically transpile and bundle
Applied to files:
examples/with-bun-react/src/index.cssexamples/with-bun-react/src/App.tsxexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.html
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/index.ts : Run frontend development with `bun --hot ./index.ts` for hot module reloading
Applied to files:
examples/with-bun-react/src/index.cssexamples/with-bun-react/README.mdexamples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/package.jsonexamples/with-bun-react/.env.developmentexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.html
📚 Learning: 2025-09-09T17:37:19.650Z
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 132
File: packages/arkenv/README.md:13-14
Timestamp: 2025-09-09T17:37:19.650Z
Learning: For yamcodes/arkenv project: Runtime support documentation should link to specific examples: Node.js (examples/basic), Bun (examples/with-bun), Vite (examples/with-vite-react-ts).
Applied to files:
arkenv.code-workspaceexamples/with-bun-react/package.jsonexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcexamples/README.md
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.ts : Use `bun --hot` to run TypeScript entry files with hot module reloading enabled
Applied to files:
arkenv.code-workspaceexamples/with-bun-react/README.mdexamples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/package.jsonexamples/with-bun-react/.env.developmentexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.htmlexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to packages/vite-plugin/src/**/*.test.ts : Test Vite plugin using the `with-vite-react-ts` example as a fixture and validate plugin works with real Vite projects
Applied to files:
arkenv.code-workspaceexamples/with-bun-react/src/api-tester.tsxexamples/README.md
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.test.{ts,tsx,js,jsx} : Use `bun test` instead of `jest` or `vitest` for running tests
Applied to files:
arkenv.code-workspaceexamples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/.env.developmentexamples/with-bun-react/src/api-tester.tsx
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `bun <file>` instead of `node <file>` or `ts-node <file>` for running TypeScript and JavaScript files
Applied to files:
arkenv.code-workspaceexamples/with-bun-react/README.mdexamples/with-bun-react/src/App.tsxexamples/with-bun-react/package.jsonexamples/with-bun-react/.env.developmentexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.tsexamples/with-bun-react/src/index.htmlexamples/with-bun-react/bun-env.d.tsexamples/README.md
📚 Learning: 2025-11-29T07:55:19.139Z
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 457
File: examples/basic-js/package.json:15-15
Timestamp: 2025-11-29T07:55:19.139Z
Learning: Examples in the examples/ directory are standalone projects and can use their own package managers (npm, bun, etc.) instead of being required to use pnpm.
Applied to files:
arkenv.code-workspaceexamples/with-bun-react/package.jsonexamples/README.md
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/package.json : Use `bun install` instead of `npm install`, `yarn install`, or `pnpm install` in package.json scripts
Applied to files:
examples/with-bun-react/README.mdexamples/with-bun-react/package.jsonexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcexamples/with-bun-react/build.ts
📚 Learning: 2025-11-29T07:59:59.400Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.400Z
Learning: Document environment requirements and new features in README files, and provide examples in the `examples/` directory for new functionality
Applied to files:
examples/with-bun-react/README.md
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/package.json : Use `bun install` instead of `npm install`, `yarn install`, or `pnpm install` for dependency management
Applied to files:
examples/with-bun-react/README.mdexamples/with-bun-react/package.jsonexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcexamples/with-bun-react/build.ts
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/package.json : Use `bun run <script>` instead of `npm run <script>`, `yarn run <script>`, or `pnpm run <script>` in package.json scripts
Applied to files:
examples/with-bun-react/README.mdexamples/with-bun-react/package.jsonexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,js} : Use `bun <file>` instead of `node <file>` or `ts-node <file>` for running scripts
Applied to files:
examples/with-bun-react/README.mdexamples/with-bun-react/.gitignoreexamples/with-bun-react/.env.productionexamples/with-bun-react/.env.developmentexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/build.ts
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Build output should go to dist/ directory and be gitignored; source files should be in src/ directory
Applied to files:
examples/with-bun-react/.gitignore
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Prefer `Bun.file` over `node:fs` readFile/writeFile methods for file operations
Applied to files:
examples/with-bun-react/.gitignoreapps/playgrounds/bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to tooling/*/package.json : Tooling in tooling/ directory contains development and testing tools that are not published to npm and excluded from changesets
Applied to files:
examples/with-bun-react/.gitignore
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Monorepo directory structure must follow: packages/ (published npm packages), apps/ (applications), examples/ (example projects), tooling/ (development tools), and turbo.json at root
Applied to files:
examples/with-bun-react/.gitignore
📚 Learning: 2025-11-29T08:00:08.031Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/pnpm.mdc:0-0
Timestamp: 2025-11-29T08:00:08.031Z
Learning: Applies to package.json : Configure only built dependencies (native modules) in `pnpm.onlyBuiltDependencies`, including: biomejs/biome, sentry/cli, swc/core, tailwindcss/oxide, vercel/speed-insights, esbuild, and sharp
Applied to files:
examples/with-bun-react/.gitignore
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Prefer `Bun.file` over `node:fs` readFile/writeFile for file operations
Applied to files:
examples/with-bun-react/.gitignore
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `Bun.redis` for Redis operations instead of `ioredis`
Applied to files:
examples/with-bun-react/.env.productionapps/playgrounds/bun-react/bun-env.d.ts
📚 Learning: 2025-11-29T07:59:59.399Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.399Z
Learning: Applies to **/packages/**/*.{test,integration.test}.{ts,tsx} : Mock `process.env` in tests to simulate different environment scenarios with both valid and invalid values
Applied to files:
examples/with-bun-react/.env.productionexamples/with-bun-react/.env.developmentapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.test.{ts,tsx,js,jsx} : Use `bun:test` for unit and integration testing with `test` and `expect` from the built-in test module
Applied to files:
examples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/package.jsonexamples/with-bun-react/.env.developmentexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/build.tsexamples/with-bun-react/src/api-tester.tsxexamples/README.md
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.test.{ts,tsx,js,jsx} : Use `bun test` instead of `jest` or `vitest` for running tests
Applied to files:
examples/with-bun-react/.env.productionexamples/with-bun-react/src/App.tsxexamples/with-bun-react/.env.developmentexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.test.{ts,tsx,js,jsx} : Use `import { test, expect } from "bun:test"` for writing tests
Applied to files:
examples/with-bun-react/src/App.tsxexamples/with-bun-react/src/api-tester.tsx
📚 Learning: 2025-11-29T07:59:59.399Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.399Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use the main function `createEnv(schema)` or default import `arkenv` to create validated environment objects with TypeScript type inference from ArkType schemas
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/package.jsonexamples/with-bun-react/build.tsexamples/with-bun-react/bun-env.d.tsexamples/README.md
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Keep environment variable schemas readable and TypeScript-like using ArkType syntax
Applied to files:
examples/with-bun-react/src/env.tsapps/playgrounds/bun-react/bun-env.d.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-29T07:59:59.399Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.399Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Group related environment variables in logical schemas for better organization and maintainability
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/.env.developmentexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-29T07:59:59.399Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.399Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Provide default values for optional environment variables using ArkType's default value syntax (e.g., `"boolean = false"`)
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/.env.developmentexamples/with-bun-react/tsconfig.jsonexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable validation errors
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-29T07:59:59.399Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.399Z
Learning: Applies to **/packages/arkenv/**/*.{ts,tsx} : Ensure environment validation errors display missing variables, expected types/formats, and helpful suggestions for fixing issues
Applied to files:
examples/with-bun-react/src/env.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's built-in types (e.g., `string.host`, `number.port`) where possible in environment schemas
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-29T07:59:59.399Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T07:59:59.399Z
Learning: Applies to **/packages/arkenv/**/*.{test,integration.test}.{ts,tsx} : Save and restore original `process.env` in `beforeEach`/`afterEach` hooks to avoid test pollution
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use ArkType's `type()` function to define schemas in environment variable definitions
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Convert ArkType validation errors to `ArkEnvError` for user-friendly error messages that include variable name and expected type
Applied to files:
examples/with-bun-react/src/env.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use union types for enums in ArkType schemas (e.g., `"'dev' | 'prod'"`) instead of separate enum definitions
Applied to files:
examples/with-bun-react/src/env.tsexamples/with-bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's type inference for TypeScript types instead of manual type definitions
Applied to files:
examples/with-bun-react/src/env.ts
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/package.json : Use `bun run <script>` instead of `npm run <script>`, `yarn run <script>`, or `pnpm run <script>` for running scripts
Applied to files:
examples/with-bun-react/package.jsonexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to packages/*/package.json : Packages in packages/ directory must be published to npm and require changesets for versioning, proper exports, and type definitions
Applied to files:
examples/with-bun-react/package.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript 5.1+ features when appropriate
Applied to files:
examples/with-bun-react/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Organize imports automatically (Biome handles this)
Applied to files:
examples/with-bun-react/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Avoid unnecessary template literals (`noUnusedTemplateLiteral` error)
Applied to files:
examples/with-bun-react/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Place default parameters last in function signatures (`useDefaultParameterLast` error)
Applied to files:
examples/with-bun-react/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Avoid explicit types when TypeScript can infer them (`noInferrableTypes` error)
Applied to files:
examples/with-bun-react/tsconfig.json
📚 Learning: 2025-11-24T16:05:09.182Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/www/.cursor/rules/posthog-integration.mdc:0-0
Timestamp: 2025-11-24T16:05:09.182Z
Learning: Applies to apps/www/**/*.{ts,tsx,js,jsx} : If using TypeScript, use an enum to store feature flag names. If using JavaScript, store feature flag names as strings to an object declared as a constant to simulate an enum. Use UPPERCASE_WITH_UNDERSCORE naming convention for enum/const object members.
Applied to files:
examples/with-bun-react/tsconfig.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `Bun.serve()` with built-in WebSocket, HTTPS, and route support instead of `express`
Applied to files:
examples/with-bun-react/src/frontend.tsxexamples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Use `Bun.serve()` with built-in WebSocket, HTTPS, and route support instead of `express`
Applied to files:
examples/with-bun-react/src/index.tsexamples/with-bun-react/bunfig.tomlexamples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Use `Bun.redis` for Redis operations instead of `ioredis`
Applied to files:
apps/playgrounds/bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `Bun.$` template literal syntax for shell commands instead of `execa`
Applied to files:
apps/playgrounds/bun-react/bun-env.d.ts
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Use `Bun.$\`command\`` for shell execution instead of `execa`
Applied to files:
examples/with-bun-react/build.ts
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to **/*.test.{ts,tsx} : Focus component tests on public API, user behavior, state transitions, and accessibility rather than styling or implementation details
Applied to files:
examples/with-bun-react/src/api-tester.tsx
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to **/*.integration.test.{ts,tsx} : Test how multiple units (components, hooks, functions) work together without mocking their interactions in integration tests
Applied to files:
examples/with-bun-react/src/api-tester.tsx
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to **/*.test.{ts,tsx} : Test individual functions, components, and hooks in isolation with mocked dependencies in unit tests
Applied to files:
examples/with-bun-react/src/api-tester.tsx
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Include examples in JSDoc comments when helpful for public APIs
Applied to files:
examples/with-bun-react/src/api-tester.tsx
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to **/*.test.{ts,tsx} : Use Testing Library with `user-event` for real user simulation in component tests
Applied to files:
examples/with-bun-react/src/api-tester.tsx
🧬 Code graph analysis (8)
examples/with-bun-react/.env.production (1)
packages/bun-plugin/src/index.test.ts (7)
process(48-68)process(39-46)process(30-37)originalEnv(4-69)originalEnv(7-9)arkenvPlugin(43-45)process(19-28)
examples/with-bun-react/src/App.tsx (3)
apps/playgrounds/bun-react/src/App.tsx (1)
App(7-45)examples/with-bun-react/src/api-tester.tsx (1)
APITester(3-50)apps/playgrounds/bun-react/src/APITester.tsx (2)
APITester(3-50)e(6-22)
examples/with-bun-react/src/env.ts (4)
packages/arkenv/src/type.ts (1)
type(3-3)packages/bun-plugin/src/index.ts (2)
arkenv(126-137)processEnvSchema(12-32)packages/arkenv/src/custom-types.integration.test.ts (1)
env(191-197)packages/arkenv/src/create-env.ts (1)
createEnv(34-52)
examples/with-bun-react/.env.development (2)
packages/bun-plugin/src/index.test.ts (6)
process(48-68)process(39-46)process(30-37)arkenvPlugin(34-36)arkenvPlugin(43-45)process(19-28)examples/with-vite-react/vite.config.ts (1)
env(11-20)
examples/with-bun-react/src/index.ts (3)
examples/with-bun-react/src/env.ts (1)
env(9-9)apps/playgrounds/bun-react/src/index.tsx (3)
PUT(16-21)req(24-29)GET(10-15)packages/bun-plugin/src/index.ts (2)
build(179-239)setup(133-135)
examples/with-bun-react/bunfig.toml (1)
packages/bun-plugin/src/index.ts (3)
arkenv(126-137)processEnvSchema(12-32)build(179-239)
examples/with-bun-react/build.ts (1)
packages/bun-plugin/src/index.ts (4)
build(179-239)args(38-88)arkenv(126-137)setup(133-135)
examples/with-bun-react/src/api-tester.tsx (1)
apps/playgrounds/bun-react/src/APITester.tsx (2)
APITester(3-50)e(6-22)
🪛 dotenv-linter (4.0.0)
examples/with-bun-react/.env.production
[warning] 2-2: [UnorderedKey] The BUN_PUBLIC_BOOLEAN key should go before the BUN_PUBLIC_TEST key
(UnorderedKey)
examples/with-bun-react/.env.development
[warning] 2-2: [UnorderedKey] The BUN_PUBLIC_BOOLEAN key should go before the BUN_PUBLIC_TEST key
(UnorderedKey)
🪛 markdownlint-cli2 (0.18.1)
examples/README.md
15-15: Emphasis style
Expected: underscore; Actual: asterisk
(MD049, emphasis-style)
15-15: Emphasis style
Expected: underscore; Actual: asterisk
(MD049, emphasis-style)
16-16: Emphasis style
Expected: underscore; Actual: asterisk
(MD049, emphasis-style)
16-16: Emphasis style
Expected: underscore; Actual: asterisk
(MD049, emphasis-style)
…and build process, and refine HMR root creation in `frontend.tsx`.
Closes #455
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.