From cac25a869f335fff90bd9a64f81cff43c3a5cf08 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 4 Dec 2024 13:48:28 +0000 Subject: [PATCH 1/6] ref: Upgrade Node to v22.12 --- Dockerfile | 2 +- package.json | 8 +-- yarn.lock | 168 ++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 165 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 408fbae9..c7755b40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-bookworm-slim as builder +FROM node:22-bookworm-slim as builder WORKDIR /usr/local/lib diff --git a/package.json b/package.json index 30388dc4..050abbb8 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@types/jest": "^29.5.2", "@types/js-yaml": "^4.0.5", "@types/mkdirp": "^1.0.0", - "@types/node": "^12.11.1", + "@types/node": "^22.10.1", "@types/node-fetch": "^2.5.10", "@types/ora": "^1.3.4", "@types/prompts": "^2.0.11", @@ -55,7 +55,7 @@ "chalk": "4.1.1", "cli-table": "0.3.1", "consola": "2.15.3", - "esbuild": "^0.11.6", + "esbuild": "^0.24.0", "eslint": "^7.2.0", "eslint-config-prettier": "^6.11.0", "eslint-formatter-github-annotations": "^0.1.0", @@ -89,7 +89,7 @@ "scripts": { "build:fat": "yarn run compile-config-schema && tsc -p tsconfig.build.json", "build:watch": "yarn run compile-config-schema && tsc -p tsconfig.build.json --watch", - "build": "yarn compile-config-schema && esbuild src/index.ts --sourcemap --bundle --platform=node --target=node14.17 --outfile=dist/craft --minify", + "build": "yarn compile-config-schema && esbuild src/index.ts --sourcemap --bundle --platform=node --target=node22.12 --outfile=dist/craft --minify", "precli": "yarn build", "cli": "node -r source-map-support/register dist/craft", "clean": "rimraf dist coverage", @@ -100,7 +100,7 @@ "compile-config-schema": "node ./scripts/config-json-schema-to-ts.js" }, "volta": { - "node": "20.11.1", + "node": "22.12.0", "yarn": "1.22.19" } } diff --git a/yarn.lock b/yarn.lock index 6a6634e3..6b67f010 100644 --- a/yarn.lock +++ b/yarn.lock @@ -857,6 +857,126 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@esbuild/aix-ppc64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz#b57697945b50e99007b4c2521507dc613d4a648c" + integrity sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw== + +"@esbuild/android-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz#1add7e0af67acefd556e407f8497e81fddad79c0" + integrity sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w== + +"@esbuild/android-arm@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.0.tgz#ab7263045fa8e090833a8e3c393b60d59a789810" + integrity sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew== + +"@esbuild/android-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.0.tgz#e8f8b196cfdfdd5aeaebbdb0110983460440e705" + integrity sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ== + +"@esbuild/darwin-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz#2d0d9414f2acbffd2d86e98253914fca603a53dd" + integrity sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw== + +"@esbuild/darwin-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz#33087aab31a1eb64c89daf3d2cf8ce1775656107" + integrity sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA== + +"@esbuild/freebsd-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz#bb76e5ea9e97fa3c753472f19421075d3a33e8a7" + integrity sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA== + +"@esbuild/freebsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz#e0e2ce9249fdf6ee29e5dc3d420c7007fa579b93" + integrity sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ== + +"@esbuild/linux-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz#d1b2aa58085f73ecf45533c07c82d81235388e75" + integrity sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g== + +"@esbuild/linux-arm@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz#8e4915df8ea3e12b690a057e77a47b1d5935ef6d" + integrity sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw== + +"@esbuild/linux-ia32@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz#8200b1110666c39ab316572324b7af63d82013fb" + integrity sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA== + +"@esbuild/linux-loong64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz#6ff0c99cf647504df321d0640f0d32e557da745c" + integrity sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g== + +"@esbuild/linux-mips64el@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz#3f720ccd4d59bfeb4c2ce276a46b77ad380fa1f3" + integrity sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA== + +"@esbuild/linux-ppc64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz#9d6b188b15c25afd2e213474bf5f31e42e3aa09e" + integrity sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ== + +"@esbuild/linux-riscv64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz#f989fdc9752dfda286c9cd87c46248e4dfecbc25" + integrity sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw== + +"@esbuild/linux-s390x@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz#29ebf87e4132ea659c1489fce63cd8509d1c7319" + integrity sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g== + +"@esbuild/linux-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz#4af48c5c0479569b1f359ffbce22d15f261c0cef" + integrity sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA== + +"@esbuild/netbsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz#1ae73d23cc044a0ebd4f198334416fb26c31366c" + integrity sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg== + +"@esbuild/openbsd-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz#5d904a4f5158c89859fd902c427f96d6a9e632e2" + integrity sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg== + +"@esbuild/openbsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz#4c8aa88c49187c601bae2971e71c6dc5e0ad1cdf" + integrity sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q== + +"@esbuild/sunos-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz#8ddc35a0ea38575fa44eda30a5ee01ae2fa54dd4" + integrity sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA== + +"@esbuild/win32-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz#6e79c8543f282c4539db684a207ae0e174a9007b" + integrity sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA== + +"@esbuild/win32-ia32@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz#057af345da256b7192d18b676a02e95d0fa39103" + integrity sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw== + +"@esbuild/win32-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz#168ab1c7e1c318b922637fad8f339d48b01e1244" + integrity sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA== + "@eslint/eslintrc@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" @@ -1644,10 +1764,12 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.50.tgz#7a20902af591282aa9176baefc37d4372131c32d" integrity sha512-vwX+/ija9xKc/z9VqMCdbf4WYcMTGsI0I/L/6shIF3qXURxZOhPQlPRHtjTpiNhAwn0paMJzlOQqw6mAGEQnTA== -"@types/node@^12.11.1": - version "12.19.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.13.tgz#888e2b34159fb91496589484ec169618212b51b7" - integrity sha512-qdixo2f0U7z6m0UJUugTJqVF94GNDkdgQhfBtMs8t5898JE7G/D2kJYw4rc1nzjIPLVAsDkY2MdABnLAP5lM1w== +"@types/node@^22.10.1": + version "22.10.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766" + integrity sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ== + dependencies: + undici-types "~6.20.0" "@types/ora@^1.3.4": version "1.3.5" @@ -2542,10 +2664,35 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild@^0.11.6: - version "0.11.6" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.11.6.tgz#20961309c4cfed00b71027e18806150358d0cbb0" - integrity sha512-L+nKW9ftVS/N2CVJMR9YmXHbkm+vHzlNYuo09rzipQhF7dYNvRLfWoEPSDRTl10and4owFBV9rJ2CTFNtLIOiw== +esbuild@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.24.0.tgz#f2d470596885fcb2e91c21eb3da3b3c89c0b55e7" + integrity sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ== + optionalDependencies: + "@esbuild/aix-ppc64" "0.24.0" + "@esbuild/android-arm" "0.24.0" + "@esbuild/android-arm64" "0.24.0" + "@esbuild/android-x64" "0.24.0" + "@esbuild/darwin-arm64" "0.24.0" + "@esbuild/darwin-x64" "0.24.0" + "@esbuild/freebsd-arm64" "0.24.0" + "@esbuild/freebsd-x64" "0.24.0" + "@esbuild/linux-arm" "0.24.0" + "@esbuild/linux-arm64" "0.24.0" + "@esbuild/linux-ia32" "0.24.0" + "@esbuild/linux-loong64" "0.24.0" + "@esbuild/linux-mips64el" "0.24.0" + "@esbuild/linux-ppc64" "0.24.0" + "@esbuild/linux-riscv64" "0.24.0" + "@esbuild/linux-s390x" "0.24.0" + "@esbuild/linux-x64" "0.24.0" + "@esbuild/netbsd-x64" "0.24.0" + "@esbuild/openbsd-arm64" "0.24.0" + "@esbuild/openbsd-x64" "0.24.0" + "@esbuild/sunos-x64" "0.24.0" + "@esbuild/win32-arm64" "0.24.0" + "@esbuild/win32-ia32" "0.24.0" + "@esbuild/win32-x64" "0.24.0" escalade@^3.1.1: version "3.1.1" @@ -5037,6 +5184,11 @@ typescript@^5.1.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" From db7230bb6a38638ab85fa17cb7b23eb2d20afd86 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 4 Dec 2024 13:52:21 +0000 Subject: [PATCH 2/6] one more place --- .github/workflows/build.yml | 2 +- Dockerfile | 42 ++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30ceded4..1946077d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['20'] + node: ['22'] name: Node ${{ matrix.node }} steps: - uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index c7755b40..340997fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,12 +10,12 @@ RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \ COPY . . RUN \ - NODE_ENV=production \ + NODE_ENV=production \ NODE_PATH=/usr/local/lib/node_modules \ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/lib/node_modules/.bin" \ yarn --modules-folder /usr/local/lib/node_modules build -FROM node:20-bookworm +FROM node:22-bookworm ENV DEBIAN_FRONTEND=noninteractive \ DOTNET_CLI_TELEMETRY_OPTOUT=1 \ @@ -27,19 +27,19 @@ ENV DEBIAN_FRONTEND=noninteractive \ RUN apt-get -qq update \ && apt-get install -y --no-install-recommends \ - apt-transport-https \ - build-essential \ - curl \ - default-jdk-headless \ - dirmngr \ - gnupg \ - git \ - python3-packaging \ - python3-venv \ - ruby-full \ - jq \ - unzip \ - maven \ + apt-transport-https \ + build-essential \ + curl \ + default-jdk-headless \ + dirmngr \ + gnupg \ + git \ + python3-packaging \ + python3-venv \ + ruby-full \ + jq \ + unzip \ + maven \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -58,12 +58,12 @@ RUN : \ && echo 'deb https://packages.erlang-solutions.com/debian bullseye contrib' >> /etc/apt/sources.list \ && apt-get update -qq \ && apt-get install -y --no-install-recommends \ - dotnet-sdk-9.0 \ - dotnet-sdk-8.0 \ - docker-ce-cli \ - docker-buildx-plugin \ - erlang \ - elixir \ + dotnet-sdk-9.0 \ + dotnet-sdk-8.0 \ + docker-ce-cli \ + docker-buildx-plugin \ + erlang \ + elixir \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y \ From 084f953162bf5efbe82381a60214731c34a811b8 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 4 Dec 2024 13:58:41 +0000 Subject: [PATCH 3/6] fix type error --- src/utils/system.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/system.ts b/src/utils/system.ts index 7fd190f8..ca28ec74 100644 --- a/src/utils/system.ts +++ b/src/utils/system.ts @@ -214,7 +214,7 @@ export async function calculateChecksum( const hash = createHash(algorithm); return new Promise((resolve, reject) => { - stream.on('data', data => hash.update(data, 'utf8')); + stream.on('data', data => hash.update(data)); stream.on('end', () => resolve(formatDigest(hash, format))); stream.on('error', reject); }); From 76359dd3d1a3d0e7f104267b251cc0d565f15aac Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 4 Dec 2024 14:14:58 +0000 Subject: [PATCH 4/6] lol --- src/targets/sentryPypi.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/targets/sentryPypi.ts b/src/targets/sentryPypi.ts index 740ceaf6..dd0bafda 100644 --- a/src/targets/sentryPypi.ts +++ b/src/targets/sentryPypi.ts @@ -89,20 +89,24 @@ export class SentryPypiTarget extends BaseTarget { ); const contents = fs.readFileSync(path.join(directory, 'packages.ini'), { - encoding: 'UTF-8', + encoding: 'utf-8', }); const tree = ((await spawnProcess( 'git', ['-C', directory, 'rev-parse', 'HEAD:'], {}, { enableInDryRunMode: true } - )) as Buffer).toString('UTF-8').trim(); + )) as Buffer) + .toString('utf-8') + .trim(); const commit = ((await spawnProcess( 'git', ['-C', directory, 'rev-parse', 'HEAD'], {}, { enableInDryRunMode: true } - )) as Buffer).toString('UTF-8').trim(); + )) as Buffer) + .toString('utf-8') + .trim(); return [contents, tree, commit]; }); From 09a025c5cf9f051c9e94c80f87dcb9ff2bb05ebd Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 4 Dec 2024 14:20:47 +0000 Subject: [PATCH 5/6] still build and test for node20 --- .github/workflows/build.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1946077d..a472ea63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['22'] + node: ['20','22'] name: Node ${{ matrix.node }} steps: - uses: actions/checkout@v3 diff --git a/package.json b/package.json index 050abbb8..d0c2521e 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "scripts": { "build:fat": "yarn run compile-config-schema && tsc -p tsconfig.build.json", "build:watch": "yarn run compile-config-schema && tsc -p tsconfig.build.json --watch", - "build": "yarn compile-config-schema && esbuild src/index.ts --sourcemap --bundle --platform=node --target=node22.12 --outfile=dist/craft --minify", + "build": "yarn compile-config-schema && esbuild src/index.ts --sourcemap --bundle --platform=node --target=node20 --outfile=dist/craft --minify", "precli": "yarn build", "cli": "node -r source-map-support/register dist/craft", "clean": "rimraf dist coverage", From fa0b0038614fa3ed9534cf102a4768b5741a9415 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 4 Dec 2024 17:50:42 +0000 Subject: [PATCH 6/6] revert formatting changes --- Dockerfile | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8b2c6434..13d0b2bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,19 +27,19 @@ ENV DEBIAN_FRONTEND=noninteractive \ RUN apt-get -qq update \ && apt-get install -y --no-install-recommends \ - apt-transport-https \ - build-essential \ - curl \ - default-jdk-headless \ - dirmngr \ - gnupg \ - git \ - python3-packaging \ - python3-venv \ - ruby-full \ - jq \ - unzip \ - maven \ + apt-transport-https \ + build-essential \ + curl \ + default-jdk-headless \ + dirmngr \ + gnupg \ + git \ + python3-packaging \ + python3-venv \ + ruby-full \ + jq \ + unzip \ + maven \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -61,12 +61,12 @@ RUN : \ && echo "deb https://binaries2.erlang-solutions.com/debian bullseye-elixir-1.15 contrib" >> /etc/apt/sources.list \ && apt-get update -qq \ && apt-get install -y --no-install-recommends \ - dotnet-sdk-9.0 \ - dotnet-sdk-8.0 \ - docker-ce-cli \ - docker-buildx-plugin \ - erlang \ - elixir \ + dotnet-sdk-9.0 \ + dotnet-sdk-8.0 \ + docker-ce-cli \ + docker-buildx-plugin \ + erlang \ + elixir \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y \