[PATCH 00/44] Node : a solution for tiny packages.

  • Open
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
Blocked by
N
N
Nicolas Graves wrote on 6 Feb 00:06 +0100
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20240205231557.22629-1-ngraves@ngraves.fr
This patch series introduces a solution for tiny packages. Instead of
writing packages, we can simply rely on the javascript code that is
behind such a package. Introduce two helpers to allow this.

Based on these two helpers, package all propagated direct dependencies
of the deep-equal package. This is a good choice both for illustrating
this solution and for further Node packages, a lot of which rely on
this intermediate package.

This patch series depends on 66180.

Nicolas Graves (44):
guix: build-system: node: Add node-trivial-package helper.
guix: build-system: node: Add node-is-type-object helper.
gnu: Add node-function-bind.
gnu: Add node-has-proto.
gnu: Add node-has.
gnu: Add node-has-symbols.
gnu: Add node-has-tostringtag.
gnu: Add node-is-callable.
gnu: Add node-get-intrinsic.
gnu: Add node-is-symbol.
gnu: Add node-for-each.
gnu: Add node-available-typed-arrays.
gnu: Add node-gopd.
gnu: Add node-call-bind.
gnu: Add node-object-inspect.
gnu: Add node-is-regex.
gnu: Add node-which-typed-array.
gnu: Add node-side-channel.
gnu: Add node-is-weakmap.
gnu: Add node-is-weakset.
gnu: Add node-is-typed-array.
gnu: Add node-is-shared-array-buffer.
gnu: Add node-internal-slot.
gnu: Add node-is-array-buffer.
gnu: Add node-define-properties.
gnu: Add node-is-arguments.
gnu: Add node-isarray.
gnu: Add node-stop-iteration-iterator.
gnu: Add node-is-map.
gnu: Add node-is-set.
gnu: Add node-is-string.
gnu: Add node-is-number-object.
gnu: Add node-is-bigint.
gnu: Add node-is-boolean-object.
gnu: Add node-object-is.
gnu: Add node-es-get-iterator.
gnu: Add node-which-boxed-primitive.
gnu: Add node-which-collection.
gnu: Add node-array-buffer-byte-length.
gnu: Add node-is-date-object.
gnu: Add node-object-assign.
gnu: Add node-object-keys.
gnu: Add node-regexp-prototype-flags.
gnu: Add node-deep-equal.

gnu/packages/node-xyz.scm | 1123 +++++++++++++++++++++++++++++++++++-
guix/build-system/node.scm | 66 ++-
2 files changed, 1187 insertions(+), 2 deletions(-)

--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 02/44] guix: build-system: node: Add node-is-type-object helper.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-2-ngraves@ngraves.fr
* guix/build-system/node.scm (node-is-type-object): Add function.

