From 6e269f0dfffe32d90f5491e38454209f125f449d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 23 Nov 2023 04:20:00 +0000 Subject: [PATCH] typescript: 5.2.2 -> 5.3.2 Diff: https://github.com/microsoft/TypeScript/compare/v5.2.2...v5.3.2 Changelog: https://github.com/microsoft/TypeScript/releases/tag/v5.3.2 --- pkgs/development/compilers/typescript/default.nix | 12 ++++++++---- .../typescript/disable-dprint-dstBundler.patch | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch diff --git a/pkgs/development/compilers/typescript/default.nix b/pkgs/development/compilers/typescript/default.nix index af60548c32e0..ae59f26757c7 100644 --- a/pkgs/development/compilers/typescript/default.nix +++ b/pkgs/development/compilers/typescript/default.nix @@ -1,17 +1,21 @@ -{ lib, buildNpmPackage, fetchFromGitHub }: +{ lib, buildNpmPackage, fetchFromGitHub}: buildNpmPackage rec { pname = "typescript"; - version = "5.2.2"; + version = "5.3.2"; src = fetchFromGitHub { owner = "microsoft"; repo = "TypeScript"; rev = "v${version}"; - hash = "sha256-wjoqDmCudN5+9C3GrP1viiXBvsWgU0UIYWaFeK/TJEY="; + hash = "sha256-lwc2bYC2f8x3Np/LxbN+5x6Apuekp7LmHXNutqL9Z2E="; }; - npmDepsHash = "sha256-7Wm6nlpqZRNqBU0mYFZRVWQkO4uqvrKrp2h2aEmZtow="; + patches = [ + ./disable-dprint-dstBundler.patch + ]; + + npmDepsHash = "sha256-vD/tax5RjREdsdte3ONahVf9GPOkxPqeP9jmsxjCYkY="; meta = with lib; { description = "A superset of JavaScript that compiles to clean JavaScript output"; diff --git a/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch b/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch new file mode 100644 index 000000000000..95ccf411a93e --- /dev/null +++ b/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch @@ -0,0 +1,15 @@ +Disable dprint on dstBundler + +dprint fails on sandbox, because it requires internet access to install its +plugins. + +--- a/scripts/dtsBundler.mjs ++++ b/scripts/dtsBundler.mjs +@@ -430,5 +430,5 @@ + 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);