[PATCH] gnu: Add node-commander.

  • Open
  • quality assurance status badge
Details
2 participants
  • Rikard Nordgren
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Rikard Nordgren
Severity
normal
R
R
Rikard Nordgren wrote on 7 Dec 2023 09:29
(address . guix-patches@gnu.org)(address . hrn@posteo.net)
5309647d34306d09dba21177002f96a7d7f39e74.1701937716.git.hrn@posteo.net
* gnu/packages/node-xyz.scm (node-commander): New variable.

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

Toggle diff (53 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 6c16417309..8486d121dd 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -155,6 +155,44 @@ (define-public node-color-name
"This package provides a JSON list with color names and their values.")
(license license:expat)))
+(define-public node-commander
+ (package
+ (name "node-commander")
+ (version "11.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tj/commander.js")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1xwh85kbxj76ni41r2h0apl8mjbfcnmxzzp3vlspq30w8kwfckni"))))
+ (build-system node-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda _
+ (delete-dependencies '("@types/jest" "@types/node"
+ "@typescript-eslint/eslint-plugin"
+ "@typescript-eslint/parser"
+ "eslint"
+ "eslint-config-standard"
+ "eslint-config-standard-with-typescript"
+ "eslint-plugin-import"
+ "eslint-plugin-jest"
+ "eslint-plugin-n"
+ "eslint-plugin-promise"
+ "jest"
+ "ts-jest"
+ "tsd"
+ "typescript")))))))
+ (home-page "https://github.com/tj/commander.js")
+ (synopsis "Command line interface for node.js")
+ (description "The complete solution for node.js command-line interfaces.")
+ (license license:expat)))
+
(define-public node-crx3
(package
(name "node-crx3")

base-commit: 23627b1706af25a0a30b96b9169a3495279aff1b
--
2.34.1
M
M
Maxim Cournoyer wrote on 4 Jan 04:31 +0100
(name . Rikard Nordgren)(address . hrn@posteo.net)(address . 67681@debbugs.gnu.org)
87bka14vva.fsf@gmail.com
Hi,

Rikard Nordgren <hrn@posteo.net> writes:

Toggle quote (32 lines)
> * gnu/packages/node-xyz.scm (node-commander): New variable.
>
> Change-Id: I5b00861705d64e0e89da81acee833e145287bd66
> ---
> gnu/packages/node-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 6c16417309..8486d121dd 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -155,6 +155,44 @@ (define-public node-color-name
> "This package provides a JSON list with color names and their values.")
> (license license:expat)))
>
> +(define-public node-commander
> + (package
> + (name "node-commander")
> + (version "11.1.0")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/tj/commander.js")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "1xwh85kbxj76ni41r2h0apl8mjbfcnmxzzp3vlspq30w8kwfckni"))))
> + (build-system node-build-system)
> + (arguments
> + '(#:tests? #f

Why is the test suite disabled? A comment (explaining a good reason) is
needed :-).

Toggle quote (3 lines)
> + #:phases (modify-phases %standard-phases
> + (add-after 'patch-dependencies 'delete-dependencies

A comment explaining why these are removed would help.

Toggle quote (19 lines)
> + (lambda _
> + (delete-dependencies '("@types/jest" "@types/node"
> + "@typescript-eslint/eslint-plugin"
> + "@typescript-eslint/parser"
> + "eslint"
> + "eslint-config-standard"
> + "eslint-config-standard-with-typescript"
> + "eslint-plugin-import"
> + "eslint-plugin-jest"
> + "eslint-plugin-n"
> + "eslint-plugin-promise"
> + "jest"
> + "ts-jest"
> + "tsd"
> + "typescript")))))))
> + (home-page "https://github.com/tj/commander.js")
> + (synopsis "Command line interface for node.js")
> + (description "The complete solution for node.js command-line interfaces.")

Could you please expand a bit on the description? What features does it
have? Keep it factual; "The complete solution ..." sounds like
marketing language.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 4 Jan 04:31 +0100
control message for bug #67681
(address . control@debbugs.gnu.org)
87a5pl4vv6.fsf@gmail.com
tags 67681 + moreinfo
quit
H
Re: [bug#67681] [PATCH] gnu: Add node-commander.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 67681@debbugs.gnu.org)
f7227df7a74dc9fa2d4a1b2cfda896cc@posteo.net
Hi,

Thanks for reviewing!

Toggle quote (4 lines)
> Why is the test suite disabled? A comment (explaining a good reason)
> is
> needed :-).

This is what many node packages in node-xyz.scm does. I think this is
because the tests are difficult to bootstrap. The dependency chains for
the tests
are typically large and circular.

Toggle quote (2 lines)
> A comment explaining why these are removed would help.

This is also the norm in node-xyz.scm. The excluded dependencies are for
development and can in many cases be very difficult to bootstrap.

To be able to make progress with packaging node packages it seems to me
that the general strategy has been to disable tests and dependencies
needed for tests. My assumption might be wrong though. Do you still
think I should add comments?

Toggle quote (5 lines)
> Could you please expand a bit on the description? What features does
> it
> have? Keep it factual; "The complete solution ..." sounds like
> marketing language.

I agree that this needs to be changed. I blindly copied what the package
said about itself.

Best regards,
Rikard
M
M
Maxim Cournoyer wrote on 6 Jan 20:05 +0100
(name . hrn)(address . hrn@posteo.net)(address . 67681@debbugs.gnu.org)
871qauz3iw.fsf@gmail.com
Hi,

hrn <hrn@posteo.net> writes:

Toggle quote (23 lines)
> Hi,
>
> Thanks for reviewing!
>
>> Why is the test suite disabled? A comment (explaining a good
>> reason) is
>> needed :-).
>
> This is what many node packages in node-xyz.scm does. I think this is
> because the tests are difficult to bootstrap. The dependency chains
> for the tests
> are typically large and circular.
>
>> A comment explaining why these are removed would help.
>
> This is also the norm in node-xyz.scm. The excluded dependencies are
> for development and can in many cases be very difficult to bootstrap.
>
> To be able to make progress with packaging node packages it seems to
> me that the general strategy has been to disable tests and
> dependencies needed for tests. My assumption might be wrong though. Do
> you still think I should add comments?

OK, this makes sense, but hard to grasp for a newcomer like me to (gnu
packages node-xyz). Perhaps it could be explained in a commentary
comment at the top of the module.

Toggle quote (8 lines)
>> Could you please expand a bit on the description? What features
>> does it
>> have? Keep it factual; "The complete solution ..." sounds like
>> marketing language.
>
> I agree that this needs to be changed. I blindly copied what the
> package said about itself.

OK. I look forward to a v2.

--
Thanks,
Maxim
?