Change-Id: I7027aff3b314cd999798afd8c11dc90ef7c6e43c
---
guix/build-system/node.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (29 lines)
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 8a903b4fe5..b52b8f4f3e 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -35,8 +35,22 @@ (define-module (guix build-system node)
node-build
node-build-system
+ node-is-type-object
node-trivial-package))
+(define* (node-is-type-object type #:optional (type-exists? #t))
+ "Helper for node packages replacement. This is actual code factorized from
+the packages it replaces, use with caution. It doesn't apply to all
+javascript types."
+ (string-append
+ "function(value) {"
+ (if type-exists?
+ (string-append
+ "if (typeof value === '" (string-downcase type) "') {return true;} ")
+ "")
+ "if (value === null || typeof value !== 'object') {return false;}
+ return Object.prototype.toString.call(value) === '[object " type "]';}"))
+
(define* (node-trivial-package node-name version replacement description
#:key (propagated-inputs '())
(mozilla-doclink #f) ;maybe-string
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 01/44] guix: build-system: node: Add node-trivial-package helper.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-1-ngraves@ngraves.fr
* guix/build-system/node.scm (node-trivial-package): Add function.

Change-Id: I618750ebb3a9f9c4ec4f22256541cfbdfbf4388a
---
gnu/packages/node-xyz.scm | 2 +-
guix/build-system/node.scm | 52 +++++++++++++++++++++++++++++++++++++-
2 files changed, 52 insertions(+), 2 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d68f730b77..36fa575049 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
-;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022, 2023, 2024 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2023 Jelle Licht <jlicht@fsfe.org>
;;;
;;; This file is part of GNU Guix.
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 3f73390809..8a903b4fe5 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -29,9 +29,59 @@ (define-module (guix build-system node)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
+ #:use-module ((guix licenses) #:prefix license:)
#:export (%node-build-system-modules
node-build
- node-build-system))
+ node-build-system
+
+ node-trivial-package))
+
+(define* (node-trivial-package node-name version replacement description
+ #:key (propagated-inputs '())
+ (mozilla-doclink #f) ;maybe-string
+ (shams #f))
+ "This helper makes it easy to replace a cumbersome npm package by the
+underlying javascript code. This is also useful to cut down the Node
+dependency tree for some cumbersome polyfills that all current web browsers
+already support."
+ (package
+ (name (string-append "node-"
+ (string-join (string-split node-name #\.) "-")))
+ (version (format #f "~a" version))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:builder
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((dir (string-append #$output "/lib/node_modules/" #$node-name)))
+ (mkdir-p dir)
+ (with-output-to-file (string-append dir "/index.js")
+ (lambda _
+ (format #t "module.exports = ~a\n" #$replacement)))
+ (when #$shams
+ (copy-file (string-append dir "/index.js")
+ (string-append dir "/shams.js")))
+ (with-output-to-file (string-append dir "/package.json")
+ (lambda _
+ (format #t "{\"name\":~s~a}\n" #$node-name
+ (if #$shams
+ "\
+,\"exports\":{\".\":\"./index.js\",\"./shams\":\"./shams.js\"}"
+ "")))))))))
+ (propagated-inputs propagated-inputs)
+ (home-page
+ (if mozilla-doclink
+ (string-append
+ "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/"
+ mozilla-doclink "#browser_compatibility")
+ ""))
+ (synopsis (string-append "Replacement for npm package " name))
+ (description description)
+ (license license:gpl3+)))
(define %node-build-system-modules
;; Build-side modules imported by default.
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 03/44] gnu: Add node-function-bind.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-3-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-function-bind): New variable.
---
gnu/packages/node-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 36fa575049..a8607bd8b4 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -459,6 +459,38 @@ (define-public node-file-uri-to-path
suitable for use with the @code{fs} module functions.")
(license license:expat)))
+(define-public node-function-bind
+ (package
+ (name "node-function-bind")
+ (version "1.1.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Raynos/function-bind")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "19dcz6b3xs4hfxmjzr6b52r0rj3yziw8spzq4xpwnmggwyks7nm6"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "covert"
+ "eslint"
+ "jscs"
+ "tape")))))
+ #:tests? #f))
+ (home-page "https://github.com/Raynos/function-bind")
+ (synopsis "Implementation of function.prototype.bind")
+ (description "This package provides a robust implementation of the
+Function.prototype.bind Javascript function.")
+ (license license:expat)))
+
(define-public node-global-gradle-clean
(package
(name "node-global-gradle-clean")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 04/44] gnu: Add node-has-proto.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-4-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has-proto): New variable.

Change-Id: I4ce9dd80755207088b00121c2ea9f6bcb4761817
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index a8607bd8b4..31eee4e9fe 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -515,6 +515,13 @@ (define-public node-global-gradle-clean
clean task of each project.")
(license license:expat)))
+(define-public node-has-proto
+ (node-trivial-package
+ "has-proto" 0 "() => true"
+ "This package returns true in Javascript because web browsers implement
+Object prototypes."
+ #:mozilla-doclink "Global_Objects/Object/getPrototypeOf"))
+
(define-public node-ieee754
(package
(name "node-ieee754")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 06/44] gnu: Add node-has-symbols.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-6-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has-symbols): New variable.

Change-Id: I70c587929317c06fc01053a42b881bbc7002565d
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index f4a10a7638..af49151e73 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -531,6 +531,13 @@ (define-public node-has-proto
Object prototypes."
#:mozilla-doclink "Global_Objects/Object/getPrototypeOf"))
+(define-public node-has-symbols
+ (node-trivial-package
+ "has-symbols" 0 "() => true"
+ "This package returns true in Javascript because web browsers implement
+symbols."
+ #:mozilla-doclink "Global_Objects/Symbol"))
+
(define-public node-ieee754
(package
(name "node-ieee754")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 05/44] gnu: Add node-has.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-5-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has): New variable.

Change-Id: I9e890eaecc13c3d9c67a89f5e93f449473dcbe62
---
gnu/packages/node-xyz.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 31eee4e9fe..f4a10a7638 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -515,6 +515,15 @@ (define-public node-global-gradle-clean
clean task of each project.")
(license license:expat)))
+(define-public node-has
+ (node-trivial-package
+ "has" 0
+ "(obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)"
+ "This package returns a Javascript function that returns a boolean
+indicating whether this object has the specified property as its own property
+(as opposed to inheriting it)."
+ #:mozilla-doclink "Global_Objects/Object/hasOwnProperty"))
+
(define-public node-has-proto
(node-trivial-package
"has-proto" 0 "() => true"
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 07/44] gnu: Add node-has-tostringtag.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-7-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has-tostringtag): New variable.

Change-Id: Ifd2f0a13b76195ad9482501b02cec779df40a848
---
gnu/packages/node-xyz.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index af49151e73..d2ef624082 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -538,6 +538,15 @@ (define-public node-has-symbols
symbols."
#:mozilla-doclink "Global_Objects/Symbol"))
+(define-public node-has-tostringtag
+ (node-trivial-package
+ "has-tostringtag" 0
+ "() => typeof Symbol.toStringTag === 'symbol';"
+ "This package provides a Javascript function that checks if the
+@code{@@toStringTag} symbol is available."
+ #:mozilla-doclink "Global_Objects/Symbol/toStringTag"
+ #:shams #t))
+
(define-public node-ieee754
(package
(name "node-ieee754")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 08/44] gnu: Add node-is-callable.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-8-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-callable): New variable.
---
gnu/packages/node-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d2ef624082..896f9f058d 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -662,6 +662,51 @@ (define-public node-irc
It has functions for joining, parting, talking, and many other IRC commands.")
(license license:gpl3+)))
+(define-public node-is-callable
+ (package
+ (name "node-is-callable")
+ (version "1.2.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-callable")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0syzhiw9k1ync27avrpbz5vznz2yj2n4i2z4ypylv53flzar9hk6"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "eclint"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "has-tostringtag"
+ "make-arrow-function"
+ "make-async-function"
+ "make-generator-function"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "rimraf"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-callable")
+ (synopsis "Javascript predicate to identify if value is callable")
+ (description "This package provides a Javascript function to identify if a
+value is callable.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 09/44] gnu: Add node-get-intrinsic.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-9-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-get-intrinsic): New variable.
---
gnu/packages/node-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 896f9f058d..c6e7cac861 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -491,6 +491,54 @@ (define-public node-function-bind
Function.prototype.bind Javascript function.")
(license license:expat)))
+(define-public node-get-intrinsic
+ (package
+ (name "node-get-intrinsic")
+ (version "1.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/get-intrinsic")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1b0h8n8azb6m1bc0lwmqm3lf2pzcplvngnsb3mfjybvkpc20ybmi"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "call-bind"
+ "es-abstract"
+ "es-value-fixtures"
+ "eslint"
+ "evalmd"
+ "for-each"
+ "gopd"
+ "make-async-function"
+ "make-async-generator-function"
+ "make-generator-function"
+ "mock-property"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-function-bind node-has node-has-symbols node-has-proto))
+ (home-page "https://github.com/ljharb/get-intrinsic")
+ (synopsis "Javascript symbol support predicate function")
+ (description "This package provides a Javascript function to get and
+robustly cache all language-level intrinsics at first require time.")
+ (license license:expat)))
+
(define-public node-global-gradle-clean
(package
(name "node-global-gradle-clean")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 10/44] gnu: Add node-is-symbol.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-10-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-symbol): New variable.
---
gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index c6e7cac861..facbeb6a75 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -755,6 +755,45 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-symbol
+ (package
+ (name "node-is-symbol")
+ (version "1.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-symbol")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0lx6ym8y7wq3r1mzg6gbnpkd2dmprmylj14v1r6dj3sb8430kwps"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "has-tostringtag"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs (list node-has-symbols))
+ (home-page "https://github.com/inspect-js/is-symbol")
+ (synopsis "Javascript predicate to identify if value is a symbol")
+ (description "This package provides a Javascript function to identify if a
+value is a @code{Symbol}.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:18 +0100
[PATCH 11/44] gnu: Add node-for-each.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-11-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-for-each): New variable.
---
gnu/packages/node-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index facbeb6a75..14657a33b2 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -459,6 +459,39 @@ (define-public node-file-uri-to-path
suitable for use with the @code{fs} module functions.")
(license license:expat)))
+(define-public node-for-each
+ (package
+ (name "node-for-each")
+ (version "0.3.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Raynos/for-each")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0c28lq995xr3anf407zizdh8z18pag6ww8fm95yxl8m1sdfljya7"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "eslint"
+ "nsp"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs (list node-is-callable))
+ (home-page "https://github.com/Raynos/for-each")
+ (synopsis "Alternative implementation of the forEach Javascript function")
+ (description "This package provides an alternative implementation of the
+forEach Javascript function, which works not only on
+@code{Array.prototype.forEach} but also on objects.")
+ (license license:expat)))
+
(define-public node-function-bind
(package
(name "node-function-bind")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 12/44] gnu: Add node-available-typed-arrays.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-12-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-available-typed-arrays): New variable.
---
gnu/packages/node-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 14657a33b2..50dc7641e1 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -193,6 +193,44 @@ (define new-test-script
ABI-stable across Node.js major versions.")
(license license:expat)))
+(define-public node-available-typed-arrays
+ (package
+ (name "node-available-typed-arrays")
+ (version "1.0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/available-typed-arrays")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qvs30h8q785ma719232ckzpfqn10f36mxqfxs8c8ipzbwyxjxm6"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "array.prototype.every"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "evalmd"
+ "isarray"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/available-typed-arrays")
+ (synopsis "Returns Typed Array names in the current environment")
+ (description
+ "This package provides a Javascript function to return an array of Typed
+Array names that are available in the current environment.")
+ (license license:expat)))
+
(define-public node-bindings
(package
(name "node-bindings")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 13/44] gnu: Add node-gopd.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-13-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-gopd): New variable.

Change-Id: I314f4ff187cc7feba6d1b473ea24e7544bb2b424
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 50dc7641e1..92d1e97925 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -634,6 +634,14 @@ (define-public node-global-gradle-clean
clean task of each project.")
(license license:expat)))
+(define-public node-gopd
+ (node-trivial-package
+ "gopd" 0 "Object.getOwnPropertyDescriptor"
+ "This package provides a static method which returns an object describing
+the defines new or modify existing properties in Javascript directly on an
+object, returning the object."
+ #:mozilla-doclink "Global_Objects/Object/getOwnPropertyDescriptor"))
+
(define-public node-has
(node-trivial-package
"has" 0
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 14/44] gnu: Add node-call-bind.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-14-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-call-bind): New variable.
---
gnu/packages/node-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 92d1e97925..85fc1696c3 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -283,6 +283,42 @@ (define-public node-buffer-crc32
and fancy character sets, signed or unsigned data and has tests, for Node.")
(license license:expat)))
+(define-public node-call-bind
+ (package
+ (name "node-call-bind")
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/call-bind")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gqv3bisi64jzfgacwsx1rbd60bkadvpbsv66xgcn6r518qjdjix"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-function-bind node-get-intrinsic))
+ (home-page "https://github.com/ljharb/call-bind")
+ (synopsis "Implementation of Javascript .call.bind")
+ (description "This package provides a robust implementation of the
+.call.bind() in Javascript.")
+ (license license:expat)))
+
(define-public node-color-name
(package
(name "node-color-name")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 15/44] gnu: Add node-object-inspect.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-15-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-inspect): New variable.
---
gnu/packages/node-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 85fc1696c3..6732a3803f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1081,6 +1081,53 @@ (define-public node-normalize-path
slashes, unless disabled.")
(license license:expat)))
+(define-public node-object-inspect
+ (package
+ (name "node-object-inspect")
+ (version "1.12.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/object-inspect")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "16bki8gvgglxldj2gw38wlyihzkbjsf6wyxaids79x9215dl07iq"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "@pkgjs/support"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "error-cause"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "functions-have-names"
+ "has-tostringtag"
+ "in-publish"
+ "jackspeak"
+ "make-arrow-function"
+ "mock-property"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "string.prototype.repeat"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/object-inspect")
+ (synopsis "String representation of objects in Javascript")
+ (description "This package provides a Javascript function to inspect
+string representations of objects in Javascript.")
+ (license license:expat)))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 17/44] gnu: Add node-which-typed-array.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-17-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-which-typed-array): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 013e0a0970..4019b8ea81 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2073,6 +2073,48 @@ (define-public node-util-deprecate
function with browser support.")
(license license:expat)))
+(define-public node-which-typed-array
+ (package
+ (name "node-which-typed-array")
+ (version "1.1.11")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/which-typed-array")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qrhihl9803hssw5ivivi29c9cvsq7mx4g9f0l2g1qij9vv9k5hy"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "in-publish"
+ "is-callable"
+ "make-arrow-function"
+ "make-generator-function"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-available-typed-arrays node-call-bind node-for-each
+ node-has-tostringtag node-gopd))
+ (home-page "https://github.com/inspect-js/which-typed-array")
+ (synopsis "Javascript symbol support predicate function")
+ (description "This package provides a Javascript function to get and
+robustly cache all language-level intrinsics at first require time.")
+ (license license:expat)))
+
(define-public node-wrappy
(package
(name "node-wrappy")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 18/44] gnu: Add node-side-channel.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-18-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-side-channel): New variable.
---
gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 4019b8ea81..f36eb3f8bd 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1834,6 +1834,45 @@ (define-public node-serialport
projects. It combines a high-level Node.js stream interface with a useful
default set of parsers and bindings.")))
+(define-public node-side-channel
+ (package
+ (name "node-side-channel")
+ (version "1.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/side-channel")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0p2p8avsh2gmr5qvws246vz8781zyc60zrkgcmww8i43drf633bw"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eclint"
+ "eslint"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic node-object-inspect))
+ (home-page "https://github.com/ljharb/side-channel")
+ (synopsis "String information about any Javascript in a side channel")
+ (description "This package provides a Javascript function to store any
+value in a side channel. It uses WeakMap if available.")
+ (license license:expat)))
+
(define-public node-sqlite3
(package
(name "node-sqlite3")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 16/44] gnu: Add node-is-regex.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-16-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-regex): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 6732a3803f..013e0a0970 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -870,6 +870,48 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-regex
+ (package
+ (name "node-is-regex")
+ (version "1.1.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-regex")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0pbjvzl20wvjj1khwrqrg3fipv8xfpm0x2raazjdn03c1s2zrvgi"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "eclint"
+ "eslint"
+ "foreach"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-has-tostringtag))
+ (home-page "https://github.com/inspect-js/is-regex")
+ (synopsis "Javascript predicate to identify if value is @code{Regex}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{Regex}.")
+ (license license:expat)))
+
(define-public node-is-symbol
(package
(name "node-is-symbol")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 19/44] gnu: Add node-is-weakmap.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-19-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-weakmap): New variable.

Change-Id: I5547ed3b6af691c69471ebc49e693bff4aad7f83
---
gnu/packages/node-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index f36eb3f8bd..78f79706eb 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -951,6 +951,47 @@ (define-public node-is-symbol
value is a @code{Symbol}.")
(license license:expat)))
+(define-public node-is-weakmap
+ (package
+ (name "node-is-weakmap")
+ (version "2.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-weakmap")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ipjqvpbqj4wi5mi4zkds9h0ywsvfammcd232dcip7mlkqpx1wx8"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-weakmap")
+ (synopsis "Javascript predicate to identify if value is @code{WeakMap}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{WeakMap}.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 20/44] gnu: Add node-is-weakset.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-20-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-weakset): New variable.

Change-Id: Id50f6d1e5bd0087994cc47fa8ee7ecb8fcee5b81
---
gnu/packages/node-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 78f79706eb..d423281103 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -992,6 +992,49 @@ (define-public node-is-weakmap
value is a JS @code{WeakMap}.")
(license license:expat)))
+(define-public node-is-weakset
+ (package
+ (name "node-is-weakset")
+ (version "2.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-weakset")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ccsv965v76l27922d17j6dwhrbpghxb4hizca7b9yclp6rxig96"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic))
+ (home-page "https://github.com/inspect-js/is-weakset")
+ (synopsis "Javascript predicate to identify if value is @code{WeakSet}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{WeakSet}.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 21/44] gnu: Add node-is-typed-array.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-21-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-typed-array): New variable.

Change-Id: I9e8b8cadae5f9fd1034e894dfdf39907c9fc2860
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d423281103..785e3a8844 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2238,6 +2238,14 @@ (define-public node-which-typed-array
robustly cache all language-level intrinsics at first require time.")
(license license:expat)))
+(define-public node-is-typed-array
+ (node-trivial-package
+ "is-typed-array" 0 "(value) => !!whichTypedArray(value)"
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{TypedArray} object."
+ #:mozilla-doclink "Global_Objects/TypedArray"
+ #:propagated-inputs (list node-which-typed-array)))
+
(define-public node-wrappy
(package
(name "node-wrappy")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 22/44] gnu: Add node-is-shared-array-buffer.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-22-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-shared-array-buffer): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 785e3a8844..0d1a146c97 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -912,6 +912,48 @@ (define-public node-is-regex
value is a JS @code{Regex}.")
(license license:expat)))
+(define-public node-is-shared-array-buffer
+ (package
+ (name "node-is-shared-array-buffer")
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-shared-array-buffer")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0k9lmmxfnh2kjfp884jyvnyncl0g0q4ywlxvp2jqpvbp6rdfjlaf"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind))
+ (home-page "https://github.com/inspect-js/is-shared-array-buffer")
+ (synopsis "Javascript predicate to identify @code{SharedArrayBuffer}")
+ (description "This package provides a function to identify if a value is
+Javascript @code{SharedArrayBuffer}.")
+ (license license:expat)))
+
(define-public node-is-symbol
(package
(name "node-is-symbol")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 23/44] gnu: Add node-internal-slot.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-23-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-internal-slot): New variable.
---
gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 0d1a146c97..888b311bdf 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -766,6 +766,45 @@ (define-public node-inherits
defaulting to Node's implementation otherwise.")
(license license:isc)))
+(define-public node-internal-slot
+ (package
+ (name "node-internal-slot")
+ (version "1.0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/internal-slot")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kjww0x09c3n6lzxp22ilq0c5xfpwvd0gj0wzs734qxj9yafb995"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "for-each"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-has node-get-intrinsic node-side-channel))
+ (home-page "https://github.com/ljharb/internal-slot")
+ (synopsis "Private storage in Javascript")
+ (description "This package provides a Javascript function to store private
+data. This function matches the Javascript concept of internal slots.")
+ (license license:expat)))
+
(define-public node-irc-colors
(package
(name "node-irc-colors")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 24/44] gnu: Add node-is-array-buffer.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-24-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-array-buffer): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 888b311bdf..1a7058bfea 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -864,6 +864,48 @@ (define-public node-irc
It has functions for joining, parting, talking, and many other IRC commands.")
(license license:gpl3+)))
+(define-public node-is-array-buffer
+ (package
+ (name "node-is-array-buffer")
+ (version "3.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-array-buffer")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1f8pa8vgdizfmmv929zjywn9kac7h5aqv6fvvfhq6f0my6p3zwm1"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic node-is-typed-array))
+ (home-page "https://github.com/inspect-js/is-array-buffer")
+ (synopsis "Javascript predicate to identify @code{ArrayBuffer}")
+ (description "This package provides a function to identify if a value is
+Javascript @code{ArrayBuffer}.")
+ (license license:expat)))
+
(define-public node-is-callable
(package
(name "node-is-callable")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 26/44] gnu: Add node-is-arguments.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-26-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-arguments): New variable.

Change-Id: I1b0ad89cad5f23c66e3d316ee9857082cfc19c34
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 3055285f94..197b103d5d 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -871,6 +871,14 @@ (define-public node-irc
It has functions for joining, parting, talking, and many other IRC commands.")
(license license:gpl3+)))
+(define-public node-is-arguments
+ (node-trivial-package
+ "is-arguments" 0
+ "(value) => Object.prototype.toString.call(value) === '[object Arguments]'"
+ "This package provides a Javascript static method that determines whether
+the passed value is an @code{Arguments} object."
+ #:mozilla-doclink "Functions/arguments"))
+
(define-public node-is-array-buffer
(package
(name "node-is-array-buffer")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 27/44] gnu: Add node-isarray.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-27-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-isarray): New variable.

Change-Id: Ib17527f754ba4ba0a3cf446926ea039058b55167
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 197b103d5d..045ecfe139 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -879,6 +879,13 @@ (define-public node-is-arguments
the passed value is an @code{Arguments} object."
#:mozilla-doclink "Functions/arguments"))
+(define-public node-isarray
+ (node-trivial-package
+ "isarray" 0 "Array.isArray"
+ "This package provides a Javascript static method that determines whether
+the passed value is an Array."
+ #:mozilla-doclink "Global_Objects/Array/isArray"))
+
(define-public node-is-array-buffer
(package
(name "node-is-array-buffer")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 28/44] gnu: Add node-stop-iteration-iterator.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-28-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-stop-iteration-iterator): New variable.
---
gnu/packages/node-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 045ecfe139..c58f10e483 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2286,6 +2286,43 @@ (define-public node-statsd-parser
protocol used in @code{node-lynx}.")
(license license:asl2.0)))
+(define-public node-stop-iteration-iterator
+ (package
+ (name "node-stop-iteration-iterator")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/stop-iteration-iterator")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kxwa74y1qb67r80s2pmys6zv1w44f5b20ys8s9b79nij83r88sl"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-internal-slot))
+ (home-page "https://github.com/ljharb/stop-iteration-iterator")
+ (synopsis "Throw @code{StopIteration} when iterator is done in Javascript")
+ (description "This package provides a Javascript function for iterators to
+throw a @code{StopIteration} object to indicate when they are done.")
+ (license license:expat)))
+
(define-public node-string-decoder
(package
(name "node-string-decoder")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 29/44] gnu: Add node-is-map.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-29-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-map): New variable.
---
gnu/packages/node-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index c58f10e483..1d947db139 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -973,6 +973,47 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-map
+ (package
+ (name "node-is-map")
+ (version "2.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-map")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0v14r759b6nhqawy5qlm40y84aa3zyy9bk70309779z0v1x8kmi3"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-map")
+ (synopsis "Javascript predicate to identify if value is @code{Map}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{Map}.")
+ (license license:expat)))
+
(define-public node-is-regex
(package
(name "node-is-regex")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 30/44] gnu: Add node-is-set.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-30-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-set): New variable.
---
gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 1d947db139..a6b8a941e5 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1056,6 +1056,46 @@ (define-public node-is-regex
value is a JS @code{Regex}.")
(license license:expat)))
+(define-public node-is-set
+ (package
+ (name "node-is-set")
+ (version "2.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-set")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17rvssmd5rdlw6yqdzpqm98r0dk099sc9b9zkpz546ldfxr4kdbs"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-set")
+ (synopsis "Javascript predicate to identify if value is @code{Set}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{Set}.")
+ (license license:expat)))
+
(define-public node-is-shared-array-buffer
(package
(name "node-is-shared-array-buffer")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 31/44] gnu: Add node-is-string.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-31-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-string): New variable.

Change-Id: I6c0d737ae379d5ae12d8336b6727e0c795832096
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index a6b8a941e5..0cdd832c42 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1138,6 +1138,13 @@ (define-public node-is-shared-array-buffer
Javascript @code{SharedArrayBuffer}.")
(license license:expat)))
+(define-public node-is-string
+ (node-trivial-package
+ "is-string" 0 (node-is-type-object "String")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{String} object."
+ #:mozilla-doclink "Global_Objects/String"))
+
(define-public node-is-symbol
(package
(name "node-is-symbol")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 32/44] gnu: Add node-is-number-object.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-32-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-number-object): New variable.

Change-Id: I87b5712043dab275e7a3e8b3855b7108f9e0bf30
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 0cdd832c42..52f6589f9d 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1014,6 +1014,13 @@ (define-public node-is-map
value is a JS @code{Map}.")
(license license:expat)))
+(define-public node-is-number-object
+ (node-trivial-package
+ "is-number-object" 0 (node-is-type-object "Number")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Number} object."
+ #:mozilla-doclink "Global_Objects/Number"))
+
(define-public node-is-regex
(package
(name "node-is-regex")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 25/44] gnu: Add node-define-properties.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-25-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-define-properties): New variable.

Change-Id: I611616595145e9c5b73bd3bad1b3a534797091b0
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 1a7058bfea..3055285f94 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -425,6 +425,13 @@ (define-public node-debug
a more fine-grained manner by binding the @env{DEBUG} variable.")
(license license:expat)))
+(define-public node-define-properties
+ (node-trivial-package
+ "define-properties" 0 "Object.defineProperties"
+ "This package provides a static method which defines new or modify existing
+properties in Javascript directly on an object, returning the object."
+ #:mozilla-doclink "Global_Objects/Object/defineProperties"))
+
(define-public node-env-variable
(package
(name "node-env-variable")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 33/44] gnu: Add node-is-bigint.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-33-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-bigint): New variable.

Change-Id: I1ab516916b6968e77fab39eb206b4ec8905221c0
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 52f6589f9d..b32aab1254 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -928,6 +928,13 @@ (define-public node-is-array-buffer
Javascript @code{ArrayBuffer}.")
(license license:expat)))
+(define-public node-is-bigint
+ (node-trivial-package
+ "is-bigint" 0 (node-is-type-object "BigInt")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Bigint} object."
+ #:mozilla-doclink "Global_Objects/BigInt"))
+
(define-public node-is-callable
(package
(name "node-is-callable")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 34/44] gnu: Add node-is-boolean-object.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-34-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-boolean-object): New variable.

Change-Id: If3dd7bde4b3e91649ab90aede3455698b2f0eb86
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index b32aab1254..f2f53430a1 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -935,6 +935,13 @@ (define-public node-is-bigint
the passed value is a @code{Bigint} object."
#:mozilla-doclink "Global_Objects/BigInt"))
+(define-public node-is-boolean-object
+ (node-trivial-package
+ "is-boolean-object" 0 (node-is-type-object "Boolean")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Boolean} object."
+ #:mozilla-doclink "Global_Objects/Boolean"))
+
(define-public node-is-callable
(package
(name "node-is-callable")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 35/44] gnu: Add node-object-is.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-35-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-is): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index f2f53430a1..a1be047082 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1508,6 +1508,48 @@ (define-public node-object-inspect
string representations of objects in Javascript.")
(license license:expat)))
+(define-public node-object-is
+ (package
+ (name "node-object-is")
+ (version "1.1.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/es-shims/object-is")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dcl5164jv8jvkf75im58zri2ryvbwa1r53z3mccbrd5i9biz1vw"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@es-shims/api"
+ "@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "functions-have-names"
+ "has-symbols"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-define-properties))
+ (home-page "https://github.com/es-shims/object-is")
+ (synopsis "Javascript alternative for the @code{Object.is} shim")
+ (description "This package provides a Javascript @code{Object.is} shim,
+but that can differentiate between @code{-0} and @code{+0} and can compare to
+@code{NaN}.")
+ (license license:expat)))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 36/44] gnu: Add node-es-get-iterator.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-36-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-es-get-iterator): New variable.
---
gnu/packages/node-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index a1be047082..5a85e70e45 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -455,6 +455,51 @@ (define-public node-env-variable
@code{localStorage} fallbacks.")
(license license:expat)))
+(define-public node-es-get-iterator
+ (package
+ (name "node-es-get-iterator")
+ (version "1.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/es-get-iterator")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dbi90k1zs818hh4hsyj6vryjkpkxj4aw3id9rp5mvq9cp4jazp0"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "has-bigints"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic node-is-map node-is-set
+ node-stop-iteration-iterator node-has-symbols node-is-arguments
+ node-is-string node-isarray))
+ (home-page "https://github.com/ljharb/es-get-iterator")
+ (synopsis "Get an iterator for any Javascript language value")
+ (description "This package provides a Javascript function to get iterator
+for any language value. This package works robustly accross all environments.")
+ (license license:expat)))
+
(define-public node-far
(package
(name "node-far")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 37/44] gnu: Add node-which-boxed-primitive.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-37-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-which-boxed-primitive): New variable.
---
gnu/packages/node-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 5a85e70e45..15eec6c509 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2574,6 +2574,47 @@ (define-public node-util-deprecate
function with browser support.")
(license license:expat)))
+(define-public node-which-boxed-primitive
+ (package
+ (name "node-which-boxed-primitive")
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/which-boxed-primitive")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "10gns1ljcq87bp1rgd0h21hzl8advyadwxd87f48l4fr0clz9y0z"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "has-symbols"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-is-symbol node-is-bigint node-is-boolean-object
+ node-is-number-object node-is-string))
+ (home-page "https://github.com/inspect-js/which-boxed-primitive")
+ (synopsis "Javascript function to determine which boxed primitive it is")
+ (description "This package provides a Javascript function to determine
+which kind of boxed primitive the value given is.")
+ (license license:expat)))
+
(define-public node-which-typed-array
(package
(name "node-which-typed-array")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 38/44] gnu: Add node-which-collection.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-38-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-which-collection): New variable.
---
gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 15eec6c509..1d6d7b4f77 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2615,6 +2615,46 @@ (define-public node-which-boxed-primitive
which kind of boxed primitive the value given is.")
(license license:expat)))
+(define-public node-which-collection
+ (package
+ (name "node-which-collection")
+ (version "1.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/which-collection")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ba67862jp4c9d9444ignzp7aavdivdbzqy3x8mbzlvqji6makqh"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-is-map node-is-set node-is-weakmap node-is-weakset))
+ (home-page "https://github.com/inspect-js/which-collection")
+ (synopsis "Javascript function to determine which collection it is")
+ (description "This package provides a Javascript function to determine
+which kind of collection the value given is.")
+ (license license:expat)))
+
(define-public node-which-typed-array
(package
(name "node-which-typed-array")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 39/44] gnu: Add node-array-buffer-byte-length.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-39-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-array-buffer-byte-length): New variable.

Change-Id: I8bd8ccf95e90208dbd01e09743114b88bec02a3a
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 1d6d7b4f77..56cb4bfc51 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -193,6 +193,14 @@ (define new-test-script
ABI-stable across Node.js major versions.")
(license license:expat)))
+(define-public node-array-buffer-byte-length
+ (node-trivial-package
+ "array-buffer-byte-length" 0
+ "(aBfr) => (aBfr instanceof ArrayBuffer ? aBfr.byteLength : NaN)"
+ "This package provides a function which returns the length (in bytes) of an
+ArrayBuffer in Javascript."
+ #:mozilla-doclink "/Global_Objects/ArrayBuffer/byteLength"))
+
(define-public node-available-typed-arrays
(package
(name "node-available-typed-arrays")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 40/44] gnu: Add node-is-date-object.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-40-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-date-object): New variable.

Change-Id: I34c27bd57092cd7696e33a63e218ce02667dd08b
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 56cb4bfc51..fd122c9550 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1040,6 +1040,13 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-date-object
+ (node-trivial-package
+ "is-date-object" 0 (node-is-type-object "Date" #f)
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Date} object."
+ #:mozilla-doclink "Global_Objects/Date"))
+
(define-public node-is-map
(package
(name "node-is-map")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 41/44] gnu: Add node-object-assign.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-41-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-assign): New variable.

Change-Id: If3b0507bd849a586d0707fdfeddc2d976a14b6c4
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index fd122c9550..08dc8cbbba 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1610,6 +1610,14 @@ (define-public node-object-is
@code{NaN}.")
(license license:expat)))
+(define-public node-object-assign
+ (node-trivial-package
+ "object.assign" 0 "Object.assign"
+ "This package provides a Javascript static method that copies all
+enumerable own properties from one or more source objects to a target object.
+It returns he modified target object."
+ #:mozilla-doclink "Global_Objects/Object/assign"))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 42/44] gnu: Add node-object-keys.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-42-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-keys): New variable.

Change-Id: I7137d80668f57e1d2dbde5031770e7a14f5dbf16
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 08dc8cbbba..da27cf3e5e 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1618,6 +1618,13 @@ (define-public node-object-assign
It returns he modified target object."
#:mozilla-doclink "Global_Objects/Object/assign"))
+(define-public node-object-keys
+ (node-trivial-package
+ "object-keys" 0 "Object.keys"
+ "This package provides a Javascript static method that returns an array of
+a given object own's enumerable string-keyed property names."
+ #:mozilla-doclink "Global_Objects/Object/keys"))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 43/44] gnu: Add node-regexp-prototype-flags.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-43-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-regexp-prototype-flags): New variable.

Change-Id: I8fcd23f526da33443a2932d277729050fc1a8c2b
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index da27cf3e5e..ccabed4bea 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1824,6 +1824,13 @@ (define-public node-readable-stream
that behaves the same across different versions.")
(license license:expat)))
+(define-public node-regexp-prototype-flags
+ (node-trivial-package
+ "regexp.prototype.flags" 0 "RegExp.prototype.flags"
+ "This package provides a Javascript static method that returns the flags of
+a given regular expression."
+ #:mozilla-doclink "Global_Objects/RegExp/flags"))
+
(define-public node-resolve-protobuf-schema
(package
(name "node-resolve-protobuf-schema")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:19 +0100
[PATCH 44/44] gnu: Add node-deep-equal.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240205231952.26410-44-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-deep-equal): New variable.
---
gnu/packages/node-xyz.scm | 52 +++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (65 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ccabed4bea..6766b39d56 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -440,6 +440,58 @@ (define-public node-define-properties
properties in Javascript directly on an object, returning the object."
#:mozilla-doclink "Global_Objects/Object/defineProperties"))
+(define-public node-deep-equal
+ (package
+ (name "node-deep-equal")
+ (version "2.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/node-deep-equal")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1m3kw5wzbksv76avk3zaqiyfl8y80rpygbwz8ywy1x7z5ny7n32x"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "eslint"
+ "for-each"
+ "has-proto"
+ "has-symbols"
+ "has-typed-arrays"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object.getownpropertydescriptors"
+ "safe-publish-latest"
+ "semver"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-es-get-iterator node-get-intrinsic
+ node-is-array-buffer node-is-regex node-is-shared-array-buffer
+ node-object-is node-side-channel node-which-boxed-primitive
+ node-which-collection node-which-typed-array
+ node-array-buffer-byte-length node-is-arguments
+ node-is-date-object node-is-string node-isarray
+ node-object-keys node-object-assign node-regexp-prototype-flags))
+ (home-page "https://github.com/inspect-js/node-deep-equal")
+ (synopsis "Get an iterator for any Javascript language value")
+ (description "This package provides a Javascript function to get iterator
+for any language value. This package works robustly accross all
+environments.")
+ (license license:expat)))
+
(define-public node-env-variable
(package
(name "node-env-variable")
--
2.41.0
N
N
Nicolas Graves wrote on 6 Feb 00:23 +0100
(address . control@debbugs.gnu.org)
87le7yzeat.fsf@ngraves.fr
block 68941 by 66180

--
Best regards,
Nicolas Graves
L
L
Liliana Marie Prikler wrote on 6 Feb 20:30 +0100
fc076137469d486e1c71a2e519625b0cd1b66a14.camel@gmail.com
Am Dienstag, dem 06.02.2024 um 00:18 +0100 schrieb Nicolas Graves:
Toggle quote (4 lines)
> * guix/build-system/node.scm (node-trivial-package): Add function.
>
> Change-Id: I618750ebb3a9f9c4ec4f22256541cfbdfbf4388a
> ---
I'd name that "trivial-node-package" instead.

Cheers
L
L
Liliana Marie Prikler wrote on 6 Feb 20:33 +0100
Re: [PATCH 02/44] guix: build-system: node: Add node-is-type-object helper.
705eb2aeae1c89d93a3db2470dcaf0d731a7f85a.camel@gmail.com
Am Dienstag, dem 06.02.2024 um 00:18 +0100 schrieb Nicolas Graves:
Toggle quote (23 lines)
> * guix/build-system/node.scm (node-is-type-object): Add function.
>
> Change-Id: I7027aff3b314cd999798afd8c11dc90ef7c6e43c
> ---
>  guix/build-system/node.scm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
> index 8a903b4fe5..b52b8f4f3e 100644
> --- a/guix/build-system/node.scm
> +++ b/guix/build-system/node.scm
> @@ -35,8 +35,22 @@ (define-module (guix build-system node)
>              node-build
>              node-build-system
>  
> +            node-is-type-object
>              node-trivial-package))
>  
> +(define* (node-is-type-object type #:optional (type-exists? #t))
> +  "Helper for node packages replacement.  This is actual code
> factorized from
> +the packages it replaces, use with caution.  It doesn't apply to all
> +javascript types."
Which types are excluded?
Toggle quote (11 lines)
> +  (string-append
> +   "function(value) {"
> +   (if type-exists?
> +       (string-append
> +        "if (typeof value === '" (string-downcase type) "') {return
> true;} ")
> +       "")
> +   "if (value === null || typeof value !== 'object') {return false;}
> +  return Object.prototype.toString.call(value) === '[object " type
> "]';}"))
> +
I'd call this js-type-object? or perhaps make-js-type-predicate.

Cheers
N
N
Nicolas Graves wrote on 7 Feb 01:19 +0100
Re: [PATCH 01/44] guix: build-system: node: Add node-trivial-package helper.
87v871ktwm.fsf@ngraves.fr
On 2024-02-06 20:30, Liliana Marie Prikler wrote:

Toggle quote (7 lines)
> Am Dienstag, dem 06.02.2024 um 00:18 +0100 schrieb Nicolas Graves:
>> * guix/build-system/node.scm (node-trivial-package): Add function.
>>
>> Change-Id: I618750ebb3a9f9c4ec4f22256541cfbdfbf4388a
>> ---
> I'd name that "trivial-node-package" instead.

Thanks, I'll change this. WDYT otherwise? Is it a good solution?

Note that this is dependent on 66180 in debuggs ;)

Toggle quote (3 lines)
>
> Cheers

--
Best regards,
Nicolas Graves
L
L
Liliana Marie Prikler wrote on 7 Feb 06:11 +0100
cd93712b5b80b12575eca2d8d5e56080a70e1330.camel@gmail.com
Am Mittwoch, dem 07.02.2024 um 01:19 +0100 schrieb Nicolas Graves:
Toggle quote (13 lines)
> On 2024-02-06 20:30, Liliana Marie Prikler wrote:
>
> > Am Dienstag, dem 06.02.2024 um 00:18 +0100 schrieb Nicolas Graves:
> > > * guix/build-system/node.scm (node-trivial-package): Add
> > > function.
> > >
> > > Change-Id: I618750ebb3a9f9c4ec4f22256541cfbdfbf4388a
> > > ---
> > I'd name that "trivial-node-package" instead.
>
> Thanks, I'll change this. WDYT otherwise? Is it a good solution?
>
> Note that this is dependent on 66180 in debuggs ;)
I haven't looked at the entire series, but I agree with any efforts
that make the node ecosystem easier to manage. Packaging trivial JS in
this manner seems fair game to me.

Cheers
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 01/44] guix: build-system: node: Add trivial-node-package helper.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-1-ngraves@ngraves.fr
* guix/build-system/node.scm (trivial-node-package): Add function.

Change-Id: I618750ebb3a9f9c4ec4f22256541cfbdfbf4388a
---
gnu/packages/node-xyz.scm | 2 +-
guix/build-system/node.scm | 52 +++++++++++++++++++++++++++++++++++++-
2 files changed, 52 insertions(+), 2 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d68f730b77..36fa575049 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
-;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022, 2023, 2024 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2023 Jelle Licht <jlicht@fsfe.org>
;;;
;;; This file is part of GNU Guix.
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 3f73390809..a16627e68c 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -29,9 +29,59 @@ (define-module (guix build-system node)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
+ #:use-module ((guix licenses) #:prefix license:)
#:export (%node-build-system-modules
node-build
- node-build-system))
+ node-build-system
+
+ trivial-node-package))
+
+(define* (trivial-node-package node-name version replacement description
+ #:key (propagated-inputs '())
+ (mozilla-doclink #f) ;maybe-string
+ (shams #f))
+ "This helper makes it easy to replace a cumbersome npm package by the
+underlying javascript code. This is also useful to cut down the Node
+dependency tree for some cumbersome polyfills that all current web browsers
+already support."
+ (package
+ (name (string-append "node-"
+ (string-join (string-split node-name #\.) "-")))
+ (version (format #f "~a" version))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:builder
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((dir (string-append #$output "/lib/node_modules/" #$node-name)))
+ (mkdir-p dir)
+ (with-output-to-file (string-append dir "/index.js")
+ (lambda _
+ (format #t "module.exports = ~a\n" #$replacement)))
+ (when #$shams
+ (copy-file (string-append dir "/index.js")
+ (string-append dir "/shams.js")))
+ (with-output-to-file (string-append dir "/package.json")
+ (lambda _
+ (format #t "{\"name\":~s~a}\n" #$node-name
+ (if #$shams
+ "\
+,\"exports\":{\".\":\"./index.js\",\"./shams\":\"./shams.js\"}"
+ "")))))))))
+ (propagated-inputs propagated-inputs)
+ (home-page
+ (if mozilla-doclink
+ (string-append
+ "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/"
+ mozilla-doclink "#browser_compatibility")
+ ""))
+ (synopsis (string-append "Replacement for npm package " name))
+ (description description)
+ (license license:gpl3+)))
(define %node-build-system-modules
;; Build-side modules imported by default.
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 02/44] guix: build-system: node: Add node-is-type-object helper.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-2-ngraves@ngraves.fr
* guix/build-system/node.scm (node-is-type-object): Add function.

Change-Id: I7027aff3b314cd999798afd8c11dc90ef7c6e43c
---
guix/build-system/node.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (29 lines)
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index a16627e68c..3f68cd3f21 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -35,8 +35,22 @@ (define-module (guix build-system node)
node-build
node-build-system
+ node-is-type-object
trivial-node-package))
+(define* (node-is-type-object type #:optional (type-exists? #t))
+ "Helper for node packages replacement. This is actual code factorized from
+the packages it replaces, use with caution. It doesn't apply to all
+javascript types."
+ (string-append
+ "function(value) {"
+ (if type-exists?
+ (string-append
+ "if (typeof value === '" (string-downcase type) "') {return true;} ")
+ "")
+ "if (value === null || typeof value !== 'object') {return false;}
+ return Object.prototype.toString.call(value) === '[object " type "]';}"))
+
(define* (trivial-node-package node-name version replacement description
#:key (propagated-inputs '())
(mozilla-doclink #f) ;maybe-string
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 03/44] gnu: Add node-function-bind.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-3-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-function-bind): New variable.
---
gnu/packages/node-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 36fa575049..a8607bd8b4 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -459,6 +459,38 @@ (define-public node-file-uri-to-path
suitable for use with the @code{fs} module functions.")
(license license:expat)))
+(define-public node-function-bind
+ (package
+ (name "node-function-bind")
+ (version "1.1.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Raynos/function-bind")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "19dcz6b3xs4hfxmjzr6b52r0rj3yziw8spzq4xpwnmggwyks7nm6"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "covert"
+ "eslint"
+ "jscs"
+ "tape")))))
+ #:tests? #f))
+ (home-page "https://github.com/Raynos/function-bind")
+ (synopsis "Implementation of function.prototype.bind")
+ (description "This package provides a robust implementation of the
+Function.prototype.bind Javascript function.")
+ (license license:expat)))
+
(define-public node-global-gradle-clean
(package
(name "node-global-gradle-clean")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 04/44] gnu: Add node-has-proto.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-4-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has-proto): New variable.

Change-Id: I4ce9dd80755207088b00121c2ea9f6bcb4761817
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index a8607bd8b4..1e930e16ed 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -515,6 +515,13 @@ (define-public node-global-gradle-clean
clean task of each project.")
(license license:expat)))
+(define-public node-has-proto
+ (trivial-node-package
+ "has-proto" 0 "() => true"
+ "This package returns true in Javascript because web browsers implement
+Object prototypes."
+ #:mozilla-doclink "Global_Objects/Object/getPrototypeOf"))
+
(define-public node-ieee754
(package
(name "node-ieee754")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 05/44] gnu: Add node-has.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-5-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has): New variable.

Change-Id: I9e890eaecc13c3d9c67a89f5e93f449473dcbe62
---
gnu/packages/node-xyz.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 1e930e16ed..eaa1959207 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -515,6 +515,15 @@ (define-public node-global-gradle-clean
clean task of each project.")
(license license:expat)))
+(define-public node-has
+ (trivial-node-package
+ "has" 0
+ "(obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)"
+ "This package returns a Javascript function that returns a boolean
+indicating whether this object has the specified property as its own property
+(as opposed to inheriting it)."
+ #:mozilla-doclink "Global_Objects/Object/hasOwnProperty"))
+
(define-public node-has-proto
(trivial-node-package
"has-proto" 0 "() => true"
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 06/44] gnu: Add node-has-symbols.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-6-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has-symbols): New variable.

Change-Id: I70c587929317c06fc01053a42b881bbc7002565d
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index eaa1959207..eda32f8118 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -531,6 +531,13 @@ (define-public node-has-proto
Object prototypes."
#:mozilla-doclink "Global_Objects/Object/getPrototypeOf"))
+(define-public node-has-symbols
+ (trivial-node-package
+ "has-symbols" 0 "() => true"
+ "This package returns true in Javascript because web browsers implement
+symbols."
+ #:mozilla-doclink "Global_Objects/Symbol"))
+
(define-public node-ieee754
(package
(name "node-ieee754")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 07/44] gnu: Add node-has-tostringtag.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-7-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-has-tostringtag): New variable.

Change-Id: Ifd2f0a13b76195ad9482501b02cec779df40a848
---
gnu/packages/node-xyz.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index eda32f8118..5d0b5a3e80 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -538,6 +538,15 @@ (define-public node-has-symbols
symbols."
#:mozilla-doclink "Global_Objects/Symbol"))
+(define-public node-has-tostringtag
+ (trivial-node-package
+ "has-tostringtag" 0
+ "() => typeof Symbol.toStringTag === 'symbol';"
+ "This package provides a Javascript function that checks if the
+@code{@@toStringTag} symbol is available."
+ #:mozilla-doclink "Global_Objects/Symbol/toStringTag"
+ #:shams #t))
+
(define-public node-ieee754
(package
(name "node-ieee754")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 09/44] gnu: Add node-get-intrinsic.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-9-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-get-intrinsic): New variable.
---
gnu/packages/node-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 367360cd24..4df1525285 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -491,6 +491,54 @@ (define-public node-function-bind
Function.prototype.bind Javascript function.")
(license license:expat)))
+(define-public node-get-intrinsic
+ (package
+ (name "node-get-intrinsic")
+ (version "1.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/get-intrinsic")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1b0h8n8azb6m1bc0lwmqm3lf2pzcplvngnsb3mfjybvkpc20ybmi"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "call-bind"
+ "es-abstract"
+ "es-value-fixtures"
+ "eslint"
+ "evalmd"
+ "for-each"
+ "gopd"
+ "make-async-function"
+ "make-async-generator-function"
+ "make-generator-function"
+ "mock-property"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-function-bind node-has node-has-symbols node-has-proto))
+ (home-page "https://github.com/ljharb/get-intrinsic")
+ (synopsis "Javascript symbol support predicate function")
+ (description "This package provides a Javascript function to get and
+robustly cache all language-level intrinsics at first require time.")
+ (license license:expat)))
+
(define-public node-global-gradle-clean
(package
(name "node-global-gradle-clean")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 08/44] gnu: Add node-is-callable.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-8-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-callable): New variable.
---
gnu/packages/node-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 5d0b5a3e80..367360cd24 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -662,6 +662,51 @@ (define-public node-irc
It has functions for joining, parting, talking, and many other IRC commands.")
(license license:gpl3+)))
+(define-public node-is-callable
+ (package
+ (name "node-is-callable")
+ (version "1.2.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-callable")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0syzhiw9k1ync27avrpbz5vznz2yj2n4i2z4ypylv53flzar9hk6"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "eclint"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "has-tostringtag"
+ "make-arrow-function"
+ "make-async-function"
+ "make-generator-function"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "rimraf"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-callable")
+ (synopsis "Javascript predicate to identify if value is callable")
+ (description "This package provides a Javascript function to identify if a
+value is callable.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 10/44] gnu: Add node-is-symbol.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-10-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-symbol): New variable.
---
gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 4df1525285..34bdc83d0a 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -755,6 +755,45 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-symbol
+ (package
+ (name "node-is-symbol")
+ (version "1.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-symbol")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0lx6ym8y7wq3r1mzg6gbnpkd2dmprmylj14v1r6dj3sb8430kwps"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "has-tostringtag"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs (list node-has-symbols))
+ (home-page "https://github.com/inspect-js/is-symbol")
+ (synopsis "Javascript predicate to identify if value is a symbol")
+ (description "This package provides a Javascript function to identify if a
+value is a @code{Symbol}.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 11/44] gnu: Add node-for-each.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-11-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-for-each): New variable.
---
gnu/packages/node-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 34bdc83d0a..fbd3cdcd67 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -459,6 +459,39 @@ (define-public node-file-uri-to-path
suitable for use with the @code{fs} module functions.")
(license license:expat)))
+(define-public node-for-each
+ (package
+ (name "node-for-each")
+ (version "0.3.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Raynos/for-each")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0c28lq995xr3anf407zizdh8z18pag6ww8fm95yxl8m1sdfljya7"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "eslint"
+ "nsp"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs (list node-is-callable))
+ (home-page "https://github.com/Raynos/for-each")
+ (synopsis "Alternative implementation of the forEach Javascript function")
+ (description "This package provides an alternative implementation of the
+forEach Javascript function, which works not only on
+@code{Array.prototype.forEach} but also on objects.")
+ (license license:expat)))
+
(define-public node-function-bind
(package
(name "node-function-bind")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 12/44] gnu: Add node-available-typed-arrays.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-12-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-available-typed-arrays): New variable.
---
gnu/packages/node-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index fbd3cdcd67..ce496caf32 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -193,6 +193,44 @@ (define new-test-script
ABI-stable across Node.js major versions.")
(license license:expat)))
+(define-public node-available-typed-arrays
+ (package
+ (name "node-available-typed-arrays")
+ (version "1.0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/available-typed-arrays")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qvs30h8q785ma719232ckzpfqn10f36mxqfxs8c8ipzbwyxjxm6"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "array.prototype.every"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "evalmd"
+ "isarray"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/available-typed-arrays")
+ (synopsis "Returns Typed Array names in the current environment")
+ (description
+ "This package provides a Javascript function to return an array of Typed
+Array names that are available in the current environment.")
+ (license license:expat)))
+
(define-public node-bindings
(package
(name "node-bindings")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 13/44] gnu: Add node-gopd.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-13-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-gopd): New variable.

Change-Id: I314f4ff187cc7feba6d1b473ea24e7544bb2b424
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ce496caf32..abfebfbae4 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -634,6 +634,14 @@ (define-public node-global-gradle-clean
clean task of each project.")
(license license:expat)))
+(define-public node-gopd
+ (trivial-node-package
+ "gopd" 0 "Object.getOwnPropertyDescriptor"
+ "This package provides a static method which returns an object describing
+the defines new or modify existing properties in Javascript directly on an
+object, returning the object."
+ #:mozilla-doclink "Global_Objects/Object/getOwnPropertyDescriptor"))
+
(define-public node-has
(trivial-node-package
"has" 0
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 14/44] gnu: Add node-call-bind.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-14-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-call-bind): New variable.
---
gnu/packages/node-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index abfebfbae4..17b9b01cbf 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -283,6 +283,42 @@ (define-public node-buffer-crc32
and fancy character sets, signed or unsigned data and has tests, for Node.")
(license license:expat)))
+(define-public node-call-bind
+ (package
+ (name "node-call-bind")
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/call-bind")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gqv3bisi64jzfgacwsx1rbd60bkadvpbsv66xgcn6r518qjdjix"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-function-bind node-get-intrinsic))
+ (home-page "https://github.com/ljharb/call-bind")
+ (synopsis "Implementation of Javascript .call.bind")
+ (description "This package provides a robust implementation of the
+.call.bind() in Javascript.")
+ (license license:expat)))
+
(define-public node-color-name
(package
(name "node-color-name")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 15/44] gnu: Add node-object-inspect.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-15-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-inspect): New variable.
---
gnu/packages/node-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 17b9b01cbf..8b2e0310a7 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1081,6 +1081,53 @@ (define-public node-normalize-path
slashes, unless disabled.")
(license license:expat)))
+(define-public node-object-inspect
+ (package
+ (name "node-object-inspect")
+ (version "1.12.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/object-inspect")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "16bki8gvgglxldj2gw38wlyihzkbjsf6wyxaids79x9215dl07iq"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "@pkgjs/support"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "error-cause"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "functions-have-names"
+ "has-tostringtag"
+ "in-publish"
+ "jackspeak"
+ "make-arrow-function"
+ "mock-property"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "string.prototype.repeat"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/object-inspect")
+ (synopsis "String representation of objects in Javascript")
+ (description "This package provides a Javascript function to inspect
+string representations of objects in Javascript.")
+ (license license:expat)))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 16/44] gnu: Add node-is-regex.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-16-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-regex): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 8b2e0310a7..6575b81be0 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -870,6 +870,48 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-regex
+ (package
+ (name "node-is-regex")
+ (version "1.1.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-regex")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0pbjvzl20wvjj1khwrqrg3fipv8xfpm0x2raazjdn03c1s2zrvgi"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "eclint"
+ "eslint"
+ "foreach"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-has-tostringtag))
+ (home-page "https://github.com/inspect-js/is-regex")
+ (synopsis "Javascript predicate to identify if value is @code{Regex}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{Regex}.")
+ (license license:expat)))
+
(define-public node-is-symbol
(package
(name "node-is-symbol")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 17/44] gnu: Add node-which-typed-array.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-17-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-which-typed-array): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 6575b81be0..232b99755f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2073,6 +2073,48 @@ (define-public node-util-deprecate
function with browser support.")
(license license:expat)))
+(define-public node-which-typed-array
+ (package
+ (name "node-which-typed-array")
+ (version "1.1.11")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/which-typed-array")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qrhihl9803hssw5ivivi29c9cvsq7mx4g9f0l2g1qij9vv9k5hy"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "in-publish"
+ "is-callable"
+ "make-arrow-function"
+ "make-generator-function"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-available-typed-arrays node-call-bind node-for-each
+ node-has-tostringtag node-gopd))
+ (home-page "https://github.com/inspect-js/which-typed-array")
+ (synopsis "Javascript symbol support predicate function")
+ (description "This package provides a Javascript function to get and
+robustly cache all language-level intrinsics at first require time.")
+ (license license:expat)))
+
(define-public node-wrappy
(package
(name "node-wrappy")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 18/44] gnu: Add node-side-channel.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-18-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-side-channel): New variable.
---
gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 232b99755f..69a6756122 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1834,6 +1834,45 @@ (define-public node-serialport
projects. It combines a high-level Node.js stream interface with a useful
default set of parsers and bindings.")))
+(define-public node-side-channel
+ (package
+ (name "node-side-channel")
+ (version "1.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/side-channel")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0p2p8avsh2gmr5qvws246vz8781zyc60zrkgcmww8i43drf633bw"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eclint"
+ "eslint"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic node-object-inspect))
+ (home-page "https://github.com/ljharb/side-channel")
+ (synopsis "String information about any Javascript in a side channel")
+ (description "This package provides a Javascript function to store any
+value in a side channel. It uses WeakMap if available.")
+ (license license:expat)))
+
(define-public node-sqlite3
(package
(name "node-sqlite3")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 20/44] gnu: Add node-is-weakset.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-20-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-weakset): New variable.

Change-Id: Id50f6d1e5bd0087994cc47fa8ee7ecb8fcee5b81
---
gnu/packages/node-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 00aa68f108..77153c187e 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -992,6 +992,49 @@ (define-public node-is-weakmap
value is a JS @code{WeakMap}.")
(license license:expat)))
+(define-public node-is-weakset
+ (package
+ (name "node-is-weakset")
+ (version "2.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-weakset")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ccsv965v76l27922d17j6dwhrbpghxb4hizca7b9yclp6rxig96"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic))
+ (home-page "https://github.com/inspect-js/is-weakset")
+ (synopsis "Javascript predicate to identify if value is @code{WeakSet}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{WeakSet}.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 19/44] gnu: Add node-is-weakmap.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-19-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-weakmap): New variable.

Change-Id: I5547ed3b6af691c69471ebc49e693bff4aad7f83
---
gnu/packages/node-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 69a6756122..00aa68f108 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -951,6 +951,47 @@ (define-public node-is-symbol
value is a @code{Symbol}.")
(license license:expat)))
+(define-public node-is-weakmap
+ (package
+ (name "node-is-weakmap")
+ (version "2.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-weakmap")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ipjqvpbqj4wi5mi4zkds9h0ywsvfammcd232dcip7mlkqpx1wx8"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-weakmap")
+ (synopsis "Javascript predicate to identify if value is @code{WeakMap}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{WeakMap}.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 21/44] gnu: Add node-is-typed-array.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-21-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-typed-array): New variable.

Change-Id: I9e8b8cadae5f9fd1034e894dfdf39907c9fc2860
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 77153c187e..01e5c5c709 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2238,6 +2238,14 @@ (define-public node-which-typed-array
robustly cache all language-level intrinsics at first require time.")
(license license:expat)))
+(define-public node-is-typed-array
+ (trivial-node-package
+ "is-typed-array" 0 "(value) => !!whichTypedArray(value)"
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{TypedArray} object."
+ #:mozilla-doclink "Global_Objects/TypedArray"
+ #:propagated-inputs (list node-which-typed-array)))
+
(define-public node-wrappy
(package
(name "node-wrappy")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 22/44] gnu: Add node-is-shared-array-buffer.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-22-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-shared-array-buffer): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 01e5c5c709..2b73c0446f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -912,6 +912,48 @@ (define-public node-is-regex
value is a JS @code{Regex}.")
(license license:expat)))
+(define-public node-is-shared-array-buffer
+ (package
+ (name "node-is-shared-array-buffer")
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-shared-array-buffer")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0k9lmmxfnh2kjfp884jyvnyncl0g0q4ywlxvp2jqpvbp6rdfjlaf"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind))
+ (home-page "https://github.com/inspect-js/is-shared-array-buffer")
+ (synopsis "Javascript predicate to identify @code{SharedArrayBuffer}")
+ (description "This package provides a function to identify if a value is
+Javascript @code{SharedArrayBuffer}.")
+ (license license:expat)))
+
(define-public node-is-symbol
(package
(name "node-is-symbol")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 24/44] gnu: Add node-is-array-buffer.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-24-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-array-buffer): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 9cd9311e07..3afca70451 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -864,6 +864,48 @@ (define-public node-irc
It has functions for joining, parting, talking, and many other IRC commands.")
(license license:gpl3+)))
+(define-public node-is-array-buffer
+ (package
+ (name "node-is-array-buffer")
+ (version "3.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-array-buffer")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1f8pa8vgdizfmmv929zjywn9kac7h5aqv6fvvfhq6f0my6p3zwm1"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "es-value-fixtures"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic node-is-typed-array))
+ (home-page "https://github.com/inspect-js/is-array-buffer")
+ (synopsis "Javascript predicate to identify @code{ArrayBuffer}")
+ (description "This package provides a function to identify if a value is
+Javascript @code{ArrayBuffer}.")
+ (license license:expat)))
+
(define-public node-is-callable
(package
(name "node-is-callable")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 23/44] gnu: Add node-internal-slot.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-23-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-internal-slot): New variable.
---
gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 2b73c0446f..9cd9311e07 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -766,6 +766,45 @@ (define-public node-inherits
defaulting to Node's implementation otherwise.")
(license license:isc)))
+(define-public node-internal-slot
+ (package
+ (name "node-internal-slot")
+ (version "1.0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/internal-slot")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kjww0x09c3n6lzxp22ilq0c5xfpwvd0gj0wzs734qxj9yafb995"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "for-each"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-has node-get-intrinsic node-side-channel))
+ (home-page "https://github.com/ljharb/internal-slot")
+ (synopsis "Private storage in Javascript")
+ (description "This package provides a Javascript function to store private
+data. This function matches the Javascript concept of internal slots.")
+ (license license:expat)))
+
(define-public node-irc-colors
(package
(name "node-irc-colors")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 25/44] gnu: Add node-define-properties.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-25-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-define-properties): New variable.

Change-Id: I611616595145e9c5b73bd3bad1b3a534797091b0
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 3afca70451..d5cfcd60d3 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -425,6 +425,13 @@ (define-public node-debug
a more fine-grained manner by binding the @env{DEBUG} variable.")
(license license:expat)))
+(define-public node-define-properties
+ (trivial-node-package
+ "define-properties" 0 "Object.defineProperties"
+ "This package provides a static method which defines new or modify existing
+properties in Javascript directly on an object, returning the object."
+ #:mozilla-doclink "Global_Objects/Object/defineProperties"))
+
(define-public node-env-variable
(package
(name "node-env-variable")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 26/44] gnu: Add node-is-arguments.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-26-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-arguments): New variable.

Change-Id: I1b0ad89cad5f23c66e3d316ee9857082cfc19c34
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d5cfcd60d3..bc32b3878b 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -871,6 +871,14 @@ (define-public node-irc
It has functions for joining, parting, talking, and many other IRC commands.")
(license license:gpl3+)))
+(define-public node-is-arguments
+ (trivial-node-package
+ "is-arguments" 0
+ "(value) => Object.prototype.toString.call(value) === '[object Arguments]'"
+ "This package provides a Javascript static method that determines whether
+the passed value is an @code{Arguments} object."
+ #:mozilla-doclink "Functions/arguments"))
+
(define-public node-is-array-buffer
(package
(name "node-is-array-buffer")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 27/44] gnu: Add node-isarray.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-27-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-isarray): New variable.

Change-Id: Ib17527f754ba4ba0a3cf446926ea039058b55167
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index bc32b3878b..5f5320a540 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -879,6 +879,13 @@ (define-public node-is-arguments
the passed value is an @code{Arguments} object."
#:mozilla-doclink "Functions/arguments"))
+(define-public node-isarray
+ (trivial-node-package
+ "isarray" 0 "Array.isArray"
+ "This package provides a Javascript static method that determines whether
+the passed value is an Array."
+ #:mozilla-doclink "Global_Objects/Array/isArray"))
+
(define-public node-is-array-buffer
(package
(name "node-is-array-buffer")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 28/44] gnu: Add node-stop-iteration-iterator.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-28-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-stop-iteration-iterator): New variable.
---
gnu/packages/node-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 5f5320a540..0829753f5f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2286,6 +2286,43 @@ (define-public node-statsd-parser
protocol used in @code{node-lynx}.")
(license license:asl2.0)))
+(define-public node-stop-iteration-iterator
+ (package
+ (name "node-stop-iteration-iterator")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/stop-iteration-iterator")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kxwa74y1qb67r80s2pmys6zv1w44f5b20ys8s9b79nij83r88sl"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-internal-slot))
+ (home-page "https://github.com/ljharb/stop-iteration-iterator")
+ (synopsis "Throw @code{StopIteration} when iterator is done in Javascript")
+ (description "This package provides a Javascript function for iterators to
+throw a @code{StopIteration} object to indicate when they are done.")
+ (license license:expat)))
+
(define-public node-string-decoder
(package
(name "node-string-decoder")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 29/44] gnu: Add node-is-map.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-29-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-map): New variable.
---
gnu/packages/node-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 0829753f5f..7aa5ad7039 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -973,6 +973,47 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-map
+ (package
+ (name "node-is-map")
+ (version "2.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-map")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0v14r759b6nhqawy5qlm40y84aa3zyy9bk70309779z0v1x8kmi3"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-map")
+ (synopsis "Javascript predicate to identify if value is @code{Map}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{Map}.")
+ (license license:expat)))
+
(define-public node-is-regex
(package
(name "node-is-regex")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 30/44] gnu: Add node-is-set.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-30-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-set): New variable.
---
gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 7aa5ad7039..cdddf756e2 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1056,6 +1056,46 @@ (define-public node-is-regex
value is a JS @code{Regex}.")
(license license:expat)))
+(define-public node-is-set
+ (package
+ (name "node-is-set")
+ (version "2.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/is-set")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17rvssmd5rdlw6yqdzpqm98r0dk099sc9b9zkpz546ldfxr4kdbs"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (home-page "https://github.com/inspect-js/is-set")
+ (synopsis "Javascript predicate to identify if value is @code{Set}")
+ (description "This package provides a Javascript function to identify if a
+value is a JS @code{Set}.")
+ (license license:expat)))
+
(define-public node-is-shared-array-buffer
(package
(name "node-is-shared-array-buffer")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 31/44] gnu: Add node-is-string.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-31-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-string): New variable.

Change-Id: I6c0d737ae379d5ae12d8336b6727e0c795832096
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index cdddf756e2..d406a3f648 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1138,6 +1138,13 @@ (define-public node-is-shared-array-buffer
Javascript @code{SharedArrayBuffer}.")
(license license:expat)))
+(define-public node-is-string
+ (trivial-node-package
+ "is-string" 0 (node-is-type-object "String")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{String} object."
+ #:mozilla-doclink "Global_Objects/String"))
+
(define-public node-is-symbol
(package
(name "node-is-symbol")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 32/44] gnu: Add node-is-number-object.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-32-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-number-object): New variable.

Change-Id: I87b5712043dab275e7a3e8b3855b7108f9e0bf30
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d406a3f648..ff9201382f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1014,6 +1014,13 @@ (define-public node-is-map
value is a JS @code{Map}.")
(license license:expat)))
+(define-public node-is-number-object
+ (trivial-node-package
+ "is-number-object" 0 (node-is-type-object "Number")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Number} object."
+ #:mozilla-doclink "Global_Objects/Number"))
+
(define-public node-is-regex
(package
(name "node-is-regex")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 33/44] gnu: Add node-is-bigint.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-33-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-bigint): New variable.

Change-Id: I1ab516916b6968e77fab39eb206b4ec8905221c0
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ff9201382f..ccd0e0c31f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -928,6 +928,13 @@ (define-public node-is-array-buffer
Javascript @code{ArrayBuffer}.")
(license license:expat)))
+(define-public node-is-bigint
+ (trivial-node-package
+ "is-bigint" 0 (node-is-type-object "BigInt")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Bigint} object."
+ #:mozilla-doclink "Global_Objects/BigInt"))
+
(define-public node-is-callable
(package
(name "node-is-callable")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 34/44] gnu: Add node-is-boolean-object.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-34-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-boolean-object): New variable.

Change-Id: If3dd7bde4b3e91649ab90aede3455698b2f0eb86
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ccd0e0c31f..6da4d52a90 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -935,6 +935,13 @@ (define-public node-is-bigint
the passed value is a @code{Bigint} object."
#:mozilla-doclink "Global_Objects/BigInt"))
+(define-public node-is-boolean-object
+ (trivial-node-package
+ "is-boolean-object" 0 (node-is-type-object "Boolean")
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Boolean} object."
+ #:mozilla-doclink "Global_Objects/Boolean"))
+
(define-public node-is-callable
(package
(name "node-is-callable")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 35/44] gnu: Add node-object-is.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-35-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-is): New variable.
---
gnu/packages/node-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 6da4d52a90..d93456e47c 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1508,6 +1508,48 @@ (define-public node-object-inspect
string representations of objects in Javascript.")
(license license:expat)))
+(define-public node-object-is
+ (package
+ (name "node-object-is")
+ (version "1.1.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/es-shims/object-is")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dcl5164jv8jvkf75im58zri2ryvbwa1r53z3mccbrd5i9biz1vw"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@es-shims/api"
+ "@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "functions-have-names"
+ "has-symbols"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-define-properties))
+ (home-page "https://github.com/es-shims/object-is")
+ (synopsis "Javascript alternative for the @code{Object.is} shim")
+ (description "This package provides a Javascript @code{Object.is} shim,
+but that can differentiate between @code{-0} and @code{+0} and can compare to
+@code{NaN}.")
+ (license license:expat)))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 37/44] gnu: Add node-which-boxed-primitive.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-37-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-which-boxed-primitive): New variable.
---
gnu/packages/node-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ca9b8f661c..664b13b56b 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2574,6 +2574,47 @@ (define-public node-util-deprecate
function with browser support.")
(license license:expat)))
+(define-public node-which-boxed-primitive
+ (package
+ (name "node-which-boxed-primitive")
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/which-boxed-primitive")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "10gns1ljcq87bp1rgd0h21hzl8advyadwxd87f48l4fr0clz9y0z"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "has-symbols"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-is-symbol node-is-bigint node-is-boolean-object
+ node-is-number-object node-is-string))
+ (home-page "https://github.com/inspect-js/which-boxed-primitive")
+ (synopsis "Javascript function to determine which boxed primitive it is")
+ (description "This package provides a Javascript function to determine
+which kind of boxed primitive the value given is.")
+ (license license:expat)))
+
(define-public node-which-typed-array
(package
(name "node-which-typed-array")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 39/44] gnu: Add node-array-buffer-byte-length.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-39-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-array-buffer-byte-length): New variable.

Change-Id: I8bd8ccf95e90208dbd01e09743114b88bec02a3a
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ff956eb51f..b2be732508 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -193,6 +193,14 @@ (define new-test-script
ABI-stable across Node.js major versions.")
(license license:expat)))
+(define-public node-array-buffer-byte-length
+ (trivial-node-package
+ "array-buffer-byte-length" 0
+ "(aBfr) => (aBfr instanceof ArrayBuffer ? aBfr.byteLength : NaN)"
+ "This package provides a function which returns the length (in bytes) of an
+ArrayBuffer in Javascript."
+ #:mozilla-doclink "/Global_Objects/ArrayBuffer/byteLength"))
+
(define-public node-available-typed-arrays
(package
(name "node-available-typed-arrays")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 38/44] gnu: Add node-which-collection.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-38-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-which-collection): New variable.
---
gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 664b13b56b..ff956eb51f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2615,6 +2615,46 @@ (define-public node-which-boxed-primitive
which kind of boxed primitive the value given is.")
(license license:expat)))
+(define-public node-which-collection
+ (package
+ (name "node-which-collection")
+ (version "1.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/which-collection")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ba67862jp4c9d9444ignzp7aavdivdbzqy3x8mbzlvqji6makqh"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "eslint"
+ "for-each"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-is-map node-is-set node-is-weakmap node-is-weakset))
+ (home-page "https://github.com/inspect-js/which-collection")
+ (synopsis "Javascript function to determine which collection it is")
+ (description "This package provides a Javascript function to determine
+which kind of collection the value given is.")
+ (license license:expat)))
+
(define-public node-which-typed-array
(package
(name "node-which-typed-array")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:24 +0100
[PATCH v2 36/44] gnu: Add node-es-get-iterator.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-36-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-es-get-iterator): New variable.
---
gnu/packages/node-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d93456e47c..ca9b8f661c 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -455,6 +455,51 @@ (define-public node-env-variable
@code{localStorage} fallbacks.")
(license license:expat)))
+(define-public node-es-get-iterator
+ (package
+ (name "node-es-get-iterator")
+ (version "1.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljharb/es-get-iterator")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dbi90k1zs818hh4hsyj6vryjkpkxj4aw3id9rp5mvq9cp4jazp0"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "core-js"
+ "es5-shim"
+ "es6-shim"
+ "eslint"
+ "for-each"
+ "has-bigints"
+ "npmignore"
+ "nyc"
+ "object-inspect"
+ "safe-publish-latest"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-get-intrinsic node-is-map node-is-set
+ node-stop-iteration-iterator node-has-symbols node-is-arguments
+ node-is-string node-isarray))
+ (home-page "https://github.com/ljharb/es-get-iterator")
+ (synopsis "Get an iterator for any Javascript language value")
+ (description "This package provides a Javascript function to get iterator
+for any language value. This package works robustly accross all environments.")
+ (license license:expat)))
+
(define-public node-far
(package
(name "node-far")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 40/44] gnu: Add node-is-date-object.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-40-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-is-date-object): New variable.

Change-Id: I34c27bd57092cd7696e33a63e218ce02667dd08b
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index b2be732508..2667244192 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1040,6 +1040,13 @@ (define-public node-is-callable
value is callable.")
(license license:expat)))
+(define-public node-is-date-object
+ (trivial-node-package
+ "is-date-object" 0 (node-is-type-object "Date" #f)
+ "This package provides a Javascript static method that determines whether
+the passed value is a @code{Date} object."
+ #:mozilla-doclink "Global_Objects/Date"))
+
(define-public node-is-map
(package
(name "node-is-map")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 41/44] gnu: Add node-object-assign.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-41-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-assign): New variable.

Change-Id: If3b0507bd849a586d0707fdfeddc2d976a14b6c4
---
gnu/packages/node-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 2667244192..7eb645df6b 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1610,6 +1610,14 @@ (define-public node-object-is
@code{NaN}.")
(license license:expat)))
+(define-public node-object-assign
+ (trivial-node-package
+ "object.assign" 0 "Object.assign"
+ "This package provides a Javascript static method that copies all
+enumerable own properties from one or more source objects to a target object.
+It returns he modified target object."
+ #:mozilla-doclink "Global_Objects/Object/assign"))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 42/44] gnu: Add node-object-keys.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-42-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-object-keys): New variable.

Change-Id: I7137d80668f57e1d2dbde5031770e7a14f5dbf16
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 7eb645df6b..afaaca7ebf 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1618,6 +1618,13 @@ (define-public node-object-assign
It returns he modified target object."
#:mozilla-doclink "Global_Objects/Object/assign"))
+(define-public node-object-keys
+ (trivial-node-package
+ "object-keys" 0 "Object.keys"
+ "This package provides a Javascript static method that returns an array of
+a given object own's enumerable string-keyed property names."
+ #:mozilla-doclink "Global_Objects/Object/keys"))
+
(define-public node-once
(package
(name "node-once")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 43/44] gnu: Add node-regexp-prototype-flags.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-43-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-regexp-prototype-flags): New variable.

Change-Id: I8fcd23f526da33443a2932d277729050fc1a8c2b
---
gnu/packages/node-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index afaaca7ebf..1623010d37 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1824,6 +1824,13 @@ (define-public node-readable-stream
that behaves the same across different versions.")
(license license:expat)))
+(define-public node-regexp-prototype-flags
+ (trivial-node-package
+ "regexp.prototype.flags" 0 "RegExp.prototype.flags"
+ "This package provides a Javascript static method that returns the flags of
+a given regular expression."
+ #:mozilla-doclink "Global_Objects/RegExp/flags"))
+
(define-public node-resolve-protobuf-schema
(package
(name "node-resolve-protobuf-schema")
--
2.41.0
N
N
Nicolas Graves wrote on 8 Feb 01:25 +0100
[PATCH v2 44/44] gnu: Add node-deep-equal.
(address . 68941@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240208002527.27165-44-ngraves@ngraves.fr
* gnu/packages/node-xyz.scm (node-deep-equal): New variable.
---
gnu/packages/node-xyz.scm | 52 +++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (65 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 1623010d37..4858b7f17b 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -440,6 +440,58 @@ (define-public node-define-properties
properties in Javascript directly on an object, returning the object."
#:mozilla-doclink "Global_Objects/Object/defineProperties"))
+(define-public node-deep-equal
+ (package
+ (name "node-deep-equal")
+ (version "2.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inspect-js/node-deep-equal")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1m3kw5wzbksv76avk3zaqiyfl8y80rpygbwz8ywy1x7z5ny7n32x"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("@ljharb/eslint-config"
+ "aud"
+ "auto-changelog"
+ "available-typed-arrays"
+ "eslint"
+ "for-each"
+ "has-proto"
+ "has-symbols"
+ "has-typed-arrays"
+ "in-publish"
+ "npmignore"
+ "nyc"
+ "object.getownpropertydescriptors"
+ "safe-publish-latest"
+ "semver"
+ "tape")))))
+ #:tests? #f)) ; FIXME tests depend on node-tape.
+ (inputs
+ (list node-call-bind node-es-get-iterator node-get-intrinsic
+ node-is-array-buffer node-is-regex node-is-shared-array-buffer
+ node-object-is node-side-channel node-which-boxed-primitive
+ node-which-collection node-which-typed-array
+ node-array-buffer-byte-length node-is-arguments
+ node-is-date-object node-is-string node-isarray
+ node-object-keys node-object-assign node-regexp-prototype-flags))
+ (home-page "https://github.com/inspect-js/node-deep-equal")
+ (synopsis "Get an iterator for any Javascript language value")
+ (description "This package provides a Javascript function to get iterator
+for any language value. This package works robustly accross all
+environments.")
+ (license license:expat)))
+
(define-public node-env-variable
(package
(name "node-env-variable")
--
2.41.0
N
N
Nicolas Graves wrote on 18 Feb 23:58 +0100
Re: [bug#68941] [PATCH 02/44] guix: build-system: node: Add node-is-type-object helper.
878r3hl6r7.fsf@ngraves.fr
On 2024-02-06 20:33, Liliana Marie Prikler wrote:

Toggle quote (26 lines)
> Am Dienstag, dem 06.02.2024 um 00:18 +0100 schrieb Nicolas Graves:
>> * guix/build-system/node.scm (node-is-type-object): Add function.
>>
>> Change-Id: I7027aff3b314cd999798afd8c11dc90ef7c6e43c
>> ---
>>  guix/build-system/node.scm | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
>> index 8a903b4fe5..b52b8f4f3e 100644
>> --- a/guix/build-system/node.scm
>> +++ b/guix/build-system/node.scm
>> @@ -35,8 +35,22 @@ (define-module (guix build-system node)
>>              node-build
>>              node-build-system
>>  
>> +            node-is-type-object
>>              node-trivial-package))
>>  
>> +(define* (node-is-type-object type #:optional (type-exists? #t))
>> +  "Helper for node packages replacement.  This is actual code
>> factorized from
>> +the packages it replaces, use with caution.  It doesn't apply to all
>> +javascript types."
> Which types are excluded?

Sorry, I haven't seen your email earlier. Basically all types that I've
kept in a true package are in this case. The process was to look the
source code to see if we could use this replacement instead. The
packages where that was not as straightforward I've simply kept the
original packages. This includes for instance : node-is-set,
node-is-map, node-is-callable, node-is-symbol...

Toggle quote (13 lines)
>> +  (string-append
>> +   "function(value) {"
>> +   (if type-exists?
>> +       (string-append
>> +        "if (typeof value === '" (string-downcase type) "') {return
>> true;} ")
>> +       "")
>> +   "if (value === null || typeof value !== 'object') {return false;}
>> +  return Object.prototype.toString.call(value) === '[object " type
>> "]';}"))
>> +
> I'd call this js-type-object? or perhaps make-js-type-predicate.

I've renamed this make-js-type-predicate. I'm trying to send an
extensive v2 that would bootstrap up to node-tape instead of just
node-deep-equal.

Toggle quote (6 lines)
>
> Cheers
>
>
>

--
Best regards,
Nicolas Graves
?