Skip to content

Commit 8971064

Browse files
feat: TypeScript 5.7 (#27857)
Co-authored-by: Kenta Moriuchi <[email protected]>
1 parent 8d82418 commit 8971064

File tree

255 files changed

+7930
-22248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+7930
-22248
lines changed

Cargo.lock

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

cli/build.rs

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ mod ts {
133133
// Deno built-in type libraries
134134
"decorators",
135135
"decorators.legacy",
136-
"es5",
136+
"dom.asynciterable",
137+
"dom",
138+
"dom.extras",
139+
"dom.iterable",
137140
"es2015.collection",
138141
"es2015.core",
139142
"es2015",
@@ -145,10 +148,13 @@ mod ts {
145148
"es2015.symbol",
146149
"es2015.symbol.wellknown",
147150
"es2016.array.include",
148-
"es2016.intl",
149151
"es2016",
152+
"es2016.full",
153+
"es2016.intl",
154+
"es2017.arraybuffer",
150155
"es2017",
151156
"es2017.date",
157+
"es2017.full",
152158
"es2017.intl",
153159
"es2017.object",
154160
"es2017.sharedmemory",
@@ -157,52 +163,70 @@ mod ts {
157163
"es2018.asyncgenerator",
158164
"es2018.asynciterable",
159165
"es2018",
166+
"es2018.full",
160167
"es2018.intl",
161168
"es2018.promise",
162169
"es2018.regexp",
163170
"es2019.array",
164171
"es2019",
172+
"es2019.full",
165173
"es2019.intl",
166174
"es2019.object",
167175
"es2019.string",
168176
"es2019.symbol",
169177
"es2020.bigint",
170178
"es2020",
171179
"es2020.date",
180+
"es2020.full",
172181
"es2020.intl",
173182
"es2020.number",
174183
"es2020.promise",
175184
"es2020.sharedmemory",
176185
"es2020.string",
177186
"es2020.symbol.wellknown",
178187
"es2021",
188+
"es2021.full",
179189
"es2021.intl",
180190
"es2021.promise",
181191
"es2021.string",
182192
"es2021.weakref",
183-
"es2022",
184193
"es2022.array",
194+
"es2022",
185195
"es2022.error",
196+
"es2022.full",
186197
"es2022.intl",
187198
"es2022.object",
188199
"es2022.regexp",
189-
"es2022.sharedmemory",
190200
"es2022.string",
191-
"es2023",
192201
"es2023.array",
193202
"es2023.collection",
203+
"es2023",
204+
"es2023.full",
194205
"es2023.intl",
195-
"esnext",
206+
"es2024.arraybuffer",
207+
"es2024.collection",
208+
"es2024",
209+
"es2024.full",
210+
"es2024.object",
211+
"es2024.promise",
212+
"es2024.regexp",
213+
"es2024.sharedmemory",
214+
"es2024.string",
215+
"es5",
216+
"es6",
196217
"esnext.array",
197218
"esnext.collection",
219+
"esnext",
198220
"esnext.decorators",
199221
"esnext.disposable",
222+
"esnext.full",
200223
"esnext.intl",
201224
"esnext.iterator",
202-
"esnext.object",
203-
"esnext.promise",
204-
"esnext.regexp",
205-
"esnext.string",
225+
"scripthost",
226+
"webworker.asynciterable",
227+
"webworker",
228+
"webworker.importscripts",
229+
"webworker.iterable",
206230
];
207231

208232
let path_dts = cwd.join("tsc/dts");

cli/lib/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub fn otel_runtime_config() -> OtelRuntimeConfig {
1414
}
1515

1616
const GIT_COMMIT_HASH: &str = env!("GIT_COMMIT_HASH");
17-
const TYPESCRIPT: &str = "5.6.2";
17+
const TYPESCRIPT: &str = "5.7.3";
1818
const DENO_VERSION: &str = env!("DENO_VERSION");
1919
// TODO(bartlomieju): ideally we could remove this const.
2020
const IS_CANARY: bool = option_env!("DENO_CANARY").is_some();

cli/lsp/tsc.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6015,11 +6015,25 @@ mod tests {
60156015

60166016
// get some notification when the size of the assets grows
60176017
let mut total_size = 0;
6018-
for asset in assets {
6018+
for asset in &assets {
60196019
total_size += asset.text().len();
60206020
}
60216021
assert!(total_size > 0);
6022-
assert!(total_size < 2_000_000); // currently as of TS 4.6, it's 0.7MB
6022+
#[allow(clippy::print_stderr)]
6023+
// currently as of TS 5.7, it's 3MB
6024+
if total_size > 3_500_000 {
6025+
let mut sizes = Vec::new();
6026+
for asset in &assets {
6027+
sizes.push((asset.specifier(), asset.text().len()));
6028+
}
6029+
sizes.sort_by_cached_key(|(_, size)| *size);
6030+
sizes.reverse();
6031+
for (specifier, size) in &sizes {
6032+
eprintln!("{}: {}", specifier, size);
6033+
}
6034+
eprintln!("Total size: {}", total_size);
6035+
panic!("Assets were quite large.");
6036+
}
60236037
}
60246038

60256039
#[tokio::test]

cli/npm/installer/resolution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fn get_add_pkg_reqs_options(package_reqs: &[PackageReq]) -> AddPkgReqsOptions {
189189
// WARNING: When bumping this version, check if anything needs to be
190190
// updated in the `setNodeOnlyGlobalNames` call in 99_main_compiler.js
191191
types_node_version_req: Some(
192-
VersionReq::parse_from_npm("22.0.0 - 22.5.4").unwrap(),
192+
VersionReq::parse_from_npm("22.9.0 - 22.12.0").unwrap(),
193193
),
194194
}
195195
}

cli/snapshot/shared.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Copyright 2018-2025 the Deno authors. MIT license.
22

3-
pub static TS_VERSION: &str = "5.6.2";
3+
pub static TS_VERSION: &str = "5.7.3";

0 commit comments

Comments
 (0)