Skip to content

Commit

Permalink
Supports javascript-node 22 (#1044)
Browse files Browse the repository at this point in the history
* Support javascript-node 20

* update eslintrc.json to eslint.config.js
  • Loading branch information
samruddhikhandale committed May 6, 2024
1 parent 7cb5857 commit dd7aabf
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
3 changes: 1 addition & 2 deletions src/javascript-node/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# [Choice] Node.js version (use -bookworm, and -bullseye variants on local arm64/Apple Silicon): 20, 18, 20-bookworm, 18-bookworm, 20-bullseye, 18-bullseye, 20-buster, 18-buster
ARG VARIANT=20-bookworm
ARG VARIANT=22-bookworm
FROM node:${VARIANT}

ARG USERNAME=node
Expand Down
9 changes: 5 additions & 4 deletions src/javascript-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| *Categories* | Core, Languages |
| *Image type* | Dockerfile |
| *Published image* | mcr.microsoft.com/devcontainers/javascript-node |
| *Available image variants* | 20 / 20-bookworm, 18 / 18-bookworm, 20-bullseye, 18-bullseye, 20-buster, 18-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/javascript-node/tags/list)) |
| *Available image variants* | 22 / 22-bookworm, 20 / 20-bookworm, 18 / 18-bookworm, 20-bullseye, 18-bullseye, 20-buster, 18-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/javascript-node/tags/list)) |
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bookworm`, and `bullseye` variants |
| *Container host OS support* | Linux, macOS, Windows |
| *Container OS* | Debian |
Expand All @@ -20,16 +20,17 @@
You can directly reference pre-built versions of `Dockerfile` by using the `image` property in `.devcontainer/devcontainer.json` or updating the `FROM` statement in your own `Dockerfile` to one of the following. An example `Dockerfile` is included in this repository.

- `mcr.microsoft.com/devcontainers/javascript-node` (latest)
- `mcr.microsoft.com/devcontainers/javascript-node:22` (or `22-bookworm`, `22-bullseye` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/javascript-node:20` (or `20-bookworm`, `20-bullseye`, `20-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/javascript-node:18` (or `18-bookworm`, `18-bullseye`, `18-buster` to pin to an OS version)

Refer to [this guide](https://containers.dev/guide/dockerfile) for more details.

You can decide how often you want updates by referencing a [semantic version](https://semver.org/) of each image. For example:

- `mcr.microsoft.com/devcontainers/typescript-node:1-20` (or `1-20-bookworm`, `1-20-bullseye`, `1-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.0-20` (or `1.0-20-bookworm`, `1.0-20-bullseye`, `1.0-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.0.3-20` (or `1.0.3-20-bookworm`, `1.0.3-20-bullseye`, `1.0.3-20-buster`)
- `mcr.microsoft.com/devcontainers/typescript-node:1-22` (or `1-22-bookworm`, `1-22-bullseye`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.1-22` (or `1.1-22-bookworm`, `1.1-22-bullseye`)
- `mcr.microsoft.com/devcontainers/typescript-node:1.1.0-22` (or `1.1.0-22-bookworm`, `1.1.0-22-bullseye`)

However, we only do security patching on the latest [non-breaking, in support](https://github.com/devcontainers/images/issues/90) versions of images (e.g. `1-1.0`). You may want to run `apt-get update && apt-get upgrade` in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.

Expand Down
21 changes: 17 additions & 4 deletions src/javascript-node/manifest.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
{
"version": "1.0.11",
"variants": [
"22-bookworm",
"20-bookworm",
"18-bookworm",
"22-bullseye",
"20-bullseye",
"18-bullseye",
"20-buster",
"18-buster"
],
"build": {
"latest": "20-bookworm",
"latest": "22-bookworm",
"rootDistro": "debian",
"architectures": {
"22-bookworm": [
"linux/amd64",
"linux/arm64"
],
"20-bookworm": [
"linux/amd64",
"linux/arm64"
Expand All @@ -20,6 +26,10 @@
"linux/amd64",
"linux/arm64"
],
"22-bullseye": [
"linux/amd64",
"linux/arm64"
],
"20-bullseye": [
"linux/amd64",
"linux/arm64"
Expand All @@ -39,14 +49,17 @@
"javascript-node:${VERSION}-${VARIANT}"
],
"variantTags": {
"20-bookworm": [
"javascript-node:${VERSION}-20",
"22-bookworm": [
"javascript-node:${VERSION}-22",
"javascript-node:${VERSION}-bookworm"
],
"20-bookworm": [
"javascript-node:${VERSION}-20"
],
"18-bookworm": [
"javascript-node:${VERSION}-18"
],
"20-bullseye": [
"22-bullseye": [
"javascript-node:${VERSION}-bullseye"
],
"20-buster": [
Expand Down
21 changes: 0 additions & 21 deletions src/javascript-node/test-project/.eslintrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions src/javascript-node/test-project/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
"rules": {
"no-console": 0,
"eqeqeq":"warn",
"no-cond-assign": 0,
"no-unused-vars": 1,
"no-extra-semi": "warn",
"semi": "warn"
}
};

0 comments on commit dd7aabf

Please sign in to comment.