Clarify TypeScript module resolution requirements#379
Conversation
…nd a new bun playground entry - Added association for tsconfig.json to be recognized as jsonc. - Introduced a new playground entry for bun in the workspace settings.
- Created .gitignore to exclude unnecessary files and directories. - Added bun.lock for dependency management. - Introduced index.ts with a simple console log. - Configured package.json with scripts for development and build. - Added README.md for project instructions. - Set up tsconfig.json for TypeScript configuration. - Included a Cursor rule for using Bun instead of Node.js and related tools.
- Updated TypeScript configuration to use ESNext features and improved module resolution. - Enabled strict type-checking options and added best practices for TypeScript development. - Removed outdated comments and organized settings for better clarity and maintainability.
- Added a new configuration option for `moduleResolution` in the TypeScript example. - Included important notes on module resolution requirements for ArkEnv, emphasizing the need for modern strategies to avoid type errors. - Clarified the implications of using older module resolution strategies.
- Added detailed instructions for modern TypeScript module resolution strategies in the README. - Emphasized the necessity of using supported module resolution options to avoid potential issues. - Retained information on compatibility with Node.js LTS and Bun versions.
- Clarified the requirement for modern TypeScript module resolution in the quickstart guide. - Replaced the previous emphasis on specific module resolution strategies with a more flexible approach, allowing omission of `moduleResolution` under certain conditions. - Enhanced the documentation to guide users towards best practices for configuring their TypeScript projects with ArkEnv.
- Introduced new dependencies for the Bun playground, including arkenv@0.7.5 and arktype@2.1.26. - Added devDependencies for Bun, including typescript@5.9.3 and @types/bun@1.3.2. - Updated pnpm-lock.yaml to reflect these changes and ensure proper dependency resolution.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a new Bun playground at apps/playgrounds/bun/ with project files, examples and tooling guidance; updates TypeScript moduleResolution guidance in docs and workspace filings to accommodate bundler/node16/nodenext settings. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings⏰ 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). (1)
🔇 Additional comments (1)
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 |
📦 Bundle Size Report
✅ All size limits passed! |
- Deleted Bun playground dependencies from pnpm-lock.yaml, including arkenv@0.7.5 and arktype@2.1.26. - Updated pnpm-workspace.yaml to exclude the Bun playground from the workspace packages. - Ensured that the pnpm-lock.yaml reflects the removal of unused dependencies for better maintenance.
commit: |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/playgrounds/bun/package.json (1)
19-19: Consider pinning@types/bunto a specific version.Using
"latest"for@types/buncan lead to unpredictable builds as types may change between installations. Consider pinning to a specific version for reproducibility.- "@types/bun": "latest", + "@types/bun": "^1.3.2",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
apps/playgrounds/bun/bun.lockis excluded by!**/*.lockpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc(1 hunks)apps/playgrounds/bun/.gitignore(1 hunks)apps/playgrounds/bun/README.md(1 hunks)apps/playgrounds/bun/index.ts(1 hunks)apps/playgrounds/bun/package.json(1 hunks)apps/playgrounds/bun/tsconfig.json(1 hunks)apps/www/content/docs/quickstart.mdx(1 hunks)arkenv.code-workspace(2 hunks)examples/with-bun/tsconfig.json(1 hunks)packages/arkenv/README.md(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 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).
📚 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:
apps/playgrounds/bun/README.mdapps/playgrounds/bun/package.jsonapps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcarkenv.code-workspaceapps/www/content/docs/quickstart.mdxpackages/arkenv/README.md
📚 Learning: 2025-09-10T19:35:18.179Z
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 136
File: .changeset/vast-bananas-win.md:2-3
Timestamp: 2025-09-10T19:35:18.179Z
Learning: The arkenv package is currently in v0.x.x (pre-1.0) development phase, where breaking changes are acceptable in minor version bumps according to semantic versioning conventions.
Applied to files:
packages/arkenv/README.md
⏰ 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)
- GitHub Check: test-e2e (a11y)
- GitHub Check: test-e2e (e2e)
🔇 Additional comments (10)
arkenv.code-workspace (1)
5-5: LGTM! Workspace configuration updated appropriately.The file association for
tsconfig.jsonas JSONC enables comment support, and the new Bun playground folder is properly registered in the workspace.Also applies to: 50-53
apps/playgrounds/bun/README.md (1)
1-15: LGTM! Clear and concise playground documentation.The README provides straightforward setup and usage instructions appropriate for a playground environment.
apps/playgrounds/bun/index.ts (1)
1-1: LGTM! Minimal playground entry point.This simple console output serves as an appropriate starting point for testing and development in the Bun playground.
packages/arkenv/README.md (1)
113-117: Excellent clarification of TypeScript module resolution requirements!The expanded guidance clearly explains the supported
moduleResolutionoptions (bundler, node16/nodenext) and provides helpful warnings about unsupported strategies. The specific guidance forcommonjsusers addresses a common pain point. This aligns perfectly with the PR objectives.apps/www/content/docs/quickstart.mdx (1)
17-30: Excellent documentation enhancement for TypeScript configuration!The updated guidance clearly explains modern module resolution requirements, provides specific configuration options, and includes a helpful tip about when
moduleResolutioncan be omitted. This complements the README changes and provides a consistent developer experience.apps/playgrounds/bun/.gitignore (1)
1-34: LGTM! Comprehensive ignore patterns for Bun project.The
.gitignoreincludes all standard patterns for dependencies, build outputs, environment files, and IDE artifacts appropriate for a Bun-based playground.apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc (1)
1-111: LGTM! Comprehensive Cursor AI rules for Bun development.This rule file provides excellent guidance for developers working in the Bun playground, covering command substitutions, API preferences, testing patterns, and frontend setup with practical examples.
apps/playgrounds/bun/package.json (1)
11-11: Thepnpm -w run fixpattern is intentional and consistent across all playgrounds.Verification confirms that all playgrounds (Vite, Node, and Bun) use the identical
pnpm -w run fixscript. This is a deliberate monorepo workspace management pattern, not an inconsistency specific to Bun. The approach is correct and requires no changes.Likely an incorrect or invalid review comment.
apps/playgrounds/bun/tsconfig.json (1)
1-29: TypeScript configuration appropriate for Bun bundler environment.The configuration correctly uses
"moduleResolution": "bundler"with"module": "Preserve"and"moduleDetection": "force", which is the right setup for bundler-based TypeScript projects. The settings allow TypeScript to work with modern bundlers like Bun while preserving the original module syntax for the bundler to handle.Well-organized sections and clear comments make this configuration maintainable. The strict type-checking baseline with selective opt-outs for development ergonomics is a solid foundation.
Verify that related documentation updates in quickstart.mdx and arkenv/README.md adequately explain why developers should use
"moduleResolution": "bundler"in Bun projects, especially when transitioning from"commonjs"or"node"resolution strategies. This will ensure the PR fully achieves its objective of clarifying module resolution requirements.examples/with-bun/tsconfig.json (1)
3-24: Example configuration modernized for clarity and consistency.Replacing commented defaults with explicit compiler options makes the configuration more maintainable and serves as a clearer reference for developers. The alignment with the new playground configuration (apps/playgrounds/bun/tsconfig.json) reinforces consistent module resolution practices across Bun examples.
This modernization supports the PR's objective of clarifying TypeScript module resolution requirements—developers can now see exactly what's needed for Bun without having to guess which defaults apply.
Verify that existing code in the examples/with-bun/ project (index.ts, components, tests, etc.) still works correctly with these explicit compiler options. Additionally, consider whether other example projects in the repository (e.g., with-vite-react-ts, if present) should receive similar explicit configuration updates for consistency. Per learnings, runtime support documentation should link to specific examples—ensure this example is clearly referenced in the updated documentation.
- Changed arkenv dependency from a file reference to version 0.7.5 in bun.lock. - Updated @types/bun from latest to version ^1.3.2 in package.json. - Ensured bun.lock reflects the latest dependency versions for better consistency.
Closes #378
Summary by CodeRabbit
New Features
Documentation
Chores