Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add dev container configuration for development experience#15895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
djunehor wants to merge2 commits intonestjs:master
base:master
Choose a base branch
Loading
fromdjunehor:feat/devcontainer-support

Conversation

@djunehor
Copy link

Adds comprehensive VS Code dev container configuration to enable one-click development environment setup. The devcontainer includes Node.js 20 LTS, TypeScript tooling, and essential development services (Redis, NATS, MySQL) with pre-configured VS Code extensions and settings.

Closes#15864

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Contributors need to manually set up their local development environment, including Node.js version, dependencies, services (Redis, NATS, MySQL), and VS Code extensions/settings. This creates friction for new contributors and can lead to inconsistent development environments.

Issue Number:#15864

What is the new behavior?

Contributors can now use VS Code's "Reopen in Container" feature to automatically set up a complete, consistent development environment with:

  • Node.js 20 LTS with npm
  • Pre-installed dependencies with legacy peer deps handling
  • Essential development services (Redis, NATS, MySQL) in isolated containers
  • 15+ pre-configured VS Code extensions for TypeScript, ESLint, Prettier, Docker, etc.
  • Optimized VS Code settings for the NestJS codebase
  • Automated workspace permission handling
  • Comprehensive documentation in.devcontainer/README.md
  • Manual integration test services startup to maintain reliability

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The devcontainer configuration is purely additive and doesn't affect existing development workflows. Developers can continue using their local setup if preferred. Integration test services are available vianpm run test:docker:up but are not started automatically to ensure container reliability.

The implementation follows VS Code dev container best practices and includes robust error handling for permission issues and npm installation failures that commonly occur in containerized environments.

Adds comprehensive VS Code dev container configuration to enable one-click development environment setup. The devcontainer includes Node.js 20 LTS, TypeScript tooling, and essential development services (Redis, NATS, MySQL) with pre-configured VS Code extensions and settings.Closesnestjs#15864
@coveralls
Copy link

coveralls commentedNov 9, 2025
edited
Loading

Pull Request Test Coverage Report forBuild a79e1bef-a856-4cb1-8b31-900ac30e3cbf

Details

  • 0 of0 changed or added relevant lines in0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at88.927%

TotalsCoverage Status
Change from baseBuild a397f2a5-d066-4bae-a4e2-52cdc757a397:0.0%
Covered Lines:7324
Relevant Lines:8236

💛 -Coveralls

nodemon \
# Testing tools
mocha \
nyc \
Copy link
Member

@kamilmysliwieckamilmysliwiecDec 5, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

do we really need some of these packages to be installed globally?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You're right - these don't need to be global. They're already in devDependencies and can be accessed via npm scripts or npx. I'll update the Dockerfile to remove the global installations of mocha, nyc, nodemon, ts-node, and other dev tools.

The only global package that might be justified is npm-check-updates for convenience, but I can remove that too if you prefer. Would you like me to keep just the base Node image and rely entirely on the local node_modules?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yeah i'd say the fewer global deps the better

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Done! I've removed all global npm package installations from the Dockerfile. The devcontainer now relies entirely on local node_modules - all tools (typescript, ts-node, mocha, nyc, eslint, prettier, concurrently, cross-env, lerna, gulp-cli) are accessible via npx or npm scripts.

Removed global npm package installations (typescript, ts-node, mocha, nyc, eslint, prettier, concurrently, cross-env, lerna, gulp-cli) from the devcontainer Dockerfile. These packages are already available in devDependencies and can be accessed via npm scripts or npx, eliminating the need for global installations.This change aligns with the principle of minimizing global dependencies and relying on local node_modules instead.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kamilmysliwieckamilmysliwieckamilmysliwiec left review comments

+2 more reviewers

@micaleviskmicaleviskmicalevisk approved these changes

@Hardanish-SinghHardanish-SinghHardanish-Singh approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[discussion]: Add .devcontainer for simplified development setup

5 participants

@djunehor@coveralls@micalevisk@kamilmysliwiec@Hardanish-Singh

[8]ページ先頭

©2009-2025 Movatter.jp