mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
Pin Node v24.22.0 (commit f14cd3aa7bf9, Undici 7.29.1, OpenSSL 3.5.8) in .node-version, Dockerfile.sandbox, the docs matrix fallback, the compatibility pin, the fetch profile, and process.version. A node-pin test checks that these pins agree. The Node compatibility snapshot is regenerated from the v24.22.0 API docs; the new stream_iter chapter maps to node:stream/iter, and the SuiteContext rows no longer match the TestContext evidence. Runtime and compiler changes follow Node 24.22 behavior: - fs.read, fs.readSync, and FileHandle.read validate the position before the zero-length return. - fs.statfs results include frsize; Windows reads FileFsFullSizeInformation and reports bfree and bavail separately. - fs.utimes, futimes, and lutimes keep nanosecond precision. - ServerResponse sets writableFinished where 'finish' is emitted and runs end() callbacks before the 'finish' listeners while the socket is still attached; a request read to 'end' closes before its response. - socket.write(string, 'buffer') throws ERR_UNKNOWN_ENCODING. - URL protocol-setter rejections keep the current URL, the host setter no longer leaves a "/." escape when it adds a port to a "//" path, and new URLSearchParams(null) parses "null". - util.stripVTControlCharacters uses Node 24.22's ANSI pattern, util.styleText accepts #RGB and #RRGGBB colors, and util.types.isDataView has its JS name and length. - structuredClone and AbortSignal.any use the "cannot be converted to sequence" message. - crypto.getCiphers, getHashes, and constants match Node 24.22. - dns.lookup, net.connect, and tls.connect throw ERR_INVALID_ARG_VALUE for hosts with null bytes. - fs.readFile validates options.buffer and refuses its valid forms; httpValidation and certificateCompression refuse by name. - url.domainToASCII, url.domainToUnicode, and url.parse hostnames follow ada 4.0: ASCII domains are lowercased without checking their xn-- labels, the RFC 5893 rule checks how LTR labels end and how RTL labels start, a Punycode label whose decoded form begins with "xn--" fails, and ToUnicode decodes only labels that pass the ToASCII checks. The url legacy test cases are regenerated with Node 24.22. Corpus programs 5275-5279 cover the new behavior. 1640, 2283, 2599, and 3136 are updated where they pinned Node 24.15 output.
65 lines
2.3 KiB
Docker
65 lines
2.3 KiB
Docker
ARG NODE_VERSION=24.22.0
|
|
FROM ubuntu:24.04
|
|
|
|
ARG NODE_VERSION
|
|
ARG PNPM_VERSION=11.1.3
|
|
ARG ZIG_VERSION=0.16.0
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install --yes --no-install-recommends \
|
|
ca-certificates curl gnupg \
|
|
&& curl --fail --silent --show-error --location https://apt.llvm.org/llvm-snapshot.gpg.key \
|
|
| gpg --dearmor --output /usr/share/keyrings/llvm-snapshot.gpg \
|
|
&& echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-22 main" \
|
|
> /etc/apt/sources.list.d/llvm22.list \
|
|
&& apt-get update \
|
|
&& apt-get install --yes --no-install-recommends \
|
|
build-essential \
|
|
ca-certificates \
|
|
ccache \
|
|
clang-22 \
|
|
cmake \
|
|
curl \
|
|
git \
|
|
libclang-rt-22-dev \
|
|
libpolly-22-dev \
|
|
libzstd-dev \
|
|
llvm-22-dev \
|
|
ninja-build \
|
|
xz-utils \
|
|
zlib1g-dev \
|
|
&& ln -sf clang-22 /usr/bin/clang \
|
|
&& ln -sf clang++-22 /usr/bin/clang++ \
|
|
&& test "$(llvm-config-22 --version)" = 22.1.8 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl --fail --silent --show-error --location \
|
|
--output /tmp/node.tar.xz \
|
|
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
|
|
&& curl --fail --silent --show-error --location \
|
|
--output /tmp/SHASUMS256.txt \
|
|
"https://nodejs.org/dist/v${NODE_VERSION}/SHASUMS256.txt" \
|
|
&& grep " node-v${NODE_VERSION}-linux-x64.tar.xz$" /tmp/SHASUMS256.txt \
|
|
| sed 's#node-v[^ ]*-linux-x64.tar.xz#/tmp/node.tar.xz#' \
|
|
| sha256sum --check --strict - \
|
|
&& tar -xJf /tmp/node.tar.xz --directory /usr/local --strip-components=1 \
|
|
&& rm /tmp/node.tar.xz /tmp/SHASUMS256.txt
|
|
|
|
COPY scripts/install-zig.sh /tmp/install-zig.sh
|
|
RUN sh /tmp/install-zig.sh "$ZIG_VERSION" \
|
|
&& rm /tmp/install-zig.sh
|
|
|
|
RUN npm install --global "pnpm@${PNPM_VERSION}"
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
COPY packages/cli/package.json packages/cli/package.json
|
|
COPY packages/compiler/package.json packages/compiler/package.json
|
|
COPY packages/runtime/package.json packages/runtime/package.json
|
|
|
|
RUN pnpm install --frozen-lockfile \
|
|
&& chmod -R a+rwX /workspace
|