From patchwork Thu Nov 9 16:12:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 56137 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 D4A6627BBE2; Thu, 9 Nov 2023 16:15:56 +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=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 D374927BBE9 for ; Thu, 9 Nov 2023 16:15:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r17gv-00011h-4h; Thu, 09 Nov 2023 11:15:37 -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 1r17gh-0000ul-Ik for guix-patches@gnu.org; Thu, 09 Nov 2023 11:15:31 -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 1r17gh-0003nl-5l for guix-patches@gnu.org; Thu, 09 Nov 2023 11:15:23 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r17hK-0004Hw-BH for guix-patches@gnu.org; Thu, 09 Nov 2023 11:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67019] [PATCH 01/16] gnu: Add node-is-what. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 16:16:02 +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 Received: via spool by 67019-submit@debbugs.gnu.org id=B67019.169954650316398 (code B ref 67019); Thu, 09 Nov 2023 16:16:02 +0000 Received: (at 67019) by debbugs.gnu.org; 9 Nov 2023 16:15:03 +0000 Received: from localhost ([127.0.0.1]:48448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r17gM-0004GP-Ey for submit@debbugs.gnu.org; Thu, 09 Nov 2023 11:15:02 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:58017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r17gJ-0004Fc-Bs for 67019@debbugs.gnu.org; Thu, 09 Nov 2023 11:15:00 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 334543200754; Thu, 9 Nov 2023 11:14:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 09 Nov 2023 11:14:14 -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=1699546453; x=1699632853; bh=E5IupjeBbL q8FEGOhGUFOfGxUd7pyAq4UrFRk0wuaQY=; b=OEUhb0xP0sEKT8wtbHTU2s0vC5 ilDFP4jwyQXrFpuUAixIJuHRBHjn0zvY6SkJOo0Fyh3qd6OKPLaulekglXtoxCEu PVuhnglXpJ2CthORCaHo9G8C8bVIMcPbFe0thnOA2h0Xer7yIHvH8eZO4rCX0aij rj87hCQXPQGlTyTnvBKf6jC9NRn6ulyDXiL+FhnQk7VBcV0cUOHAnfSZlTBhzTey GD47YoS91OKuxwEecUKTl0SSv64KuQOpOjd55aOeQgUZ6y+FmUUAc90Tu0onl/F1 7QlcG1inozxZdnDy6TmNO6aMq+gcqE3kF9GssZ6jKeA3SQBLRZBWb/40vcew== 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=1699546453; x= 1699632853; bh=E5IupjeBbLq8FEGOhGUFOfGxUd7pyAq4UrFRk0wuaQY=; b=R rNAzz3DaWs0K72uVEr28rVgsDmpfhyGAJa8YWjUiMz5qwe359dDfAioPhHLFD7vx ggI4ZY3XVIiyWtS457zvcVyTEczooDMEovrYZ/uU2fwovY2/IGZAEUDnzQxclwCP pw1A+cc9wHVTszhhz1sXxzgegL1tkV46PDHyLZGmxSS4B4YC4QSAn9dMnAg2RYL5 nkiyMILGGxuHIuODJSLaSXMoRttVQdVNFYG8HhjewbN2GvqBMeTaVdEQ8J6s0CbZ wGdjfC+3oqNqhfqZcwHEub7uL14H4BGjNdkTAUob89+GyiUSO3mMYn9+LDnWW9ju 0fe+YGg2K2HUnblWav24Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvuddgkeehucetufdoteggodetrfdotf 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:14:12 -0500 (EST) From: Philip McGrath Date: Thu, 9 Nov 2023 11:12:18 -0500 Message-ID: <2ac6934211cc66575c8c0c53461effc3bcf8fbdf.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-is-what): 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 6c16417309..49760ded2b 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1631,3 +1631,84 @@ (define-public node-yazl @item Prefer to open input files one at a time than all at once. @end enumerate") (license license:expat))) + +(define-public node-is-what + (package + (name "node-is-what") + (version "4.1.16") + (source + (origin (method git-fetch) + (uri (git-reference + (url "https://github.com/mesqueeb/is-what") + (commit (string-append "v" version)))) + (sha256 + (base32 "02h76klvjxgk0cl8a7sq4wbi7l4pvdimbams08l34k5carg03bdx")) + (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)) + (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" + "prettier-plugin-jsdoc" + "rollup" + "rollup-plugin-dts" + "rollup-plugin-esbuild" + "rollup-plugin-typescript2" + "typedoc" + "typescript" + "vitest")))) + (add-after 'delete-dependencies 'patch-build-script + (lambda args + (define esbuild + "esbuild --bundle --platform=node") + (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/is-what") + (synopsis "Type predicate functions for JavaScript") + (description "This package provides simple and small type predicate +functions for JavaScript, such as @code{isString}, @code{isDate}, and +@code{isPlainObject}.") + (license license:expat)))