From patchwork Thu Nov 9 16:26:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 56139 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 D556427BBE2; Thu, 9 Nov 2023 16:27:55 +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_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 58C8527BBEA for ; Thu, 9 Nov 2023 16:27:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r17sN-0007Fe-75; Thu, 09 Nov 2023 11:27:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r17sL-0007F5-LI for guix-patches@gnu.org; Thu, 09 Nov 2023 11:27:25 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r17sL-00065d-DB for guix-patches@gnu.org; Thu, 09 Nov 2023 11:27:25 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r17sv-0004af-RH; Thu, 09 Nov 2023 11:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67019] [PATCH 02/16] gnu: Add node-copy-anything. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, julien@lepiller.eu, pukkamustard@posteo.net, guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67019 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67019@debbugs.gnu.org Cc: Philip McGrath , Philip McGrath , Julien Lepiller , pukkamustard X-Debbugs-Original-Xcc: Philip McGrath , Julien Lepiller , pukkamustard Received: via spool by 67019-submit@debbugs.gnu.org id=B67019.169954727617610 (code B ref 67019); Thu, 09 Nov 2023 16:28:01 +0000 Received: (at 67019) by debbugs.gnu.org; 9 Nov 2023 16:27:56 +0000 Received: from localhost ([127.0.0.1]:48467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r17sp-0004Zy-J3 for submit@debbugs.gnu.org; Thu, 09 Nov 2023 11:27:55 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:56719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r17sm-0004Zf-52 for 67019@debbugs.gnu.org; Thu, 09 Nov 2023 11:27:54 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 00348320095C; Thu, 9 Nov 2023 11:27:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 09 Nov 2023 11:27:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1699547226; x=1699633626; bh=wTfCkR6nx9 494RMShtidiWRHC466SgApjQMOOyLBocE=; b=vVoiFk4buHHWV4tr3yYr/e0cze hjAPYYRj7QZpnfQWtrskCeVi8YxPad5U6XEYZo2JWFVPvGK2r5wCGyM2190ZH3g4 Stucf+enwo8e9bHqZk/zxFRIaQhzgrgK2wl74fjsJrLHg70Kwm+aLyj4GmHNX6Qg ycGR9nZpQTgDY46zzelku/LYYh4sG/jgrxSVWPlNv4+RfOXuKaHwSrZgTGWr+BHv JIPLWzbJA7X2UP8rDR137sN5g8ZxH+YBnD6wcg93wjX3Dh4ZVL0iY1tPysGjV1/c 2eMPTi/UgYVQ5FByuFI8RLnFvq5H+r2ygZ4SENZfaQ5lMbrSpymexE9oikiw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1699547226; x= 1699633626; bh=wTfCkR6nx9494RMShtidiWRHC466SgApjQMOOyLBocE=; b=J ZEJagDjaXRgIH6RZMIzwtMZ0oEZbWbg+diM8yWZJniNjDsGv4XFNinBC2QwO+Ngk PgQiDFF6U2TU3zBEz/mBxXbMVUhEPQZPDv0bv+QeYkeBslQW3NqoHbuKRPCST+b6 Ykn7GfHlm4b3TQqlvrEJ/pcTrFHo9tYn2/IBOkhBqeiC6UCwA3YN4idrji5e7qT/ L9Scy/NWRQp+mkr+Y6vhZisnhkoL4IsvMEV4mudM4E54CCzO2rUHxiMtjcRlhqEj rHvK5ulVjpAYCzi7pNk0JkpyJQttP7z6sS5nRknIYop6OR2hfLSkM79D731+ur64 LNsTOZXA1qjaGwqTMbK/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvuddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefrhhhilhhiphcuofgtifhrrghthhcuoehphhhilhhiphes phhhihhlihhpmhgtghhrrghthhdrtghomheqnecuggftrfgrthhtvghrnhepgfevgfelje ekgefhgeeigfdvhfeukefgvdduieegtdetvdfhvdffjeeggfduffeknecuffhomhgrihhn pehgihhthhhusgdrtghomhdpnhhpmhhjshdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhr rghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Nov 2023 11:27:05 -0500 (EST) From: Philip McGrath Date: Thu, 9 Nov 2023 11:26:24 -0500 Message-ID: <0e821283aa47a488700cd018e7487ed5498a01ba.1699540553.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node-xyz.scm (node-copy-anything): New variable. --- gnu/packages/node-xyz.scm | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index 49760ded2b..ee96dee767 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1712,3 +1712,84 @@ (define-public node-is-what functions for JavaScript, such as @code{isString}, @code{isDate}, and @code{isPlainObject}.") (license license:expat))) + +(define-public node-copy-anything + (package + (name "node-copy-anything") + (version "3.0.5") + (source + (origin (method git-fetch) + (uri (git-reference + (url "https://github.com/mesqueeb/copy-anything") + (commit (string-append "v" version)))) + (sha256 + (base32 "1lpjqanjl04k088banpns4yvp6hgf97snaj7gfbfancjpd3i8gk6")) + (snippet + #~(for-each delete-file + '("dist/cjs/index.cjs" + "dist/index.js"))) + (file-name (git-file-name name version)))) + (build-system node-build-system) + (native-inputs (list esbuild)) + (inputs (list node-is-what)) + (arguments + (list + #:tests? #f ; needs more dependencies + #:modules + `((guix build node-build-system) + (ice-9 match) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-dependencies 'delete-dependencies + (lambda args + (delete-dependencies + '(;; devDependencies + "@typescript-eslint/eslint-plugin" + "@typescript-eslint/parser" + "del-cli" + "eslint" + "eslint-config-prettier" + "eslint-plugin-tree-shaking" + "np" + "prettier" + "rollup" + "rollup-plugin-dts" + "rollup-plugin-esbuild" + "rollup-plugin-typescript2" + "typescript" + "vitest")))) + (add-after 'delete-dependencies 'patch-build-script + (lambda args + (define esbuild + "esbuild --bundle --platform=node --external:is-what") + (define new-build-script + (string-append + esbuild + " --format=cjs --outfile=dist/cjs/index.cjs src/index.ts" + " && " + esbuild + " --format=esm --outfile=dist/index.js src/index.ts")) + (with-atomic-json-file-replacement "package.json" + (match-lambda + (('@ . alist) + (cons '@ + (map (match-lambda + (("scripts" @ . alist) + `("scripts" @ ,@(map (match-lambda + (("build" . _) + (cons "build" + new-build-script)) + (other + other)) + alist))) + (other + other)) + alist)))))))))) + (home-page "https://npmjs.com/copy-anything") + (synopsis "JavaScript library for copying objects and arrays") + (description "This library provides deep copying for JavaScript objects +and arrays. Its design emphasizes speed, simplicity, and correctness in the +face of complications like special objects, symbols, and non-enumerable +properties.") + (license license:expat)))