[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#67019] [PATCH v2 08/16] gnu: Add node-vlq.
From: |
Philip McGrath |
Subject: |
[bug#67019] [PATCH v2 08/16] gnu: Add node-vlq. |
Date: |
Thu, 16 Nov 2023 14:15:46 -0500 |
* gnu/packages/node-xyz.scm (node-vlq): New variable.
---
gnu/packages/node-xyz.scm | 58 +++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ee96dee767..adbac8a6cd 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1793,3 +1793,61 @@ (define-public node-copy-anything
face of complications like special objects, symbols, and non-enumerable
properties.")
(license license:expat)))
+
+(define-public node-vlq
+ (package
+ (name "node-vlq")
+ (version "0.2.3") ; last version accepted by flow-remove-types ("^0.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Rich-Harris/vlq")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1vdrarssrwxpcngyfx050ba0gnfinzi5jn3xs4w9rnjvxngx6m8f"))
+ (snippet
+ #~(delete-file "dist/vlq.js"))
+ (file-name (git-file-name name version))))
+ (build-system node-build-system)
+ (native-inputs (list esbuild))
+ (arguments
+ (list
+ #:modules
+ `((guix build node-build-system)
+ (ice-9 match)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("eslint"
+ "rollup"))))
+ (add-after 'delete-dependencies 'patch-build-script
+ (lambda args
+ (define new-build-script
+ "esbuild --bundle --platform=node --outdir=dist src/vlq.js")
+ (with-atomic-json-file-replacement "package.json"
+ (lambda (js)
+ (match js
+ (('@ . alist)
+ (cons '@
+ (map (match-lambda
+ (("scripts" @ . alist)
+ `("scripts" @ ,@(map (match-lambda
+ (("build" . _)
+ (cons "build"
+ new-build-script))
+ (other
+ other))
+ alist)))
+ (other
+ other))
+ alist)))))))))))
+ (home-page "https://github.com/Rich-Harris/vlq")
+ (synopsis "JavaScript library for @acronym{VLQ} encoding and decoding")
+ (description "This package provides a JavaScript library for converting
+integers to and from Base64-encoded @acronym{VLQ, variable-length quantity}
+strings.")
+ (license license:expat)))
--
2.41.0
- [bug#67019] [PATCH v2 02/16] gnu: Add node-copy-anything., (continued)
- [bug#67019] [PATCH v2 02/16] gnu: Add node-copy-anything., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 03/16] gnu: Add lessc., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 01/16] gnu: Add node-is-what., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 11/16] gnu: Add flow-remove-types., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 04/16] gnu: Add ocaml-wtf8., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 05/16] gnu: Add ocaml-visitors., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 06/16] gnu: Add ocaml-ppx-gen-rec., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 12/16] gnu: js-commander: Update to 11.1.0., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 13/16] gnu: js-commander: Install as a node module., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 14/16] gnu: Add mftrace., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 08/16] gnu: Add node-vlq.,
Philip McGrath <=
- [bug#67019] [PATCH v2 10/16] gnu: Add node-flow-parser., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 09/16] gnu: Add ocaml-flow-parser., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 09/16] gnu: Add ocaml-flow-parser., Liliana Marie Prikler, 2023/11/16
- [bug#67019] [PATCH v2 07/16] gnu: Add ocaml-dtoa., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 15/16] gnu: Add font-katex., Philip McGrath, 2023/11/16
- [bug#67019] [PATCH v2 16/16] gnu: Add katex., Philip McGrath, 2023/11/16
[bug#67019] [PATCH 05/16] gnu: Add ocaml-visitors., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 06/16] gnu: Add ocaml-ppx-gen-rec., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 11/16] gnu: Add flow-remove-types., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 10/16] gnu: Add node-flow-parser., Philip McGrath, 2023/11/09