From patchwork Thu Nov 16 19:15:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 56523 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 4552B27BBE2; Thu, 16 Nov 2023 19:17:39 +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 F0CDF27BBE9 for ; Thu, 16 Nov 2023 19:17:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3hrN-0003YT-6W; Thu, 16 Nov 2023 14:17:05 -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 1r3hrK-0003XZ-SN for guix-patches@gnu.org; Thu, 16 Nov 2023 14:17:02 -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 1r3hrK-0003DI-Jj for guix-patches@gnu.org; Thu, 16 Nov 2023 14:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3hrK-0003lC-B7 for guix-patches@gnu.org; Thu, 16 Nov 2023 14:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67019] [PATCH v2 01/16] gnu: Add node-is-what. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Nov 2023 19:17: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 , Liliana Marie Prikler Received: via spool by 67019-submit@debbugs.gnu.org id=B67019.170016220514323 (code B ref 67019); Thu, 16 Nov 2023 19:17:02 +0000 Received: (at 67019) by debbugs.gnu.org; 16 Nov 2023 19:16:45 +0000 Received: from localhost ([127.0.0.1]:44532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3hr2-0003io-46 for submit@debbugs.gnu.org; Thu, 16 Nov 2023 14:16:44 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:46227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3hqy-0003i3-Li for 67019@debbugs.gnu.org; Thu, 16 Nov 2023 14:16:41 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id B932C5C016D; Thu, 16 Nov 2023 14:16:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 16 Nov 2023 14:16:35 -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=fm1; t=1700162195; x=1700248595; bh=E5IupjeBbL q8FEGOhGUFOfGxUd7pyAq4UrFRk0wuaQY=; b=LyNtnpz2c665FHs8iav/RjvHth fVeoMFdCSONlxA5T71sAXQNRq23oiHjhzSnV2KXAevCrgS39PSlHVX7ufphZCqB4 8bygJ2eSqRvCynz1PKzE8oYuosyYywbW18d8kwFJMWavfGFzRufYyRwNxvk/mrCg kDsgGEE7MqjikGsc3y2zpMs4YDzbt4uccmx+WT77bC4XOde4vLWikLtaGkb7qt4P qTPJ6wPtVoHu6BeCDIX2QbuONPmcubFgPEZe8gvYNG2kM63J+EwvCGPB/UEFjeDG MGB/xOpy23y26ctXICUSM2qepqyHABWKv9gt/rf83ccS3iP0NEt07FUfpBVg== 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=fm1; t=1700162195; x= 1700248595; bh=E5IupjeBbLq8FEGOhGUFOfGxUd7pyAq4UrFRk0wuaQY=; b=p 7rkx66n+e5DkRGTYBPYzkNwBwAnG2w1RwQAryHWu46d6IhheucEgjxz/R55jlp3s RlFLTYSe1+6ar+gynUoWtuIEkFjtn3pSSuOLk1xRn8BsimzKRmcvqb2JyE/V+wAH pbx+XkSf/vJQBUHb1Mm0I1ZuBgdrbnK/R3aBoNwT9XEPJFW3EpJOeXKnaGBy0UIT Nk7KuY4xFHQe9IMkyxuezNGyizIVNH4PWyxv5FNt8p0g8dEbip5tZZ63+fBJsIT0 BPuWHGo9XnoVtsl1az5yjSwiRVVmhETr/MgSWgITWQerQia73yB+CVJGtgudAJfT djn5R+sfKT5gqEUCeU+Gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefkedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefrhhhi lhhiphcuofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtg homheqnecuggftrfgrthhtvghrnhepgfevgfeljeekgefhgeeigfdvhfeukefgvdduieeg tdetvdfhvdffjeeggfduffeknecuffhomhgrihhnpehgihhthhhusgdrtghomhdpnhhpmh hjshdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Nov 2023 14:16:35 -0500 (EST) From: Philip McGrath Date: Thu, 16 Nov 2023 14:15:39 -0500 Message-ID: <9daf928c3989a207159dd6f53b531be65e7bae64.1700161584.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)))