Skip to content

Commit 5c88d93

Browse files
authored
chore: update to node 20.19.4 (#19188)
1 parent a2fc261 commit 5c88d93

File tree

7 files changed

+42
-26
lines changed

7 files changed

+42
-26
lines changed

.github/actions/setup-node/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
- name: Setup Node
1717
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
1818
with:
19-
node-version: 20.16.0
19+
node-version: 20.19.4
2020
# See https://github.com/actions/setup-node#caching-global-packages-data
2121
cache: "pnpm"
2222
cache-dependency-path: ${{ inputs.directory }}/pnpm-lock.yaml

dogfood/coder/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM rust:slim@sha256:3f391b0678a6e0c88fd26f13e399c9c515ac47354e3cadfee7daee3b21
44
ENV CARGO_INSTALL_ROOT=/tmp/
55
# Use more reliable mirrors for Debian packages
66
RUN sed -i 's|http://deb.debian.org/debian|http://mirrors.edge.kernel.org/debian|g' /etc/apt/sources.list && \
7-
apt-get update || true
7+
apt-get update || true
88
RUN apt-get update && apt-get install -y libssl-dev openssl pkg-config build-essential
99
RUN cargo install jj-cli typos-cli watchexec-cli
1010

@@ -126,8 +126,8 @@ RUN mkdir -p /etc/sudoers.d && \
126126

127127
# Use more reliable mirrors for Ubuntu packages
128128
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/ubuntu/|g' /etc/apt/sources.list && \
129-
sed -i 's|http://security.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/ubuntu/|g' /etc/apt/sources.list && \
130-
apt-get update --quiet && apt-get install --yes \
129+
sed -i 's|http://security.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/ubuntu/|g' /etc/apt/sources.list && \
130+
apt-get update --quiet && apt-get install --yes \
131131
ansible \
132132
apt-transport-https \
133133
apt-utils \
@@ -245,7 +245,7 @@ RUN DOCTL_VERSION=$(curl -s "https://api.github.com/repos/digitalocean/doctl/rel
245245
ARG NVM_INSTALL_SHA=bdea8c52186c4dd12657e77e7515509cda5bf9fa5a2f0046bce749e62645076d
246246
# Install frontend utilities
247247
ENV NVM_DIR=/usr/local/nvm
248-
ENV NODE_VERSION=20.16.0
248+
ENV NODE_VERSION=20.19.4
249249
RUN mkdir -p $NVM_DIR
250250
RUN curl -o nvm_install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh && \
251251
echo "${NVM_INSTALL_SHA} nvm_install.sh" | sha256sum -c && \
@@ -256,8 +256,8 @@ RUN source $NVM_DIR/nvm.sh && \
256256
nvm use $NODE_VERSION
257257
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
258258
RUN corepack enable && \
259-
corepack prepare npm@10.8.1 --activate && \
260-
corepack prepare pnpm@9.15.1 --activate
259+
corepack prepare npm@10.8.1 --activate && \
260+
corepack prepare pnpm@9.15.1 --activate
261261

262262
RUN pnpx playwright@1.47.0 install --with-deps chromium
263263

site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"semver": "7.6.2",
115115
"tailwind-merge": "2.6.0",
116116
"tailwindcss-animate": "1.0.7",
117-
"tzdata": "1.0.40",
117+
"tzdata": "1.0.44",
118118
"ua-parser-js": "1.0.40",
119119
"ufuzzy": "npm:@leeoniya/ufuzzy@1.0.10",
120120
"undici": "6.21.2",

site/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/pages/WorkspaceSettingsPage/WorkspaceSchedulePage/WorkspaceScheduleForm.test.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ describe("validationSchema", () => {
7171
saturday: false,
7272
};
7373
const validate = () => validationSchema.validateSync(values);
74-
expect(validate).toThrowError(Language.errorNoDayOfWeek);
74+
expect(validate).toThrow(Language.errorNoDayOfWeek);
7575
});
7676

7777
it("disallows empty startTime when autostart is enabled", () => {
@@ -87,7 +87,7 @@ describe("validationSchema", () => {
8787
startTime: "",
8888
};
8989
const validate = () => validationSchema.validateSync(values);
90-
expect(validate).toThrowError(Language.errorNoTime);
90+
expect(validate).toThrow(Language.errorNoTime);
9191
});
9292

9393
it("allows startTime 16:20", () => {
@@ -105,7 +105,7 @@ describe("validationSchema", () => {
105105
startTime: "9:30",
106106
};
107107
const validate = () => validationSchema.validateSync(values);
108-
expect(validate).toThrowError(Language.errorTime);
108+
expect(validate).toThrow(Language.errorTime);
109109
});
110110

111111
it("disallows startTime to be HH:m", () => {
@@ -114,7 +114,7 @@ describe("validationSchema", () => {
114114
startTime: "09:5",
115115
};
116116
const validate = () => validationSchema.validateSync(values);
117-
expect(validate).toThrowError(Language.errorTime);
117+
expect(validate).toThrow(Language.errorTime);
118118
});
119119

120120
it("disallows an invalid startTime 24:01", () => {
@@ -123,7 +123,7 @@ describe("validationSchema", () => {
123123
startTime: "24:01",
124124
};
125125
const validate = () => validationSchema.validateSync(values);
126-
expect(validate).toThrowError(Language.errorTime);
126+
expect(validate).toThrow(Language.errorTime);
127127
});
128128

129129
it("disallows an invalid startTime 09:60", () => {
@@ -132,7 +132,7 @@ describe("validationSchema", () => {
132132
startTime: "09:60",
133133
};
134134
const validate = () => validationSchema.validateSync(values);
135-
expect(validate).toThrowError(Language.errorTime);
135+
expect(validate).toThrow(Language.errorTime);
136136
});
137137

138138
it("disallows an invalid timezone Canada/North", () => {
@@ -141,7 +141,7 @@ describe("validationSchema", () => {
141141
timezone: "Canada/North",
142142
};
143143
const validate = () => validationSchema.validateSync(values);
144-
expect(validate).toThrowError(Language.errorTimezone);
144+
expect(validate).toThrow(Language.errorTimezone);
145145
});
146146

147147
it.each<[string]>(timeZones.map((zone) => [zone]))(
@@ -162,7 +162,7 @@ describe("validationSchema", () => {
162162
ttl: 24 * 7,
163163
};
164164
const validate = () => validationSchema.validateSync(values);
165-
expect(validate).not.toThrowError();
165+
expect(validate).not.toThrow();
166166
});
167167

168168
it("allows a ttl of 30 days", () => {
@@ -171,7 +171,7 @@ describe("validationSchema", () => {
171171
ttl: 24 * 30,
172172
};
173173
const validate = () => validationSchema.validateSync(values);
174-
expect(validate).not.toThrowError();
174+
expect(validate).not.toThrow();
175175
});
176176

177177
it("disallows a ttl of 30 days + 1 hour", () => {
@@ -180,7 +180,7 @@ describe("validationSchema", () => {
180180
ttl: 24 * 30 + 1,
181181
};
182182
const validate = () => validationSchema.validateSync(values);
183-
expect(validate).toThrowError(Language.errorTtlMax);
183+
expect(validate).toThrow(Language.errorTtlMax);
184184
});
185185

186186
it("allows a ttl of 1.2 hours", () => {
@@ -189,7 +189,7 @@ describe("validationSchema", () => {
189189
ttl: 1.2,
190190
};
191191
const validate = () => validationSchema.validateSync(values);
192-
expect(validate).not.toThrowError();
192+
expect(validate).not.toThrow();
193193
});
194194
});
195195

site/src/pages/WorkspaceSettingsPage/WorkspaceSchedulePage/WorkspaceScheduleForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const validationSchema = Yup.object({
158158
try {
159159
dayjs.tz(dayjs(), value);
160160
return true;
161-
} catch (e) {
161+
} catch {
162162
return false;
163163
}
164164
}),

site/src/utils/timeZones.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
/**
2+
* Ideally the version of tzdata should correspond to the version of the
3+
* timezone database used by the version of Node we're running our tests
4+
* against. For example, Node v20.19.4 and tzdata@1.0.44 both correspond to
5+
* version 2025b of the ICU timezone:
6+
* https://github.com/nodejs/node/blob/v20.19.4/test/fixtures/tz-version.txt
7+
* https://github.com/rogierschouten/tzdata-generate/releases/tag/v1.0.44
8+
*
9+
* For some reason though, the timezones allowed by `Intl.DateTimeFormat` in
10+
* Node diverged slightly from the timezones present in the tzdata package,
11+
* despite being derived from the same data. Notably, the timezones that we
12+
* filter out below are not allowed by Node as of v20.18.1 and onward–which is
13+
* the version that updated the 20 release line from 2024a to 2024b.
14+
*/
115
import tzData from "tzdata";
216

3-
export const timeZones = Object.keys(tzData.zones).sort();
17+
export const timeZones = Object.keys(tzData.zones)
18+
.filter((it) => it !== "Factory" && it !== "null")
19+
.sort();
420

521
export const getPreferredTimezone = () =>
622
Intl.DateTimeFormat().resolvedOptions().timeZone;

0 commit comments

Comments
 (0)