GNU bug report logs -
#36599
[PATCH] gnu: Add node-semver.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36599 in the body.
You can then email your comments to 36599 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Thu, 11 Jul 2019 15:14:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Giacomo Leidi <goodoldpaul <at> autistici.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 11 Jul 2019 15:14:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/node.scm (node-semver): New variable.
---
gnu/packages/node.scm | 48 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index fc43fcb04c..2f3fe17334 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2017 Mike Gerwitz <mtg <at> gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2018, 2019 Marius Bakke <mbakke <at> fastmail.com>
+;;; Copyright © 2019 Giacomo Leidi <goodoldpaul <at> autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,10 +24,12 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages node)
- #:use-module ((guix licenses) #:select (expat))
+ #:use-module ((guix licenses) #:select (expat isc))
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages adns)
@@ -184,3 +187,46 @@ devices.")
(home-page "https://nodejs.org/")
(license expat)
(properties '((timeout . 3600))))) ; 1 h
+
+(define-public node-semver
+ (package
+ (name "node-semver")
+ (version "6.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/npm/node-semver.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0lqb0v7frrdr7yvxy8b2yg6rp1jilninzk76qnx5qnswxnr4gj5m"))))
+ (build-system trivial-build-system)
+ (propagated-inputs
+ `(("node" ,node)))
+ (arguments
+ '(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (semver-js "semver.js")
+ (entry-point (string-append "bin/" semver-js)))
+ (mkdir-p (string-append out "/bin"))
+ (setenv "PATH" (string-append (assoc-ref %build-inputs
+ "node")
+ "/bin:" (getenv "PATH")))
+ (map (lambda (file)
+ (install-file (string-append source "/" file) out))
+ (list semver-js "LICENSE" "package.json" "package-lock.json" "range.bnf"))
+ (install-file (string-append source "/" entry-point)
+ (string-append out "/bin"))
+ (patch-shebang (string-append out "/" entry-point))
+ #t))))
+ (home-page "https://github.com/npm/node-semver")
+ (synopsis "Parses semantic versions strings")
+ (description
+ "node-semver is a JavaScript implementation of the
+@uref{https://semver.org/, SemVer.org} specification.")
+ (license isc)))
--
2.22.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Mon, 02 Sep 2019 12:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 36599 <at> debbugs.gnu.org (full text, mbox):
Hi Giacomo,
This patch seems to have been forgotten…
Giacomo Leidi <goodoldpaul <at> autistici.org> skribis:
> * gnu/packages/node.scm (node-semver): New variable.
[...]
> +(define-public node-semver
> + (package
> + (name "node-semver")
> + (version "6.2.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/npm/node-semver.git")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0lqb0v7frrdr7yvxy8b2yg6rp1jilninzk76qnx5qnswxnr4gj5m"))))
The nice thing is that the source doesn’t contain any binaries (or
“minified” code),.
> + (build-system trivial-build-system)
> + (propagated-inputs
> + `(("node" ,node)))
> + (arguments
> + '(#:modules ((guix build utils))
> + #:builder
> + (begin
> + (use-modules (guix build utils))
> + (let* ((source (assoc-ref %build-inputs "source"))
> + (out (assoc-ref %outputs "out"))
> + (semver-js "semver.js")
> + (entry-point (string-append "bin/" semver-js)))
> + (mkdir-p (string-append out "/bin"))
> + (setenv "PATH" (string-append (assoc-ref %build-inputs
> + "node")
> + "/bin:" (getenv "PATH")))
> + (map (lambda (file)
> + (install-file (string-append source "/" file) out))
> + (list semver-js "LICENSE" "package.json" "package-lock.json" "range.bnf"))
> + (install-file (string-append source "/" entry-point)
> + (string-append out "/bin"))
> + (patch-shebang (string-append out "/" entry-point))
> + #t))))
This installs files in non-standard locations:
--8<---------------cut here---------------start------------->8---
$ find $(./pre-inst-env guix build node-semver)
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package-lock.json
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin/semver.js
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package.json
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/semver.js
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/range.bnf
/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/LICENSE
--8<---------------cut here---------------end--------------->8---
bin/ is fine, though should the binary be called ‘semver’ instead of
‘semver.js’?
Could you arrange so that ‘LICENSE’ goes to ‘share/doc/node-semver’?
As for the other files, I don’t know. Are they needed? Should they go
to share/node-semver?
Thanks in advance, and apologies for the loooong delay!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Mon, 02 Sep 2019 14:51:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Le 2 septembre 2019 14:49:08 GMT+02:00, "Ludovic Courtès" <ludo <at> gnu.org> a écrit :
>Hi Giacomo,
>
>This patch seems to have been forgotten…
>
>Giacomo Leidi <goodoldpaul <at> autistici.org> skribis:
>
>> * gnu/packages/node.scm (node-semver): New variable.
>
>[...]
>
>> +(define-public node-semver
>> + (package
>> + (name "node-semver")
>> + (version "6.2.0")
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/npm/node-semver.git")
>> + (commit (string-append "v" version))))
>> + (file-name (git-file-name name version))
>> + (sha256
>> + (base32
>> +
>"0lqb0v7frrdr7yvxy8b2yg6rp1jilninzk76qnx5qnswxnr4gj5m"))))
>
>The nice thing is that the source doesn’t contain any binaries (or
>“minified” code),.
>
>> + (build-system trivial-build-system)
>> + (propagated-inputs
>> + `(("node" ,node)))
>> + (arguments
>> + '(#:modules ((guix build utils))
>> + #:builder
>> + (begin
>> + (use-modules (guix build utils))
>> + (let* ((source (assoc-ref %build-inputs "source"))
>> + (out (assoc-ref %outputs "out"))
>> + (semver-js "semver.js")
>> + (entry-point (string-append "bin/" semver-js)))
>> + (mkdir-p (string-append out "/bin"))
>> + (setenv "PATH" (string-append (assoc-ref %build-inputs
>> + "node")
>> + "/bin:" (getenv "PATH")))
>> + (map (lambda (file)
>> + (install-file (string-append source "/" file)
>out))
>> + (list semver-js "LICENSE" "package.json"
>"package-lock.json" "range.bnf"))
>> + (install-file (string-append source "/" entry-point)
>> + (string-append out "/bin"))
>> + (patch-shebang (string-append out "/" entry-point))
>> + #t))))
>
>This installs files in non-standard locations:
>
>--8<---------------cut here---------------start------------->8---
>$ find $(./pre-inst-env guix build node-semver)
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package-lock.json
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin/semver.js
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package.json
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/semver.js
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/range.bnf
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/LICENSE
>--8<---------------cut here---------------end--------------->8---
>
>bin/ is fine, though should the binary be called ‘semver’ instead of
>‘semver.js’?
>
>Could you arrange so that ‘LICENSE’ goes to ‘share/doc/node-semver’?
>
>As for the other files, I don’t know. Are they needed? Should they
>go
>to share/node-semver?
>
>Thanks in advance, and apologies for the loooong delay!
>
>Ludo’.
Actually we have a node-build-system now which woull work much better than the trivial-build-system.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Mon, 02 Sep 2019 14:51:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Mon, 02 Sep 2019 17:14:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 36599 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello everybody,
I also forgot about this patch: I was actually conviced that another
patch providing node-semver was merged with the new node-build-system.
Here's the updated package (greatly simplified, as foreseen by Julien,
thanks to the new node-build-system). I added it in a new npm.scm file
to maintain consistency with i.e. Haskell, Python or Rust. If you think
this should be put in node.scm, don't hesitate to tell!
Bye,
Giacomo
On 2019-09-02 14:50, Julien Lepiller wrote:
> Le 2 septembre 2019 14:49:08 GMT+02:00, "Ludovic Courtès"
> <ludo <at> gnu.org> a écrit :
>> Hi Giacomo,
>>
>> This patch seems to have been forgotten…
>>
>> Giacomo Leidi <goodoldpaul <at> autistici.org> skribis:
>>
>>> * gnu/packages/node.scm (node-semver): New variable.
>>
>> [...]
>>
>>> +(define-public node-semver
>>> + (package
>>> + (name "node-semver")
>>> + (version "6.2.0")
>>> + (source (origin
>>> + (method git-fetch)
>>> + (uri (git-reference
>>> + (url "https://github.com/npm/node-semver.git")
>>> + (commit (string-append "v" version))))
>>> + (file-name (git-file-name name version))
>>> + (sha256
>>> + (base32
>>> +
>> "0lqb0v7frrdr7yvxy8b2yg6rp1jilninzk76qnx5qnswxnr4gj5m"))))
>>
>> The nice thing is that the source doesn’t contain any binaries (or
>> “minified” code),.
>>
>>> + (build-system trivial-build-system)
>>> + (propagated-inputs
>>> + `(("node" ,node)))
>>> + (arguments
>>> + '(#:modules ((guix build utils))
>>> + #:builder
>>> + (begin
>>> + (use-modules (guix build utils))
>>> + (let* ((source (assoc-ref %build-inputs "source"))
>>> + (out (assoc-ref %outputs "out"))
>>> + (semver-js "semver.js")
>>> + (entry-point (string-append "bin/" semver-js)))
>>> + (mkdir-p (string-append out "/bin"))
>>> + (setenv "PATH" (string-append (assoc-ref %build-inputs
>>> + "node")
>>> + "/bin:" (getenv "PATH")))
>>> + (map (lambda (file)
>>> + (install-file (string-append source "/" file)
>> out))
>>> + (list semver-js "LICENSE" "package.json"
>> "package-lock.json" "range.bnf"))
>>> + (install-file (string-append source "/" entry-point)
>>> + (string-append out "/bin"))
>>> + (patch-shebang (string-append out "/" entry-point))
>>> + #t))))
>>
>> This installs files in non-standard locations:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ find $(./pre-inst-env guix build node-semver)
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package-lock.json
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin/semver.js
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package.json
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/semver.js
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/range.bnf
>> /gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/LICENSE
>> --8<---------------cut here---------------end--------------->8---
>>
>> bin/ is fine, though should the binary be called ‘semver’ instead of
>> ‘semver.js’?
>>
>> Could you arrange so that ‘LICENSE’ goes to ‘share/doc/node-semver’?
>>
>> As for the other files, I don’t know. Are they needed? Should they
>> go
>> to share/node-semver?
>>
>> Thanks in advance, and apologies for the loooong delay!
>>
>> Ludo’.
>
> Actually we have a node-build-system now which woull work much better
> than the trivial-build-system.
[0001-gnu-Add-node-semver.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Tue, 07 Apr 2020 23:07:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 36599 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
this patch fell again out of my mind. Here's an update version.
[0001-gnu-Add-node-semver.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Thu, 09 Apr 2020 20:03:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 36599 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Overall it looks good to me. I also checked npm¹ and it agrees that
there are no dependencies for this package. Do you happen to know why
there's a test directory installed? I don't know if it's supposed to be
there but it seems strange to me
$ tree /gnu/store/sgq5frrlnpip3sjjsqjrwc4czys1ry8a-node-semver-7.2.1 -d
/gnu/store/sgq5frrlnpip3sjjsqjrwc4czys1ry8a-node-semver-7.2.1
├── bin
├── lib
│ └── node_modules
│ └── semver
│ ├── bin
│ ├── classes
│ ├── functions
│ ├── internal
│ ├── ranges
│ ├── tap-snapshots
│ └── test
│ ├── bin
│ ├── classes
│ ├── fixtures
│ ├── functions
│ ├── internal
│ └── ranges
└── share
└── doc
└── node-semver-7.2.1
¹ https://www.npmjs.com/package/semver
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Wed, 15 Apr 2020 15:37:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 36599 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Efraim,
> Overall it looks good to me. I also checked npm¹ and it agrees that
> there are no dependencies for this package. Do you happen to know why
> there's a test directory installed? I don't know if it's supposed to be
> there but it seems strange to me
I didn't notice and I agree that tests shouldn't be installed but IIUC
it's a limitation of the node-build-system that copies recursively the
contents of the node_modules directory. I checked and it seems that
other packages using the node-build-system have the same problem (i.e.
node-color-name install test.js, node-far installs a test directory).
One way to fix this could be adding an extra phase (either to each
package or in the node-build-system with a special field indicating a
list of tests directories) where we delete the test directory from
node_modules preventing the copy.
On my system I get
orang3 <at> frastanato ~/code/guix [env]$ du -sh
/gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1
732K /gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1
orang3 <at> frastanato ~/code/guix [env]$ du -sh
/gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1/lib/node_modules/semver/test/
264K
/gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1/lib/node_modules/semver/test/
which is not much but amounts nearly to 1/3 of the total disk usage of
semver. If you believe that another phase deleting the tests would be
better I attached an attempt.
Giacomo
[0001-gnu-Add-node-semver.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Wed, 15 Apr 2020 17:10:01 GMT)
Full text and
rfc822 format available.
Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):
Le 15 avril 2020 11:36:06 GMT-04:00, goodoldpaul <at> autistici.org a écrit :
>Hi Efraim,
>
>> Overall it looks good to me. I also checked npm¹ and it agrees that
>> there are no dependencies for this package. Do you happen to know why
>> there's a test directory installed? I don't know if it's supposed to
>be
>> there but it seems strange to me
>
>I didn't notice and I agree that tests shouldn't be installed but IIUC
>it's a limitation of the node-build-system that copies recursively the
>contents of the node_modules directory. I checked and it seems that
>other packages using the node-build-system have the same problem (i.e.
>node-color-name install test.js, node-far installs a test directory).
>One way to fix this could be adding an extra phase (either to each
>package or in the node-build-system with a special field indicating a
>list of tests directories) where we delete the test directory from
>node_modules preventing the copy.
>
>On my system I get
>
>orang3 <at> frastanato ~/code/guix [env]$ du -sh
>/gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1
>732K /gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1
>
>orang3 <at> frastanato ~/code/guix [env]$ du -sh
>/gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1/lib/node_modules/semver/test/
>264K
>/gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1/lib/node_modules/semver/test/
>
>which is not much but amounts nearly to 1/3 of the total disk usage of
>semver. If you believe that another phase deleting the tests would be
>better I attached an attempt.
>
>Giacomo
Does npm install the test.js files when run by ittself (in which case we replicate its behavior), or does it have a mechanism to know what files to install? If so we thould replicate that mecanism.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Wed, 15 Apr 2020 17:10:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Fri, 17 Apr 2020 14:55:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 36599 <at> debbugs.gnu.org (full text, mbox):
Hi Julien,
> Does npm install the test.js files when run by ittself (in which case
> we replicate its behavior), or does it have a mechanism to know what
> files to install? If so we thould replicate that mecanism.
On my system I get
giacomo <at> frarch /tmp$ npm i semver
npm WARN saveError ENOENT: no such file or directory, open
'/tmp/package.json'
npm WARN enoent ENOENT: no such file or directory, open
'/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.
+ semver <at> 7.3.2
added 1 package and audited 1 package in 0.626s
found 0 vulnerabilities
giacomo <at> frarch /tmp$ ls -l node_modules/semver/
total 48
drwxr-xr-x 2 giacomo giacomo 60 Apr 17 16:43 bin/
-rw-r--r-- 1 giacomo giacomo 2257 Oct 26 1985 CHANGELOG.md
drwxr-xr-x 2 giacomo giacomo 120 Apr 17 16:43 classes/
drwxr-xr-x 2 giacomo giacomo 520 Apr 17 16:43 functions/
-rw-r--r-- 1 giacomo giacomo 1982 Oct 26 1985 index.js
drwxr-xr-x 2 giacomo giacomo 120 Apr 17 16:43 internal/
-rw-r--r-- 1 giacomo giacomo 765 Oct 26 1985 LICENSE
-rw-r--r-- 1 giacomo giacomo 1645 Apr 17 16:43 package.json
-rw-r--r-- 1 giacomo giacomo 69 Oct 26 1985 preload.js
-rw-r--r-- 1 giacomo giacomo 619 Oct 26 1985 range.bnf
drwxr-xr-x 2 giacomo giacomo 260 Apr 17 16:43 ranges/
-rw-r--r-- 1 giacomo giacomo 22109 Oct 26 1985 README.md
so I believe that npm uses the "files" key [0] in package.json to decide
what to install.
I'm definitely available to implement that but it could take a week or
two, if we feel it should be changed right away I'm probably not the
best person to do that.
What do you think? Should I open another issue about this?
Giacomo
[0]: https://github.com/npm/node-semver/blob/master/package.json#L21
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Fri, 17 Apr 2020 15:05:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 36599 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Apr 17, 2020 at 02:54:43PM +0000, goodoldpaul <at> autistici.org wrote:
> Hi Julien,
>
> > Does npm install the test.js files when run by ittself (in which case we
> > replicate its behavior), or does it have a mechanism to know what files
> > to install? If so we thould replicate that mecanism.
>
> On my system I get
>
> giacomo <at> frarch /tmp$ npm i semver
> npm WARN saveError ENOENT: no such file or directory, open
> '/tmp/package.json'
> npm WARN enoent ENOENT: no such file or directory, open '/tmp/package.json'
> npm WARN tmp No description
> npm WARN tmp No repository field.
> npm WARN tmp No README data
> npm WARN tmp No license field.
>
> + semver <at> 7.3.2
> added 1 package and audited 1 package in 0.626s
> found 0 vulnerabilities
>
> giacomo <at> frarch /tmp$ ls -l node_modules/semver/
> total 48
> drwxr-xr-x 2 giacomo giacomo 60 Apr 17 16:43 bin/
> -rw-r--r-- 1 giacomo giacomo 2257 Oct 26 1985 CHANGELOG.md
> drwxr-xr-x 2 giacomo giacomo 120 Apr 17 16:43 classes/
> drwxr-xr-x 2 giacomo giacomo 520 Apr 17 16:43 functions/
> -rw-r--r-- 1 giacomo giacomo 1982 Oct 26 1985 index.js
> drwxr-xr-x 2 giacomo giacomo 120 Apr 17 16:43 internal/
> -rw-r--r-- 1 giacomo giacomo 765 Oct 26 1985 LICENSE
> -rw-r--r-- 1 giacomo giacomo 1645 Apr 17 16:43 package.json
> -rw-r--r-- 1 giacomo giacomo 69 Oct 26 1985 preload.js
> -rw-r--r-- 1 giacomo giacomo 619 Oct 26 1985 range.bnf
> drwxr-xr-x 2 giacomo giacomo 260 Apr 17 16:43 ranges/
> -rw-r--r-- 1 giacomo giacomo 22109 Oct 26 1985 README.md
>
> so I believe that npm uses the "files" key [0] in package.json to decide
> what to install.
>
Thanks for looking into it.
> I'm definitely available to implement that but it could take a week or two,
> if we feel it should be changed right away I'm probably not the best person
> to do that.
>
> What do you think? Should I open another issue about this?
I think we should fix it, but it shouldn't block getting your package
into Guix. Go ahead and open a new issue for it.
>
> Giacomo
>
> [0]: https://github.com/npm/node-semver/blob/master/package.json#L21
>
>
>
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36599
; Package
guix-patches
.
(Fri, 17 Apr 2020 16:11:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 36599 <at> debbugs.gnu.org (full text, mbox):
Le 17 avril 2020 10:54:43 GMT-04:00, goodoldpaul <at> autistici.org a écrit :
>Hi Julien,
>
>> Does npm install the test.js files when run by ittself (in which case
>
>> we replicate its behavior), or does it have a mechanism to know what
>> files to install? If so we thould replicate that mecanism.
>
>On my system I get
>
>giacomo <at> frarch /tmp$ npm i semver
>npm WARN saveError ENOENT: no such file or directory, open
>'/tmp/package.json'
>npm WARN enoent ENOENT: no such file or directory, open
>'/tmp/package.json'
>npm WARN tmp No description
>npm WARN tmp No repository field.
>npm WARN tmp No README data
>npm WARN tmp No license field.
>
>+ semver <at> 7.3.2
>added 1 package and audited 1 package in 0.626s
>found 0 vulnerabilities
>
>giacomo <at> frarch /tmp$ ls -l node_modules/semver/
>total 48
>drwxr-xr-x 2 giacomo giacomo 60 Apr 17 16:43 bin/
>-rw-r--r-- 1 giacomo giacomo 2257 Oct 26 1985 CHANGELOG.md
>drwxr-xr-x 2 giacomo giacomo 120 Apr 17 16:43 classes/
>drwxr-xr-x 2 giacomo giacomo 520 Apr 17 16:43 functions/
>-rw-r--r-- 1 giacomo giacomo 1982 Oct 26 1985 index.js
>drwxr-xr-x 2 giacomo giacomo 120 Apr 17 16:43 internal/
>-rw-r--r-- 1 giacomo giacomo 765 Oct 26 1985 LICENSE
>-rw-r--r-- 1 giacomo giacomo 1645 Apr 17 16:43 package.json
>-rw-r--r-- 1 giacomo giacomo 69 Oct 26 1985 preload.js
>-rw-r--r-- 1 giacomo giacomo 619 Oct 26 1985 range.bnf
>drwxr-xr-x 2 giacomo giacomo 260 Apr 17 16:43 ranges/
>-rw-r--r-- 1 giacomo giacomo 22109 Oct 26 1985 README.md
>
>so I believe that npm uses the "files" key [0] in package.json to
>decide
>what to install.
>
>I'm definitely available to implement that but it could take a week or
>two, if we feel it should be changed right away I'm probably not the
>best person to do that.
>
>What do you think? Should I open another issue about this?
>
>Giacomo
>
>[0]: https://github.com/npm/node-semver/blob/master/package.json#L21
We don't have to rush, and I won't implement that faster than you, so if you can and want to do it, please go ahead :). Opening a new bug to track that is a good idea. Can you do that?
Thank you!
Reply sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
You have taken responsibility.
(Sat, 18 Apr 2020 18:40:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Giacomo Leidi <goodoldpaul <at> autistici.org>
:
bug acknowledged by developer.
(Sat, 18 Apr 2020 18:40:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 36599-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
As we discussed in the other parts of this thread, I've pushed the patch
(without the extra phase to delete the tests) and closed the bug. Feel
free to open a bug about only installing the intended files.
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 17 May 2020 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 84 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.