Skip to content

Commit 3eaa2fb

Browse files
authored
chore: bump dprint-plugin-typescript to 0.96.0, remove deno-fmt-ignore-file (#33839)
## Summary - Bumps dprint-plugin-typescript from 0.95.15 to 0.96.0 - Enables the new `functionExpression.flatIife` option - Removes all `// deno-fmt-ignore-file` directives from IIFE-wrapped lazy-loaded scripts ### Background During the lazy-loaded script conversions (ext/ IIFE rewrites), we had to add `// deno-fmt-ignore-file` to every converted file because dprint would indent the entire IIFE body by 2 spaces, producing massive diffs. dprint-plugin-typescript 0.96.0 (released today) adds the `functionExpression.flatIife` option (dprint/dprint-plugin-typescript#781) which tells the formatter to not indent the body of `(function () { ... })()` patterns. This lets us remove all the ignore directives while keeping the flat indentation style.
1 parent 1b8b26d commit 3eaa2fb

81 files changed

Lines changed: 255 additions & 266 deletions

Some content is hidden

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

.dprint.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"typescript": {
3-
"deno": true
3+
"deno": true,
4+
"functionExpression.flatIife": true
45
},
56
"markdown": {
67
"deno": true
@@ -85,7 +86,7 @@
8586
"tests/specs/run/error_syntax_empty_trailing_line/error_syntax_empty_trailing_line.mjs"
8687
],
8788
"plugins": [
88-
"https://plugins.dprint.dev/typescript-0.95.15.wasm",
89+
"https://plugins.dprint.dev/typescript-0.96.0.wasm",
8990
"https://plugins.dprint.dev/json-0.21.3.wasm",
9091
"https://plugins.dprint.dev/markdown-0.21.1.wasm",
9192
"https://plugins.dprint.dev/toml-0.7.0.wasm",

ext/cache/01_cache.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, primordials } = globalThis.__bootstrap;
@@ -340,6 +339,5 @@ function cacheStorage() {
340339
return cacheStorageStorage;
341340
}
342341

343-
344342
return { Cache, CacheStorage, cacheStorage };
345-
})()
343+
})();

ext/canvas/02_surface.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core } = globalThis.__bootstrap;
65
const { UnsafeWindowSurface } = core.ops;
76
return { UnsafeWindowSurface };
8-
})()
7+
})();

ext/cron/01_cron.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, internals, primordials } = globalThis.__bootstrap;
@@ -174,7 +173,9 @@ function cron(
174173
if (otelState.TRACING_ENABLED) {
175174
let activeContext = ContextManager.active();
176175
if (r.traceparent) {
177-
for (const propagator of new SafeArrayIterator(otelState.PROPAGATORS)) {
176+
for (
177+
const propagator of new SafeArrayIterator(otelState.PROPAGATORS)
178+
) {
178179
activeContext = propagator.extract(activeContext, {}, {
179180
get(_carrier, key) {
180181
if (key === "traceparent") return r.traceparent;
@@ -227,4 +228,4 @@ internals.formatToCronSchedule = formatToCronSchedule;
227228
internals.parseScheduleToString = parseScheduleToString;
228229

229230
return { cron, formatToCronSchedule, parseScheduleToString };
230-
})()
231+
})();

ext/crypto/00_crypto.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, primordials, internals } = globalThis.__bootstrap;
@@ -6122,4 +6121,4 @@ return {
61226121
importCryptoKeySync,
61236122
SubtleCrypto,
61246123
};
6125-
})()
6124+
})();

ext/fetch/20_headers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, primordials } = globalThis.__bootstrap;
@@ -533,4 +532,4 @@ return {
533532
headersEntries,
534533
headersFromHeaderList,
535534
};
536-
})()
535+
})();

ext/fetch/21_formdata.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, primordials } = globalThis.__bootstrap;
@@ -554,4 +553,4 @@ return {
554553
formDataToBlob,
555554
parseFormData,
556555
};
557-
})()
556+
})();

ext/fetch/22_body.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, primordials } = globalThis.__bootstrap;
@@ -573,4 +572,4 @@ webidl.converters["BodyInit_DOMString?"] = webidl.createNullableConverter(
573572
);
574573

575574
return { extractBody, InnerBody, mixinBody, packageData };
576-
})()
575+
})();

ext/fetch/22_http_client.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, primordials } = globalThis.__bootstrap;
@@ -126,4 +125,4 @@ class HttpClient {
126125
const HttpClientPrototype = HttpClient.prototype;
127126

128127
return { createHttpClient, HttpClient, HttpClientPrototype };
129-
})()
128+
})();

ext/fetch/23_request.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright 2018-2026 the Deno authors. MIT license.
2-
// deno-fmt-ignore-file
32

43
(function () {
54
const { core, internals, primordials } = globalThis.__bootstrap;
@@ -25,7 +24,9 @@ const { HTTP_TOKEN_CODE_POINT_RE } = core.loadExtScript(
2524
"ext:deno_web/00_infra.js",
2625
);
2726
const { URL } = core.loadExtScript("ext:deno_web/00_url.js");
28-
const { extractBody, mixinBody } = core.loadExtScript("ext:deno_fetch/22_body.js");
27+
const { extractBody, mixinBody } = core.loadExtScript(
28+
"ext:deno_fetch/22_body.js",
29+
);
2930
const { getLocationHref } = core.loadExtScript("ext:deno_web/12_location.js");
3031
const { extractMimeType } = core.loadExtScript("ext:deno_web/01_mimesniff.js");
3132
const { blobFromObjectUrl } = core.loadExtScript("ext:deno_web/09_file.js");
@@ -36,7 +37,9 @@ const {
3637
headerListFromHeaders,
3738
headersFromHeaderList,
3839
} = core.loadExtScript("ext:deno_fetch/20_headers.js");
39-
const { HttpClientPrototype } = core.loadExtScript("ext:deno_fetch/22_http_client.js");
40+
const { HttpClientPrototype } = core.loadExtScript(
41+
"ext:deno_fetch/22_http_client.js",
42+
);
4043
const {
4144
createDependentAbortSignal,
4245
newSignal,
@@ -640,4 +643,4 @@ return {
640643
RequestPrototype,
641644
toInnerRequest,
642645
};
643-
})()
646+
})();

0 commit comments

Comments
 (0)