From a225405a75ad50b0359c5c0e7300b4cc36ab3fdf Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Wed, 8 May 2024 18:02:26 +0000 Subject: [PATCH] Adds support for Cpp 24.04 and Typescript-node 22 --- src/cpp/.devcontainer/Dockerfile | 1 - src/cpp/README.md | 5 ++-- src/cpp/manifest.json | 10 ++++++++ src/typescript-node/.devcontainer/Dockerfile | 3 +-- src/typescript-node/README.md | 9 +++---- src/typescript-node/manifest.json | 22 ++++++++++++++--- .../test-project/.eslintignore | 1 - .../test-project/.eslintrc.json | 24 ------------------- .../test-project/eslint.config.js | 11 +++++++++ src/typescript-node/test-project/test.sh | 2 +- 10 files changed, 50 insertions(+), 38 deletions(-) delete mode 100644 src/typescript-node/test-project/.eslintignore delete mode 100644 src/typescript-node/test-project/.eslintrc.json create mode 100644 src/typescript-node/test-project/eslint.config.js diff --git a/src/cpp/.devcontainer/Dockerfile b/src/cpp/.devcontainer/Dockerfile index abdbe2341..fd45e63d4 100644 --- a/src/cpp/.devcontainer/Dockerfile +++ b/src/cpp/.devcontainer/Dockerfile @@ -1,4 +1,3 @@ -# [Choice] Debian / Ubuntu version (use Debian 12, Debian 11, Ubuntu 22.04 on local arm64/Apple Silicon): debian-12, debian-11, debian-10, ubuntu-22.04, ubuntu-20.04 ARG VARIANT=debian-12 FROM mcr.microsoft.com/devcontainers/base:${VARIANT} USER root diff --git a/src/cpp/README.md b/src/cpp/README.md index c713140cc..cfec39b72 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -9,8 +9,8 @@ | *Categories* | Core, Languages | | *Image type* | Dockerfile | | *Published images* | mcr.microsoft.com/devcontainers/cpp | -| *Available image variants* | debian-12, debian-11, debian-10, ubuntu-22.04, ubuntu-20.04 ([full list](https://mcr.microsoft.com/v2/devcontainers/cpp/tags/list)) | -| *Published image architecture(s)* | x86-64, aarch64/arm64 for `debian-12`, `debian-11`,and `ubuntu-22.04` variants | +| *Available image variants* | debian-12, debian-11, debian-10, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04 ([full list](https://mcr.microsoft.com/v2/devcontainers/cpp/tags/list)) | +| *Published image architecture(s)* | x86-64, aarch64/arm64 for `debian-12`, `debian-11`, `ubuntu-24.04` and `ubuntu-22.04` variants | | *Container host OS support* | Linux, macOS, Windows | | *Container OS* | Debian, Ubuntu | | *Languages, platforms* | C++ | @@ -27,6 +27,7 @@ You can directly reference pre-built versions of `Dockerfile` by using the `imag - `mcr.microsoft.com/devcontainers/cpp:debian-11` (or `bullseye`) - `mcr.microsoft.com/devcontainers/cpp:debian-10` (or `buster`) - `mcr.microsoft.com/devcontainers/cpp:ubuntu` (latest Ubuntu LTS) +- `mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04` (or `noble`) - `mcr.microsoft.com/devcontainers/cpp:ubuntu-22.04` (or `jammy`) - `mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04` (or `focal`) diff --git a/src/cpp/manifest.json b/src/cpp/manifest.json index f7fcf811f..985414e5c 100644 --- a/src/cpp/manifest.json +++ b/src/cpp/manifest.json @@ -4,6 +4,7 @@ "bookworm", "bullseye", "buster", + "noble", "jammy", "focal" ], @@ -13,6 +14,7 @@ "bookworm": "base-debian", "bullseye": "base-debian", "buster": "base-debian", + "noble": "base-ubuntu", "jammy": "base-ubuntu", "focal": "base-ubuntu" }, @@ -29,6 +31,10 @@ "buster": [ "linux/amd64" ], + "noble": [ + "linux/amd64", + "linux/arm64" + ], "jammy": [ "linux/amd64", "linux/arm64" @@ -56,6 +62,10 @@ "cpp:${VERSION}-debian-10", "cpp:${VERSION}-debian10" ], + "noble": [ + "cpp:${VERSION}-ubuntu-24.04", + "cpp:${VERSION}-ubuntu24.04" + ], "jammy": [ "cpp:${VERSION}-ubuntu-22.04", "cpp:${VERSION}-ubuntu22.04" diff --git a/src/typescript-node/.devcontainer/Dockerfile b/src/typescript-node/.devcontainer/Dockerfile index e01d5a285..64575ed73 100644 --- a/src/typescript-node/.devcontainer/Dockerfile +++ b/src/typescript-node/.devcontainer/Dockerfile @@ -1,5 +1,4 @@ -# [Choice] Node.js version (use -bookworm, or -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 mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT} # Install tslint, typescript. eslint is installed by javascript image diff --git a/src/typescript-node/README.md b/src/typescript-node/README.md index 217712063..777ca389e 100644 --- a/src/typescript-node/README.md +++ b/src/typescript-node/README.md @@ -9,7 +9,7 @@ | *Categories* | Core, Languages | | *Image type* | Dockerfile | | *Published image* | mcr.microsoft.com/devcontainers/typescript-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/typescript-node/tags/list)) | +| *Available image variants* | 22 / 22-bookworm, 20 / 20-bookworm, 18 / 18-bookworm, 22-bullseye, 20-bullseye, 18-bullseye, 20-buster, 18-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/typescript-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 | @@ -20,6 +20,7 @@ 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/typescript-node` (latest) +- `mcr.microsoft.com/devcontainers/typescript-node:22` (or `22-bookworm`, `22-bullseye` to pin to an OS version) - `mcr.microsoft.com/devcontainers/typescript-node:20` (or `20-bookworm`, `20-bullseye`, `20-buster` to pin to an OS version) - `mcr.microsoft.com/devcontainers/typescript-node:18` (or `18-bookworm`, `18-bullseye`, `18-buster` to pin to an OS version) @@ -27,9 +28,9 @@ 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.0-20` (or `1.0.0-20-bookworm`, `1.0.0-20-bullseye`, `1.0.0-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-20-bookworm`, `1.1.0-20-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.20`). 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. diff --git a/src/typescript-node/manifest.json b/src/typescript-node/manifest.json index 9c4d04a8a..f253a5d83 100644 --- a/src/typescript-node/manifest.json +++ b/src/typescript-node/manifest.json @@ -1,18 +1,24 @@ { "version": "1.0.12", "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", "parent": "javascript-node", "architectures": { + "22-bookworm": [ + "linux/amd64", + "linux/arm64" + ], "20-bookworm": [ "linux/amd64", "linux/arm64" @@ -21,6 +27,10 @@ "linux/amd64", "linux/arm64" ], + "22-bullseye": [ + "linux/amd64", + "linux/arm64" + ], "20-bullseye": [ "linux/amd64", "linux/arm64" @@ -40,13 +50,19 @@ "typescript-node:${VERSION}-${VARIANT}" ], "variantTags": { - "20-bookworm": [ - "typescript-node:${VERSION}-20", + "22-bookworm": [ + "typescript-node:${VERSION}-22", "typescript-node:${VERSION}-bookworm" ], + "20-bookworm": [ + "typescript-node:${VERSION}-20" + ], "18-bookworm": [ "typescript-node:${VERSION}-18" ], + "22-bullseye": [ + "typescript-node:${VERSION}-bullseye" + ], "20-bullseye": [ "typescript-node:${VERSION}-bullseye" ], diff --git a/src/typescript-node/test-project/.eslintignore b/src/typescript-node/test-project/.eslintignore deleted file mode 100644 index 4197b94e5..000000000 --- a/src/typescript-node/test-project/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -**/node_modules/** \ No newline at end of file diff --git a/src/typescript-node/test-project/.eslintrc.json b/src/typescript-node/test-project/.eslintrc.json deleted file mode 100644 index a3cfb2733..000000000 --- a/src/typescript-node/test-project/.eslintrc.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "env": { - "es6": true, - "node": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended" - ], - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint" - ], - "rules": { - } -} \ No newline at end of file diff --git a/src/typescript-node/test-project/eslint.config.js b/src/typescript-node/test-project/eslint.config.js new file mode 100644 index 000000000..571d5ce14 --- /dev/null +++ b/src/typescript-node/test-project/eslint.config.js @@ -0,0 +1,11 @@ +module.exports={ + "rules": { + "no-console": 0, + "eqeqeq":"warn", + "no-cond-assign": 0, + "no-unused-vars": 1, + "no-extra-semi": "warn", + "semi": "warn" + }, + ignorePatterns: ["**/node_modules/**"] +}; \ No newline at end of file diff --git a/src/typescript-node/test-project/test.sh b/src/typescript-node/test-project/test.sh index 99a7c5c82..8977eef71 100755 --- a/src/typescript-node/test-project/test.sh +++ b/src/typescript-node/test-project/test.sh @@ -11,7 +11,7 @@ check "node" node --version sudo rm -f yarn.lock check "yarn" yarn install sudo rm -f package-lock.json -check "eslint" eslint --no-eslintrc -c .eslintrc.json src/server.ts +check "eslint" eslint --no-warn-ignored src/server.ts check "typescript" npm run compile check "test-project" npm run test npm config delete prefix