From patchwork Thu Jan 6 16:50:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 36006 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EF4C327BBEA; Thu, 6 Jan 2022 16:51:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D52D527BBE9 for ; Thu, 6 Jan 2022 16:51:27 +0000 (GMT) Received: from localhost ([::1]:43318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5Vz5-0007Hp-21 for patchwork@mira.cbaines.net; Thu, 06 Jan 2022 11:51:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5Vym-0007GC-2d for guix-patches@gnu.org; Thu, 06 Jan 2022 11:51:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5Vyg-0007ut-Eu for guix-patches@gnu.org; Thu, 06 Jan 2022 11:51:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5Vyg-000745-EO for guix-patches@gnu.org; Thu, 06 Jan 2022 11:51:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v6 05/41] guix: node-build-system: Add 'delete-dependencies' helper function. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Jan 2022 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Famulari , Philip McGrath Cc: 51838@debbugs.gnu.org, Timothy Sample , Pierre Langlois , Jelle Licht Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.164148782227028 (code B ref 51838); Thu, 06 Jan 2022 16:51:02 +0000 Received: (at 51838) by debbugs.gnu.org; 6 Jan 2022 16:50:22 +0000 Received: from localhost ([127.0.0.1]:42071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Vy0-00071m-PZ for submit@debbugs.gnu.org; Thu, 06 Jan 2022 11:50:22 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Vxx-00071B-1r for 51838@debbugs.gnu.org; Thu, 06 Jan 2022 11:50:19 -0500 Received: by mail-wm1-f67.google.com with SMTP id p1-20020a1c7401000000b00345c2d068bdso3990330wmc.3 for <51838@debbugs.gnu.org>; Thu, 06 Jan 2022 08:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version; bh=w8ViImWctUEB6tHzCQdIvMC0S6C3thi378C3rKrxQ3c=; b=IWh0GNXVNkkCmswIKOtyQD0xM/aCc5/VpJPMheNYUCw0EfTQHLkjMGLl3tKsuyw8ND BH2dUFjSdNsVjJmCwtT19KyMBjXVYsO0L9jUH8GXH4uriKgIMbVYe4kPepV4XG0ih4pZ CLaYHMlsv5mO6a7DfhTcHeNjFB5GayDL5SXc34sS5jJrBpF3R/6aMIC8Ko9ItY2eVByQ Mn7gbKeN/ETBZeOpqyegQxnJqP1CqBq+fggE8p2MBMKPDrWjmbqfi62fVWY5LKua8qUo Von7D3q4AxpLKgN8e/hjmMIWO4zTsBlkDIpdtbsN1KCB2P8m/gZfgpABRrvRTnu6sVf8 c2uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version; bh=w8ViImWctUEB6tHzCQdIvMC0S6C3thi378C3rKrxQ3c=; b=dJ4+x3VbCoNWyCPWaI/6gNxm6Z3dzDbnkhyQmdbo0SqKIlsMVAer4pq9L8hWXe83fA pIqesOiqTZHK4abH94nfagqJOmGf4wBsJJLdb2bClzDwK1BnuAAf1JyfGe/pqynBXFJr f/AyMSI3OnL5YOLGfUCvLT760xeGuI6GanBCWAArgCbRSx8cFvaWSyh503/gUS2refQt RSFytzdsCuN4DMoEJK9uhBbFLZ9604t87g/FvcesqLxEqei/c87wBau1KxS2SsvyUMZ+ sIkYCCNTSZ6gsToi1sdziSF4kMwGXZM7FkwDSbC+4XS39zi82KcmazETa/NtjitXU5Da lvHg== X-Gm-Message-State: AOAM530uoLj9Fj2QH2YirseRua7DArb9DHVHTwbDPt8lLP2iAm6ZHoUk F++XK9dOfeFDU2L3SyI08hc= X-Google-Smtp-Source: ABdhPJwbbz/LY8CvS3BpJXfqqWYmPDv4QVWJoZysWXRa3tPuAZKT1qnBT5oekxpPcQ1Lw1T7TF1gKg== X-Received: by 2002:a05:600c:2046:: with SMTP id p6mr7573469wmg.176.1641487811105; Thu, 06 Jan 2022 08:50:11 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id h204sm2183332wmh.33.2022.01.06.08.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 08:50:10 -0800 (PST) Message-ID: <01d25375840e1611224f1407431dd03508f5b07a.camel@gmail.com> From: Liliana Marie Prikler Date: Thu, 06 Jan 2022 17:50:08 +0100 In-Reply-To: References: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> <20211230073919.30327-1-philip@philipmcgrath.com> <20211230073919.30327-6-philip@philipmcgrath.com> <7d5dd434d7750123fa32cb623df0463d60d3f82f.camel@gmail.com> <23eaa7e6-c087-d885-924a-192917758bbf@philipmcgrath.com> <5b83ba5e35af7ac956a6d5de41cb98a892863b55.camel@gmail.com> <4e443a9e-e024-d641-14cd-e36ef7cae46d@philipmcgrath.com> User-Agent: Evolution 3.42.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Leo, Am Mittwoch, dem 05.01.2022 um 15:02 -0500 schrieb Leo Famulari: > On Wed, Jan 05, 2022 at 02:08:30PM -0500, Philip McGrath wrote: > > I would consider it very regrettable if this patch series were to > > continue to be blocked by stylistic considerations in the > > implementation of > > unexported helper functions. > > Agreed. > > Is there a concrete problem with these patches? Or will they work as > specified for Guix packagers? > > Let's remember that the primary goal of code review is to bring a > contribution into the codebase. I'm currently in the process of applying my own checklist, see Each of my fixup commits is a change on top of Philip's corresponding commit (or at least I hope so, I haven't squashed them yet) and delete- dependencies.patch shows the savings in the rest of the series. I so far successfully built node-irc and node-serialport with these changes applied on top. It'll take some time to check the rest of the toplevel packages and thereafter I'll squash and cleanup commit messages. So from my position, everything is about to be done. Should I resend this as v8 for a complete check that I'm not doing anything harmful or should I go ahead and commit once I'm done? Cheers diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index 1f51c0d636..990b26a689 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -297,9 +297,7 @@ (define-public node-semver (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("tap"))))))) + (delete-dependencies '("^tap$"))))) ;; FIXME: Tests depend on node-tap #:tests? #f)) (home-page "https://github.com/npm/node-semver") @@ -329,9 +327,7 @@ (define-public node-wrappy (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("tap"))))))))) + (delete-dependencies '("^tap$"))))))) (home-page "https://github.com/npm/wrappy") (synopsis "Callback wrapping utility") (description "@code{wrappy} is a utility for Node.js to wrap callbacks.") @@ -356,9 +352,7 @@ (define-public node-once (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("tap"))))))) + (delete-dependencies '("^tap$"))))) ;; FIXME: Tests depend on node-tap #:tests? #f)) (inputs @@ -391,9 +385,7 @@ (define-public node-inherits (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("tap"))))))) + (delete-dependencies '("^tap$"))))) ;; FIXME: Tests depend on node-tap #:tests? #f)) (home-page @@ -425,10 +417,7 @@ (define-public node-safe-buffer (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("tape" - "standard"))))))) + (delete-dependencies '("^tape$" "^standard$"))))) #:tests? #f)) (home-page "https://github.com/feross/safe-buffer") @@ -458,12 +447,8 @@ (define-public node-string-decoder (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - '("tap" - "core-util-is" - "babel-polyfill"))))))) + (delete-dependencies + '("^tap$" "^core-util-is$" "^babel-polyfill$"))))) ;; FIXME: Tests depend on node-tap #:tests? #f)) (inputs @@ -497,29 +482,22 @@ (define-public node-readable-stream (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `("@babel/cli" - "@babel/core" - "@babel/polyfill" - "@babel/preset-env" - "airtap" - "assert" - "bl" - "deep-strict-equal" - "events.once" - "glob" - "gunzip-maybe" - "hyperquest" - "lolex" - "nyc" - "pump" - "rimraf" - "tap" - "tape" - "tar-fs" - "util-promisify"))))))) + (delete-dependencies `("^@babel/" + "^airtap$" + "^assert$" + "^bl$" + "^deep-strict-equal$" + "^events\\.once$" + "^glob$" + "^gunzip-maybe$" + "^hyperquest$" + "^lolex$" + "^nyc$" + "^pump$" + "^rimraf$" + "^tape?$" + "^tar-fs$" + "^util-promisify$"))))) #:tests? #f)) (inputs (list node-util-deprecate node-string-decoder node-inherits)) @@ -554,10 +532,7 @@ (define-public node-irc-colors (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("istanbul" - "vows"))))))) + (delete-dependencies `("^istanbul$" "^vows$"))))) #:tests? #f)) (home-page "https://github.com/fent/irc-colors.js") (synopsis "Node.js module providing color and formatting for IRC") @@ -586,12 +561,8 @@ (define-public node-irc (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("ansi-color" - "faucet" - "jscs" - "tape"))))))) + (delete-dependencies + `("^ansi-color$" "^faucet$" "^jscs$" "^tape$"))))) #:tests? #f)) (inputs (list node-irc-colors)) @@ -620,17 +591,14 @@ (define-public node-nan (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies - pkg-meta - '("bindings" - "commander" - "glob" - "request" - "node-gyp" ;; would be needed for tests - "tap" - "xtend"))))))) + (delete-dependencies + '("^bindings$" + "^commander$" + "^glob$" + "^request$" + "^node-gyp$" ;; would be needed for tests + "^tap$" + "^xtend$"))))) ;; tests need tap and other dependencies #:tests? #f)) (inputs @@ -673,21 +641,11 @@ (define-public node-addon-api (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `("benchmark" - "bindings" - "clang-format" - "eslint" - "eslint-config-semistandard" - "eslint-config-standard" - "eslint-plugin-import" - "eslint-plugin-node" - "eslint-plugin-promise" - "fs-extra" - "path" - "pre-commit")))))) + (delete-dependencies + `("^benchmark$" "^bindings$" "^clang-format$" + "^eslint" + "^fs-extra$" "^path$" "^pre-commit$")) + )) (add-after 'unpack 'skip-js-tests ;; We can't run the js-based tests, ;; but we can still do the C++ parts @@ -767,29 +725,26 @@ (define-public node-sqlite3 (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies - pkg-meta - `(;; Normally, this is "built" using @mapbox/node-pre-gyp, - ;; which publishes or downloads pre-built binaries or - ;; falls back to building from source. Here, we patch out - ;; all of that and just build directly. It might be - ;; better to patch a version of @mapbox/node-pre-gyp that - ;; always builds from source, as Debian does, but there - ;; are a number of dependencies that need to be packaged - ;; or removed. - "@mapbox/node-pre-gyp" - "node-pre-gyp" ;; deprecated name still used in some places - "aws-sdk" - "@mapbox/cloudfriend" - ;; Confusingly, this is only a dependency because of - ;; @mapbox/node-pre-gyp: with that removed, - ;; npm will use its own copy: - "node-gyp" - ;; These we'd like, we just don't have them yet: - "eslint" - "mocha")))))) + (delete-dependencies + `(;; Normally, this is "built" using @mapbox/node-pre-gyp, + ;; which publishes or downloads pre-built binaries or + ;; falls back to building from source. Here, we patch out + ;; all of that and just build directly. It might be + ;; better to patch a version of @mapbox/node-pre-gyp that + ;; always builds from source, as Debian does, but there + ;; are a number of dependencies that need to be packaged + ;; or removed. + "^@mapbox/node-pre-gyp$" + "^node-pre-gyp$" ;; deprecated name still used in some places + "^aws-sdk$" + "^@mapbox/cloudfriend$" + ;; Confusingly, this is only a dependency because of + ;; @mapbox/node-pre-gyp: with that removed, + ;; npm will use its own copy: + "^node-gyp$" + ;; These we'd like, we just don't have them yet: + "^eslint$" + "^mocha$")))) (add-before 'configure 'npm-config-sqlite ;; We need this step even if we do replace @mapbox/node-pre-gyp ;; because the package expects to build its bundled sqlite @@ -885,24 +840,12 @@ (define-public node-file-uri-to-path (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `("@types/mocha" - "@types/node" - "@typescript-eslint/eslint-plugin" - "@typescript-eslint/parser" - "cpy-cli" - "eslint" - "eslint-config-airbnb" - "eslint-config-prettier" - "eslint-import-resolver-typescript" - "eslint-plugin-import" - "eslint-plugin-jsx-a11y" - "eslint-plugin-react" - "mocha" - "rimraf" - "typescript")))))) + (delete-dependencies + `("^@types/mocha$" "^@types/node$" + "typescript" + "eslint" + "^cpy-cli$" + "^mocha$" "^rimraf$")))) (replace 'build (lambda* (#:key inputs native-inputs #:allow-other-keys) (copy-recursively "src" "dist") @@ -995,14 +938,12 @@ (define-public node-ms (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("eslint" - "expect.js" - "husky" - "lint-staged" - "mocha" - "prettier"))))))) + (delete-dependencies `("^eslint$" + "^expect\\.js$" + "^husky$" + "^lint-staged$" + "^mocha$" + "^prettier$"))))) #:tests? #f)) (home-page "https://github.com/vercel/ms") (synopsis "Tiny millisecond conversion utility") @@ -1045,20 +986,15 @@ (define-public node-debug (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("brfs" - "browserify" - "coveralls" - "istanbul" - "karma" - "karma-browserify" - "karma-chrome-launcher" - "karma-mocha" - "mocha" - "mocha-lcov-reporter" - "xo" - "supports-color"))))))) + (delete-dependencies + `("^brfs$" + "^browserify$" + "^coveralls$" + "^istanbul$" + "^karma" + "^mocha" + "^xo$" + "^supports-color$"))))) #:tests? #f)) (home-page "https://github.com/debug-js/debug") (synopsis "Lightweight debugging utility for Node.js and the browser") @@ -1173,12 +1109,10 @@ (define-public node-serialport-bindings (chdir "packages/bindings"))) (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("prebuild-install" - ;; devDependencies - "@serialport/binding-mock" - "node-abi")))))) + (delete-dependencies `("^prebuild-install$" + ;; devDependencies + "^@serialport/binding-mock$" + "^node-abi$")))) (add-after 'chdir 'avoid-prebuild-install (lambda args (with-atomic-json-file-replacement "package.json" @@ -1330,11 +1264,8 @@ (define-public node-serialport-stream (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `(;; devDependencies - "@serialport/binding-mock")))))) + (delete-dependencies `(;; devDependencies + "^@serialport/binding-mock$")))) (add-after 'unpack 'chdir (lambda args (chdir "packages/stream")))) @@ -1370,10 +1301,8 @@ (define-public node-serialport (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `("@serialport/binding-mock")))))) + (delete-dependencies `("^@serialport/binding-mock$")) + )) (add-after 'unpack 'chdir (lambda args (chdir "packages/serialport")))) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 5a4401e779..49e6323a9d 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -348,9 +348,7 @@ (define-public node-semver-bootstrap (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("tap"))))))))) + (delete-dependencies '("^tap$"))))))) (home-page "https://github.com/npm/node-semver") (properties '((hidden? . #t))) (synopsis "Parses semantic versions strings") @@ -381,13 +379,11 @@ (define-public node-ms-bootstrap (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta '("eslint" - "expect.js" - "husky" - "lint-staged" - "mocha"))))))))) + (delete-dependencies '("^eslint$" + "^expect\\.js$" + "^husky$" + "^lint-staged$" + "^mocha$"))))))) (home-page "https://github.com/zeit/ms#readme") (properties '((hidden? . #t))) (synopsis "Tiny millisecond conversion utility") @@ -417,10 +413,7 @@ (define-public node-binary-search-bootstrap (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("chai" - "mocha"))))))))) + (delete-dependencies `("^(chai\|mocha)$"))))))) (home-page "https://github.com/darkskyapp/binary-search#readme") (properties '((hidden? . #t))) (synopsis "Tiny binary search function with comparators") @@ -449,20 +442,13 @@ (define-public node-debug-bootstrap (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `("brfs" - "browserify" - "coveralls" - "istanbul" - "karma" - "karma-browserify" - "karma-chrome-launcher" - "karma-mocha" - "mocha" - "mocha-lcov-reporter" - "xo"))))))))) + (delete-dependencies `("^brfs$" + "^browserify$" + "^coveralls$" + "^istanbul$" + "^karma" + "^mocha" + "^xo$"))))))) (inputs (list node-ms-bootstrap)) (home-page "https://github.com/visionmedia/debug#readme") (properties '((hidden? . #t))) @@ -517,15 +503,12 @@ (define-public node-llparse-builder-bootstrap #:phases (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies - (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("@types/mocha" - "@types/node" - "mocha" - "ts-node" - "tslint" - "typescript")))))) + (lambda _ + (delete-dependencies `("^@types/node$" + "mocha$" + "^ts-node$" + "^tslint$" + "^typescript$")))) (replace 'build (lambda* (#:key inputs #:allow-other-keys) (let ((esbuild (search-input-file inputs "/bin/esbuild"))) @@ -581,15 +564,13 @@ (define-public node-llparse-frontend-bootstrap (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta `("@types/debug" - "@types/mocha" - "@types/node" - "mocha" - "ts-node" - "tslint" - "typescript")))))) + (delete-dependencies `("^@types/debug$" + "^@types/mocha$" + "^@types/node$" + "^mocha$" + "^ts-node$" + "^tslint$" + "^typescript$")))) (replace 'build (lambda* (#:key inputs #:allow-other-keys) (let ((esbuild (search-input-file inputs "/bin/esbuild"))) @@ -644,18 +625,15 @@ (define-public node-llparse-bootstrap (modify-phases %standard-phases (add-after 'patch-dependencies 'delete-dependencies (lambda args - (with-atomic-json-file-replacement "package.json" - (lambda (pkg-meta) - (delete-dependencies pkg-meta - `("@types/debug" - "@types/mocha" - "@types/node" - "esm" - "llparse-test-fixture" - "mocha" - "ts-node" - "tslint" - "typescript")))))) + (delete-dependencies `("^@types/debug$" + "^@types/mocha$" + "^@types/node$" + "^esm$" + "^llparse-test-fixture$" + "^mocha$" + "^ts-node$" + "^tslint$" + "^typescript$")))) (replace 'build (lambda* (#:key inputs #:allow-other-keys) (let ((esbuild (search-input-file inputs "/bin/esbuild")))