feat(devcontainers): add the ability to use GitHub Codespaces and VS Code remote containers #658
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For
Hacktoberfest
, I have been addingGitHub Codespaces
/VS Code Remote Containers
configuration for OSS projects to make it easier for contributors to the project to get up and running with the correct developer setup. Including the appropriate configuration for a project allows contributors to work entirely within a web browser viaGH Codespaces
, or inside of fully, and correctly configured containers on their own computer withVS Code Remote Containers
(both of these use the same configuration, asGH Codespaces
leverages theRemote Containers
features under the hood).For the
melt-ui
project, this configuration includes the following:Node LTS
ESLint
,Prettier
,Tailwind CSS
, andSvelte
extensionsplaywright
dependenciespnpm install
when the devcontainer is first createdBasically everything needed for a contributor to open the project after a fresh clone and be immediately productive, either locally with
VS Code
or remotely withGitHub Codespaces
!Note
This
devcontainer
is based off of the Microsoft-provided "node" Docker image, which is based off the Debian12 Docker image. Playwright only started to support Firefox for Debian12 inplaywright@1.37.0
(ref) which is one minor version greater than the version of playwright in the pnpm-lock.yml formelt-ui
. Due to the fact that the package.json specified^1.36.0
forplaywright
and version1.37.0
is semver-compatible with the specified version, I have updated to the latest semver-compatible version in my changes here, specifically1.39.0
.I have run all
playwright
tests inside thedevcontainer
both headlessly and non-headlessly and have confirmed that everything still works correctly. I would have preferred to make no changes besides adding this configuration, but since the version bump was so small and only to a semver-compatible version, I decided it was worth it so that everything works inside thedevcontainer
, includingplaywright
tests.For reference, here are some other repositories for whom I've opened PRs to do the same: