feat: add dev container with pnpm support - #36
Conversation
Add .devcontainer/devcontainer.json configuration with: - pnpm feature from devcontainers-contrib - Node.js 20 with node-gyp dependencies - VS Code extensions for development - Auto-install dependencies on container creation Resolves #35 Co-authored-by: keito4 <keito4@users.noreply.github.com>
WalkthroughThe devcontainer configuration was overhauled, replacing a custom Dockerfile and numerous tool installations with a base Node.js image and only essential features: Node.js, pnpm, and Git. Additional tool installations and environment customizations were removed, and the setup was simplified for a focused Node.js development environment. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant DevContainer
participant VSCode
Developer->>DevContainer: Start container (using new config)
DevContainer->>DevContainer: Use Node.js base image
DevContainer->>DevContainer: Enable Node.js, pnpm, Git features
DevContainer->>DevContainer: Run 'pnpm install'
DevContainer->>VSCode: Apply recommended extensions and settings
Developer->>DevContainer: Begin development (Node.js + pnpm environment)
Assessment against linked issues
Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.devcontainer/devcontainer.json (3)
2-2: Consider clarifying the container name.The
namefield is fairly generic; you might include the project name or a more descriptive label to distinguish it among multiple dev containers.
19-24: VS Code extensions list looks solid.The selected extensions cover JSON, Tailwind, Prettier, and TypeScript Next. Optionally, you could add an ESLint extension (e.g.,
dbaeumer.vscode-eslint) to enhance linting support.
31-31: Enhance reproducibility inpostCreateCommand.Consider using a frozen lockfile to ensure installs are deterministic:
- "postCreateCommand": "pnpm install", + "postCreateCommand": "pnpm install --frozen-lockfile",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.devcontainer/devcontainer.json(1 hunks)
🔇 Additional comments (6)
.devcontainer/devcontainer.json (6)
3-3: Node.js 20 base image is appropriate.Using
mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseyepins to Node.js v20 LTS on Debian Bullseye, which aligns with your project requirements.
5-8: Node feature configuration is correct.Enabling
nodeGypDependenciesand pinning to version 20 ensures native modules can build successfully against the intended Node version.
9-11: pnpm feature configured.Including the pnpm feature at the latest version sets up the recommended package manager; looks good.
12-15: Git feature configuration is sound.Installing Git via the PPA and using the latest version will keep your workflow up-to-date.
26-27: Verify.npmrcfile presence for npmrc preference.You’ve set
"typescript.preferences.npmrc": ".npmrc"and package manager to pnpm. Please confirm a.npmrcexists at the workspace root and includes the desired pnpm settings.
32-32: ConfirmremoteUserchange won't impact permissions.Switching the remote user to
nodecan affect file ownership and permission for mounted volumes. Please verify that this user has the required permissions and that your workflows still function as expected.
Add .devcontainer/devcontainer.json configuration with pnpm support using features functionality.
Changes
Resolves #35
Generated with Claude Code
Summary by CodeRabbit