diff --git a/typescript/0001-Remove-dprint.patch b/typescript/0001-Remove-dprint.patch new file mode 100644 index 000000000..25d059749 --- /dev/null +++ b/typescript/0001-Remove-dprint.patch @@ -0,0 +1,375 @@ +From 092e070498d33ec799b3f4bd40315c3803a452e3 Mon Sep 17 00:00:00 2001 +From: Eric Long +Date: Mon, 18 Nov 2024 11:35:05 +0800 +Subject: [PATCH 1/3] Remove dprint + +--- + Herebyfile.mjs | 4 +- + package-lock.json | 223 ----------------------------------------- + package.json | 5 +- + scripts/dtsBundler.mjs | 26 +---- + 4 files changed, 5 insertions(+), 253 deletions(-) + +diff --git a/Herebyfile.mjs b/Herebyfile.mjs +index 7939e5eafbd..bf1ac9693be 100644 +--- a/Herebyfile.mjs ++++ b/Herebyfile.mjs +@@ -556,13 +556,13 @@ export const lint = task({ + export const format = task({ + name: "format", + description: "Formats the codebase.", +- run: () => exec(process.execPath, ["node_modules/dprint/bin.js", "fmt"]), ++ run: () => {}, + }); + + export const checkFormat = task({ + name: "check-format", + description: "Checks that the codebase is formatted.", +- run: () => exec(process.execPath, ["node_modules/dprint/bin.js", "check"], { ignoreStdout: true }), ++ run: () => {}, + }); + + export const knip = task({ +diff --git a/package-lock.json b/package-lock.json +index 254a9502002..aced684a0b5 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -13,8 +13,6 @@ + "tsserver": "bin/tsserver" + }, + "devDependencies": { +- "@dprint/formatter": "^0.4.1", +- "@dprint/typescript": "0.91.6", + "@esfx/canceltoken": "^1.0.0", + "@eslint/js": "^9.9.0", + "@octokit/rest": "^21.0.1", +@@ -35,7 +33,6 @@ + "chalk": "^4.1.2", + "chokidar": "^3.6.0", + "diff": "^5.2.0", +- "dprint": "^0.47.2", + "esbuild": "^0.23.0", + "eslint": "^9.9.0", + "eslint-formatter-autolinkable-stylish": "^1.4.0", +@@ -69,122 +66,6 @@ + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, +- "node_modules/@dprint/darwin-arm64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.47.2.tgz", +- "integrity": "sha512-mVPFBJsXxGDKHHCAY8wbqOyS4028g1bN15H9tivCnPAjwaZhkUimZHXWejXADjhGn+Xm2SlakugY9PY/68pH3Q==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "darwin" +- ] +- }, +- "node_modules/@dprint/darwin-x64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.47.2.tgz", +- "integrity": "sha512-T7wzlc+rBV+6BRRiBjoqoy5Hj4TR2Nv2p2s9+ycyPGs10Kj/JXOWD8dnEHeBgUr2r4qe/ZdcxmsFQ5Hf2n0WuA==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "darwin" +- ] +- }, +- "node_modules/@dprint/formatter": { +- "version": "0.4.1", +- "resolved": "https://registry.npmjs.org/@dprint/formatter/-/formatter-0.4.1.tgz", +- "integrity": "sha512-IB/GXdlMOvi0UhQQ9mcY15Fxcrc2JPadmo6tqefCNV0bptFq7YBpggzpqYXldBXDa04CbKJ+rDwO2eNRPE2+/g==", +- "dev": true +- }, +- "node_modules/@dprint/linux-arm64-glibc": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.2.tgz", +- "integrity": "sha512-B0m1vT5LdVtrNOVdkqpLPrSxuCD+l5bTIgRzPaDoIB1ChWQkler9IlX8C+RStpujjPj6SYvwo5vTzjQSvRdQkA==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@dprint/linux-arm64-musl": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.2.tgz", +- "integrity": "sha512-zID6wZZqpg2/Q2Us+ERQkbhLwlW3p3xaeEr00MPf49bpydmEjMiPuSjWPkNv+slQSIyIsVovOxF4lbNZjsdtvw==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@dprint/linux-x64-glibc": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.2.tgz", +- "integrity": "sha512-rB3WXMdINnRd33DItIp7mObS7dzHW90ZzeJSsoKJLPp+Z7wXjjb27UUowfqVI4baa/1pd7sdbX54DPohMtfu/A==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@dprint/linux-x64-musl": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.2.tgz", +- "integrity": "sha512-E0+TNbzYdTXJ/jCVjUctVxkda/faw++aDQLfyWGcmdMJnbM7NZz+W4fUpDXzMPsjy+zTWxXcPK7/q2DZz2gnbg==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@dprint/typescript": { +- "version": "0.91.6", +- "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.6.tgz", +- "integrity": "sha512-rbgODMD0hsQJ6w32eMELqt+KnkzxVVLT4qRMcvlz8PsFwSPyIfBslpZcFhmJWdyurVKKNcUPNC6Aq9PcUIX13w==", +- "dev": true +- }, +- "node_modules/@dprint/win32-arm64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.47.2.tgz", +- "integrity": "sha512-K1EieTCFjfOCmyIhw9zFSduE6qVCNHEveupqZEfbSkVGw5T9MJQ1I9+n7MDb3RIDYEUk0enJ58/w82q8oDKCyA==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "win32" +- ] +- }, +- "node_modules/@dprint/win32-x64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.47.2.tgz", +- "integrity": "sha512-LhizWr8VrhHvq4ump8HwOERyFmdLiE8C6A42QSntGXzKdaa2nEOq20x/o56ZIiDcesiV+1TmosMKimPcOZHa+Q==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "optional": true, +- "os": [ +- "win32" +- ] +- }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", +@@ -2034,26 +1915,6 @@ + "node": ">=8" + } + }, +- "node_modules/dprint": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.2.tgz", +- "integrity": "sha512-geUcVIIrmLaY+YtuOl4gD7J/QCjsXZa5gUqre9sO6cgH0X/Fa9heBN3l/AWVII6rKPw45ATuCSDWz1pyO+HkPQ==", +- "dev": true, +- "hasInstallScript": true, +- "bin": { +- "dprint": "bin.js" +- }, +- "optionalDependencies": { +- "@dprint/darwin-arm64": "0.47.2", +- "@dprint/darwin-x64": "0.47.2", +- "@dprint/linux-arm64-glibc": "0.47.2", +- "@dprint/linux-arm64-musl": "0.47.2", +- "@dprint/linux-x64-glibc": "0.47.2", +- "@dprint/linux-x64-musl": "0.47.2", +- "@dprint/win32-arm64": "0.47.2", +- "@dprint/win32-x64": "0.47.2" +- } +- }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", +@@ -4855,74 +4716,6 @@ + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, +- "@dprint/darwin-arm64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.47.2.tgz", +- "integrity": "sha512-mVPFBJsXxGDKHHCAY8wbqOyS4028g1bN15H9tivCnPAjwaZhkUimZHXWejXADjhGn+Xm2SlakugY9PY/68pH3Q==", +- "dev": true, +- "optional": true +- }, +- "@dprint/darwin-x64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.47.2.tgz", +- "integrity": "sha512-T7wzlc+rBV+6BRRiBjoqoy5Hj4TR2Nv2p2s9+ycyPGs10Kj/JXOWD8dnEHeBgUr2r4qe/ZdcxmsFQ5Hf2n0WuA==", +- "dev": true, +- "optional": true +- }, +- "@dprint/formatter": { +- "version": "0.4.1", +- "resolved": "https://registry.npmjs.org/@dprint/formatter/-/formatter-0.4.1.tgz", +- "integrity": "sha512-IB/GXdlMOvi0UhQQ9mcY15Fxcrc2JPadmo6tqefCNV0bptFq7YBpggzpqYXldBXDa04CbKJ+rDwO2eNRPE2+/g==", +- "dev": true +- }, +- "@dprint/linux-arm64-glibc": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.2.tgz", +- "integrity": "sha512-B0m1vT5LdVtrNOVdkqpLPrSxuCD+l5bTIgRzPaDoIB1ChWQkler9IlX8C+RStpujjPj6SYvwo5vTzjQSvRdQkA==", +- "dev": true, +- "optional": true +- }, +- "@dprint/linux-arm64-musl": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.2.tgz", +- "integrity": "sha512-zID6wZZqpg2/Q2Us+ERQkbhLwlW3p3xaeEr00MPf49bpydmEjMiPuSjWPkNv+slQSIyIsVovOxF4lbNZjsdtvw==", +- "dev": true, +- "optional": true +- }, +- "@dprint/linux-x64-glibc": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.2.tgz", +- "integrity": "sha512-rB3WXMdINnRd33DItIp7mObS7dzHW90ZzeJSsoKJLPp+Z7wXjjb27UUowfqVI4baa/1pd7sdbX54DPohMtfu/A==", +- "dev": true, +- "optional": true +- }, +- "@dprint/linux-x64-musl": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.2.tgz", +- "integrity": "sha512-E0+TNbzYdTXJ/jCVjUctVxkda/faw++aDQLfyWGcmdMJnbM7NZz+W4fUpDXzMPsjy+zTWxXcPK7/q2DZz2gnbg==", +- "dev": true, +- "optional": true +- }, +- "@dprint/typescript": { +- "version": "0.91.6", +- "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.6.tgz", +- "integrity": "sha512-rbgODMD0hsQJ6w32eMELqt+KnkzxVVLT4qRMcvlz8PsFwSPyIfBslpZcFhmJWdyurVKKNcUPNC6Aq9PcUIX13w==", +- "dev": true +- }, +- "@dprint/win32-arm64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.47.2.tgz", +- "integrity": "sha512-K1EieTCFjfOCmyIhw9zFSduE6qVCNHEveupqZEfbSkVGw5T9MJQ1I9+n7MDb3RIDYEUk0enJ58/w82q8oDKCyA==", +- "dev": true, +- "optional": true +- }, +- "@dprint/win32-x64": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.47.2.tgz", +- "integrity": "sha512-LhizWr8VrhHvq4ump8HwOERyFmdLiE8C6A42QSntGXzKdaa2nEOq20x/o56ZIiDcesiV+1TmosMKimPcOZHa+Q==", +- "dev": true, +- "optional": true +- }, + "@esbuild/aix-ppc64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", +@@ -6148,22 +5941,6 @@ + "path-type": "^4.0.0" + } + }, +- "dprint": { +- "version": "0.47.2", +- "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.2.tgz", +- "integrity": "sha512-geUcVIIrmLaY+YtuOl4gD7J/QCjsXZa5gUqre9sO6cgH0X/Fa9heBN3l/AWVII6rKPw45ATuCSDWz1pyO+HkPQ==", +- "dev": true, +- "requires": { +- "@dprint/darwin-arm64": "0.47.2", +- "@dprint/darwin-x64": "0.47.2", +- "@dprint/linux-arm64-glibc": "0.47.2", +- "@dprint/linux-arm64-musl": "0.47.2", +- "@dprint/linux-x64-glibc": "0.47.2", +- "@dprint/linux-x64-musl": "0.47.2", +- "@dprint/win32-arm64": "0.47.2", +- "@dprint/win32-x64": "0.47.2" +- } +- }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", +diff --git a/package.json b/package.json +index 673cadfb05e..70c15434489 100644 +--- a/package.json ++++ b/package.json +@@ -39,8 +39,6 @@ + "!**/.gitattributes" + ], + "devDependencies": { +- "@dprint/formatter": "^0.4.1", +- "@dprint/typescript": "0.91.6", + "@esfx/canceltoken": "^1.0.0", + "@eslint/js": "^9.9.0", + "@octokit/rest": "^21.0.1", +@@ -61,7 +59,6 @@ + "chalk": "^4.1.2", + "chokidar": "^3.6.0", + "diff": "^5.2.0", +- "dprint": "^0.47.2", + "esbuild": "^0.23.0", + "eslint": "^9.9.0", + "eslint-formatter-autolinkable-stylish": "^1.4.0", +@@ -99,7 +96,7 @@ + "gulp": "hereby", + "lint": "hereby lint", + "knip": "hereby knip", +- "format": "dprint fmt", ++ "format": ":", + "setup-hooks": "node scripts/link-hooks.mjs" + }, + "browser": { +diff --git a/scripts/dtsBundler.mjs b/scripts/dtsBundler.mjs +index ade134287fe..398aedf541a 100644 +--- a/scripts/dtsBundler.mjs ++++ b/scripts/dtsBundler.mjs +@@ -5,8 +5,6 @@ + * bundle as namespaces again, even though the project is modules. + */ + +-import * as dprintFormatter from "@dprint/formatter"; +-import * as dprintTypeScript from "@dprint/typescript"; + import assert, { fail } from "assert"; + import fs from "fs"; + import minimist from "minimist"; +@@ -492,25 +490,5 @@ if (publicContents.includes("@internal")) { + console.error("Output includes untrimmed @internal nodes!"); + } + +-const buffer = fs.readFileSync(dprintTypeScript.getPath()); +-const formatter = dprintFormatter.createFromBuffer(buffer); +-formatter.setConfig({ +- indentWidth: 4, +- lineWidth: 1000, +- newLineKind: "auto", +- useTabs: false, +-}, { +- quoteStyle: "preferDouble", +-}); +- +-/** +- * @param {string} contents +- * @returns {string} +- */ +-function dprint(contents) { +- const result = formatter.formatText({ filePath: "dummy.d.ts", fileText: contents }); +- return result.replace(/\r\n/g, "\n"); +-} +- +-fs.writeFileSync(output, dprint(publicContents)); +-fs.writeFileSync(internalOutput, dprint(internalContents)); ++fs.writeFileSync(output, publicContents); ++fs.writeFileSync(internalOutput, internalContents); +-- +2.47.0 + diff --git a/typescript/increase-timeout.patch b/typescript/0002-Increase-test-timeout.patch similarity index 65% rename from typescript/increase-timeout.patch rename to typescript/0002-Increase-test-timeout.patch index 2f0b85b98..ae5d6ecb7 100644 --- a/typescript/increase-timeout.patch +++ b/typescript/0002-Increase-test-timeout.patch @@ -1,8 +1,17 @@ +From 6f4771b2b2a1ba8f30795caca8f550b40f33b185 Mon Sep 17 00:00:00 2001 +From: Eric Long +Date: Mon, 18 Nov 2024 11:36:33 +0800 +Subject: [PATCH 2/3] Increase test timeout + +--- + scripts/build/options.mjs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/scripts/build/options.mjs b/scripts/build/options.mjs -index be5ef5ae4ea..2c0d62212ca 100644 +index 0d3a2093359..c9c8a9d467e 100644 --- a/scripts/build/options.mjs +++ b/scripts/build/options.mjs -@@ -26,7 +26,7 @@ const parsed = minimist(process.argv.slice(2), { +@@ -24,7 +24,7 @@ const parsed = minimist(process.argv.slice(2), { inspect: process.env.inspect || process.env["inspect-brk"] || process.env.i, host: process.env.TYPESCRIPT_HOST || process.env.host || "node", browser: process.env.browser || process.env.b || (os.platform() === "win32" ? "edge" : "chrome"), @@ -11,3 +20,6 @@ index be5ef5ae4ea..2c0d62212ca 100644 tests: process.env.test || process.env.tests || process.env.t, runners: process.env.runners || process.env.runner || process.env.ru, light: process.env.light === undefined || process.env.light !== "false", +-- +2.47.0 + diff --git a/typescript/remove-typescript.d.ts-baseline-check.patch b/typescript/0003-Remove-typescript.d.ts-baseline-check.patch similarity index 50% rename from typescript/remove-typescript.d.ts-baseline-check.patch rename to typescript/0003-Remove-typescript.d.ts-baseline-check.patch index f34131893..0da026581 100644 --- a/typescript/remove-typescript.d.ts-baseline-check.patch +++ b/typescript/0003-Remove-typescript.d.ts-baseline-check.patch @@ -1,8 +1,17 @@ +From 8a80022158ff8e7d5c6997a4e631066921b1cbb6 Mon Sep 17 00:00:00 2001 +From: Eric Long +Date: Mon, 18 Nov 2024 11:37:09 +0800 +Subject: [PATCH 3/3] Remove typescript.d.ts baseline check + +--- + src/testRunner/unittests/publicApi.ts | 4 ---- + 1 file changed, 4 deletions(-) + diff --git a/src/testRunner/unittests/publicApi.ts b/src/testRunner/unittests/publicApi.ts -index 1b5ab93f0a1..bff42f0b028 100644 +index 011f32ae285..9e5f6ca8abd 100644 --- a/src/testRunner/unittests/publicApi.ts +++ b/src/testRunner/unittests/publicApi.ts -@@ -20,10 +20,6 @@ describe("unittests:: Public APIs", () => { +@@ -23,10 +23,6 @@ describe("unittests:: Public APIs", () => { }); } @@ -13,3 +22,6 @@ index 1b5ab93f0a1..bff42f0b028 100644 describe("for the language server", () => { verifyApi("tsserverlibrary.d.ts"); }); +-- +2.47.0 + diff --git a/typescript/remove-dprint.patch b/typescript/remove-dprint.patch deleted file mode 100644 index 4b58701da..000000000 --- a/typescript/remove-dprint.patch +++ /dev/null @@ -1,287 +0,0 @@ -diff --git a/Herebyfile.mjs b/Herebyfile.mjs -index c3acff2969..2ba22ac0af 100644 ---- a/Herebyfile.mjs -+++ b/Herebyfile.mjs -@@ -533,13 +533,13 @@ export const lint = task({ - export const format = task({ - name: "format", - description: "Formats the codebase.", -- run: () => exec(process.execPath, ["node_modules/dprint/bin.js", "fmt"]), -+ run: () => {}, - }); - - export const checkFormat = task({ - name: "check-format", - description: "Checks that the codebase is formatted.", -- run: () => exec(process.execPath, ["node_modules/dprint/bin.js", "check"], { ignoreStdout: true }), -+ run: () => {}, - }); - - const { main: cancellationToken, watch: watchCancellationToken } = entrypointBuildTask({ -diff --git a/package-lock.json b/package-lock.json -index 0f3b38bbad..610f409b85 100644 ---- a/package-lock.json -+++ b/package-lock.json -@@ -33,7 +33,6 @@ - "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "diff": "^5.1.0", -- "dprint": "^0.45.0", - "esbuild": "^0.20.0", - "eslint": "^8.56.0", - "eslint-formatter-autolinkable-stylish": "^1.3.0", -@@ -74,97 +73,6 @@ - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, -- "node_modules/@dprint/darwin-arm64": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.45.0.tgz", -- "integrity": "sha512-pkSSmixIKXr5t32bhXIUbpIBm8F8uhsJcUUvfkFNsRbQvNwRp71ribZpE8dKl0ZFOlAFeWD6WLE8smp/QtiGUA==", -- "cpu": [ -- "arm64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "darwin" -- ] -- }, -- "node_modules/@dprint/darwin-x64": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.45.0.tgz", -- "integrity": "sha512-PHcXSrRO53KH9N+YPbPtr40NnDo2t7hO7KLMfl2ktRNLjrmKg6F8XDDsr2C7Z11k3jyEEU2Jq8hhpaKHwNapmQ==", -- "cpu": [ -- "x64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "darwin" -- ] -- }, -- "node_modules/@dprint/linux-arm64-glibc": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.45.0.tgz", -- "integrity": "sha512-NgIpvZHpiQaY4DxSygxknxBtvKE2KLK9dEbUNKNE098yTHhGq7ouPsoM7RtsO34RHJ3tEZLLJEuBHn20XP8LMg==", -- "cpu": [ -- "arm64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "linux" -- ] -- }, -- "node_modules/@dprint/linux-arm64-musl": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.45.0.tgz", -- "integrity": "sha512-Y8p+FC0RNyKCGQjy99Uh1LSPrlQtUTvo4brdvU1THF3pyWu6Bg1p6NiP5a6SjE/6t9CMKZJz39zPreQtnDkSDA==", -- "cpu": [ -- "arm64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "linux" -- ] -- }, -- "node_modules/@dprint/linux-x64-glibc": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.45.0.tgz", -- "integrity": "sha512-u03NCZIpJhE5gIl9Q7jNL4sOPBFd/8BLVBiuLoLtbiTZQ+NNudHKgGNATJBU67q1MKpqKnt8/gQm139cJkHhrw==", -- "cpu": [ -- "x64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "linux" -- ] -- }, -- "node_modules/@dprint/linux-x64-musl": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.45.0.tgz", -- "integrity": "sha512-DQN8LPtxismkeU1X+sQywa80kWwCBcpQh9fXoJcvTEHrgzHBqbG2SEsUZpM12oKEua1KE/iBh+vgZ+4I3TdI2A==", -- "cpu": [ -- "x64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "linux" -- ] -- }, -- "node_modules/@dprint/win32-x64": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.45.0.tgz", -- "integrity": "sha512-aZHIWG2jIlEp4BER1QG6YYqPd6TxT9S77AeUkWJixNiMEo+33mPRVCBcugRWI/WJWveX8yWFVXkToORtnSFeEA==", -- "cpu": [ -- "x64" -- ], -- "dev": true, -- "optional": true, -- "os": [ -- "win32" -- ] -- }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz", -@@ -1892,25 +1800,6 @@ - "node": ">=6.0.0" - } - }, -- "node_modules/dprint": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.45.0.tgz", -- "integrity": "sha512-3444h7V47XoA16qgIWjw3CV/Eo/rQbT/XTGlbJ/6vJ+apQyuo0+M3Ai0GS3wu7X9HBUDcA0zIHA3mOxWNz6toA==", -- "dev": true, -- "hasInstallScript": true, -- "bin": { -- "dprint": "bin.js" -- }, -- "optionalDependencies": { -- "@dprint/darwin-arm64": "0.45.0", -- "@dprint/darwin-x64": "0.45.0", -- "@dprint/linux-arm64-glibc": "0.45.0", -- "@dprint/linux-arm64-musl": "0.45.0", -- "@dprint/linux-x64-glibc": "0.45.0", -- "@dprint/linux-x64-musl": "0.45.0", -- "@dprint/win32-x64": "0.45.0" -- } -- }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", -@@ -4493,55 +4382,6 @@ - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, -- "@dprint/darwin-arm64": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.45.0.tgz", -- "integrity": "sha512-pkSSmixIKXr5t32bhXIUbpIBm8F8uhsJcUUvfkFNsRbQvNwRp71ribZpE8dKl0ZFOlAFeWD6WLE8smp/QtiGUA==", -- "dev": true, -- "optional": true -- }, -- "@dprint/darwin-x64": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.45.0.tgz", -- "integrity": "sha512-PHcXSrRO53KH9N+YPbPtr40NnDo2t7hO7KLMfl2ktRNLjrmKg6F8XDDsr2C7Z11k3jyEEU2Jq8hhpaKHwNapmQ==", -- "dev": true, -- "optional": true -- }, -- "@dprint/linux-arm64-glibc": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.45.0.tgz", -- "integrity": "sha512-NgIpvZHpiQaY4DxSygxknxBtvKE2KLK9dEbUNKNE098yTHhGq7ouPsoM7RtsO34RHJ3tEZLLJEuBHn20XP8LMg==", -- "dev": true, -- "optional": true -- }, -- "@dprint/linux-arm64-musl": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.45.0.tgz", -- "integrity": "sha512-Y8p+FC0RNyKCGQjy99Uh1LSPrlQtUTvo4brdvU1THF3pyWu6Bg1p6NiP5a6SjE/6t9CMKZJz39zPreQtnDkSDA==", -- "dev": true, -- "optional": true -- }, -- "@dprint/linux-x64-glibc": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.45.0.tgz", -- "integrity": "sha512-u03NCZIpJhE5gIl9Q7jNL4sOPBFd/8BLVBiuLoLtbiTZQ+NNudHKgGNATJBU67q1MKpqKnt8/gQm139cJkHhrw==", -- "dev": true, -- "optional": true -- }, -- "@dprint/linux-x64-musl": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.45.0.tgz", -- "integrity": "sha512-DQN8LPtxismkeU1X+sQywa80kWwCBcpQh9fXoJcvTEHrgzHBqbG2SEsUZpM12oKEua1KE/iBh+vgZ+4I3TdI2A==", -- "dev": true, -- "optional": true -- }, -- "@dprint/win32-x64": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.45.0.tgz", -- "integrity": "sha512-aZHIWG2jIlEp4BER1QG6YYqPd6TxT9S77AeUkWJixNiMEo+33mPRVCBcugRWI/WJWveX8yWFVXkToORtnSFeEA==", -- "dev": true, -- "optional": true -- }, - "@esbuild/aix-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz", -@@ -5719,21 +5559,6 @@ - "esutils": "^2.0.2" - } - }, -- "dprint": { -- "version": "0.45.0", -- "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.45.0.tgz", -- "integrity": "sha512-3444h7V47XoA16qgIWjw3CV/Eo/rQbT/XTGlbJ/6vJ+apQyuo0+M3Ai0GS3wu7X9HBUDcA0zIHA3mOxWNz6toA==", -- "dev": true, -- "requires": { -- "@dprint/darwin-arm64": "0.45.0", -- "@dprint/darwin-x64": "0.45.0", -- "@dprint/linux-arm64-glibc": "0.45.0", -- "@dprint/linux-arm64-musl": "0.45.0", -- "@dprint/linux-x64-glibc": "0.45.0", -- "@dprint/linux-x64-musl": "0.45.0", -- "@dprint/win32-x64": "0.45.0" -- } -- }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", -diff --git a/package.json b/package.json -index f6b9ceca6d..cf486163ba 100644 ---- a/package.json -+++ b/package.json -@@ -59,7 +59,6 @@ - "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "diff": "^5.1.0", -- "dprint": "^0.45.0", - "esbuild": "^0.20.0", - "eslint": "^8.56.0", - "eslint-formatter-autolinkable-stylish": "^1.3.0", -@@ -94,7 +93,7 @@ - "clean": "hereby clean", - "gulp": "hereby", - "lint": "hereby lint", -- "format": "dprint fmt", -+ "format": ":", - "setup-hooks": "node scripts/link-hooks.mjs" - }, - "browser": { -diff --git a/scripts/dtsBundler.mjs b/scripts/dtsBundler.mjs -index 7bf4203b99..8a997c58ba 100644 ---- a/scripts/dtsBundler.mjs -+++ b/scripts/dtsBundler.mjs -@@ -406,25 +406,5 @@ if (publicContents.includes("@internal")) { - console.error("Output includes untrimmed @internal nodes!"); - } - --const dprintPath = path.resolve(__dirname, "..", "node_modules", "dprint", "bin.js"); -- --/** -- * @param {string} contents -- * @returns {string} -- */ --function dprint(contents) { -- const result = cp.execFileSync( -- process.execPath, -- [dprintPath, "fmt", "--stdin", "ts"], -- { -- stdio: ["pipe", "pipe", "inherit"], -- encoding: "utf-8", -- input: contents, -- maxBuffer: 100 * 1024 * 1024, // 100 MB "ought to be enough for anyone"; https://github.com/nodejs/node/issues/9829 -- }, -- ); -- return result.replace(/\r\n/g, "\n"); --} -- --fs.writeFileSync(output, dprint(publicContents)); --fs.writeFileSync(internalOutput, dprint(internalContents)); -+fs.writeFileSync(output, publicContents); -+fs.writeFileSync(internalOutput, internalContents); diff --git a/typescript/riscv64.patch b/typescript/riscv64.patch index c7232fedc..58a88f917 100644 --- a/typescript/riscv64.patch +++ b/typescript/riscv64.patch @@ -1,19 +1,6 @@ --- PKGBUILD +++ PKGBUILD -@@ -12,11 +12,30 @@ url=http://www.typescriptlang.org - license=('Apache-2.0') - depends=('nodejs') - makedepends=('git' 'npm' 'rsync') --source=("git+https://github.com/microsoft/$_name.git#tag=v$pkgver") --b2sums=('91c73cbadce2c602dc3fe78c60d6eef17b157af4aa9ee8cb535b78bfc1ae71a346d202133541872b0436a756b537550c5f0d883e036178776e09f9445e82a817') -+source=("git+https://github.com/microsoft/$_name.git#tag=v$pkgver" -+ "remove-dprint.patch" -+ "increase-timeout.patch" -+ "remove-typescript.d.ts-baseline-check.patch") -+b2sums=('91c73cbadce2c602dc3fe78c60d6eef17b157af4aa9ee8cb535b78bfc1ae71a346d202133541872b0436a756b537550c5f0d883e036178776e09f9445e82a817' -+ '03824f41aaa38cae3965cf2285465e0590d638ffbfe5019070c8a75d4e58ef4d44c92a1915f55bfa8f6bd0addddb99b8abc08c9d50cc5239faafe171e0740328' -+ '216abfce117ae52b4dbc49bd94eac6096c1606a1b50fab90af94f6611acad8e33e4ef497c6f8002af078caa9297ac84a2c4291b620836b4007b02f4add28bc98' -+ '38dc4bfd4a53613eb6406b4966d39a7c26f49fdb3eee626739773a0f16bd177e0ba735e70a34b8fb4bfbdd745392a0ac09429d2e21086e04bd28ba6cbaa080ef') +@@ -21,6 +21,19 @@ b2sums=('d2e131993d301e5ef623fe3f87e999f8514e060cf52583003ecc2247bb416d3aad4798d prepare() { cd $_name @@ -21,15 +8,26 @@ + # Remove dprint from dependencies and disable formatting when building code + # dprint itself requires prebuilt binary available, and some of its plugins uses prebuilts as well + # Building dprint from source from NPM package is upstreamed to https://github.com/dprint/dprint/pull/820 -+ patch -Np1 -i ../remove-dprint.patch ++ patch -Np1 -i ../0001-Remove-dprint.patch + + # Increase test timeout from 40s to 4000s -+ patch -Np1 -i ../increase-timeout.patch ++ patch -Np1 -i ../0002-Increase-test-timeout.patch + + # Disable baseline check for typescript.d.ts + # This should not affect functionality since the diffs are solely code format variations -+ patch -Np1 -i ../remove-typescript.d.ts-baseline-check.patch ++ patch -Np1 -i ../0003-Remove-typescript.d.ts-baseline-check.patch + npm ci } +@@ -46,3 +59,10 @@ package() { + install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname \ + ThirdPartyNoticeText.txt + } ++ ++source+=("0001-Remove-dprint.patch" ++ "0002-Increase-test-timeout.patch" ++ "0003-Remove-typescript.d.ts-baseline-check.patch") ++b2sums+=('d33e1a50820247890f96bcdc94d670e52a9fbb4e765cb6740aef14c84f13e5490ad44b5e8d212b982c84eaf39d97da9d863e7a9597a66f73d92fa8f439de306a' ++ '1d42d2d94803fcec7665b98a70f502cdd90d0bb89aeb52e516bb1615c6f3d24deb79d05b6821908be408dbf63043ef59c8a34ec1426d80898d2f4f14cd985a13' ++ 'd1b9786699d3861bacc4bf8ff8022fbc75c79a6598cb5209dc5024714870d6a6c9132b2e53a876b68a6812c062ecff65d6e158962f397aa332eb019d24907164')