all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip McGrath <philip@philipmcgrath.com>
To: 67019@debbugs.gnu.org
Cc: Philip McGrath <philip@philipmcgrath.com>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: [bug#67019] [PATCH v2 01/16] gnu: Add node-is-what.
Date: Thu, 16 Nov 2023 14:15:39 -0500	[thread overview]
Message-ID: <9daf928c3989a207159dd6f53b531be65e7bae64.1700161584.git.philip@philipmcgrath.com> (raw)
In-Reply-To: <cover.1700161584.git.philip@philipmcgrath.com>

* 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)))
-- 
2.41.0





  reply	other threads:[~2023-11-16 19:17 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 16:06 [bug#67019] [PATCH 00/16] gnu: Add KaTeX, lessc, and flow-remove-types Philip McGrath
2023-11-09 16:12 ` [bug#67019] [PATCH 01/16] gnu: Add node-is-what Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 02/16] gnu: Add node-copy-anything Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 03/16] gnu: Add lessc Philip McGrath
2023-11-11  0:56   ` Liliana Marie Prikler
2023-11-15 19:35     ` Philip McGrath
2023-11-15 20:23       ` Liliana Marie Prikler
2023-11-16  0:03         ` Philip McGrath
2023-11-16  1:17           ` Liliana Marie Prikler
2023-11-16  1:51             ` Philip McGrath
2023-11-16  7:18               ` Liliana Marie Prikler
2023-11-16 19:15               ` [bug#67019] [PATCH v2 00/16] gnu: Add KaTeX, lessc, and flow-remove-types Philip McGrath
2023-11-16 19:15                 ` Philip McGrath [this message]
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 02/16] gnu: Add node-copy-anything Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 03/16] gnu: Add lessc Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 04/16] gnu: Add ocaml-wtf8 Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 05/16] gnu: Add ocaml-visitors Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 06/16] gnu: Add ocaml-ppx-gen-rec Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 07/16] gnu: Add ocaml-dtoa Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 08/16] gnu: Add node-vlq Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 09/16] gnu: Add ocaml-flow-parser Philip McGrath
2023-11-16 20:29                   ` Liliana Marie Prikler
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 10/16] gnu: Add node-flow-parser Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 11/16] gnu: Add flow-remove-types Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 12/16] gnu: js-commander: Update to 11.1.0 Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 13/16] gnu: js-commander: Install as a node module Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 14/16] gnu: Add mftrace Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 15/16] gnu: Add font-katex Philip McGrath
2023-11-16 19:15                 ` [bug#67019] [PATCH v2 16/16] gnu: Add katex Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 04/16] gnu: Add ocaml-wtf8 Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 05/16] gnu: Add ocaml-visitors Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 06/16] gnu: Add ocaml-ppx-gen-rec Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 07/16] gnu: Add ocaml-dtoa Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 08/16] gnu: Add node-vlq Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 09/16] gnu: Add ocaml-flow-parser Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 10/16] gnu: Add node-flow-parser Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 11/16] gnu: Add flow-remove-types Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 12/16] gnu: js-commander: Update to 11.1.0 Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 13/16] gnu: js-commander: Install as a node module Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 14/16] gnu: Add mftrace Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 15/16] gnu: Add font-katex Philip McGrath
2023-11-09 16:26 ` [bug#67019] [PATCH 16/16] gnu: Add katex Philip McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9daf928c3989a207159dd6f53b531be65e7bae64.1700161584.git.philip@philipmcgrath.com \
    --to=philip@philipmcgrath.com \
    --cc=67019@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.