[packages/npm] up to 6.14.8

atler atler at pld-linux.org
Wed Sep 9 23:42:48 CEST 2020


commit bc2c141dec9f43e279893e0d1a79658037266c0c
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Sep 9 23:37:30 2020 +0200

    up to 6.14.8

 cmd-shim-optional.patch | 32 ++++++++++++++++----------------
 npm.spec                | 39 ++++++++++++++++++++-------------------
 2 files changed, 36 insertions(+), 35 deletions(-)
---
diff --git a/npm.spec b/npm.spec
index 70f605b..c66ee30 100644
--- a/npm.spec
+++ b/npm.spec
@@ -8,12 +8,12 @@
 
 Summary:	A package manager for node.js
 Name:		npm
-Version:	6.9.0
+Version:	6.14.8
 Release:	1
 License:	Artistic-2.0
 Group:		Development/Libraries
 Source0:	http://registry.npmjs.org/npm/-/%{name}-%{version}.tgz
-# Source0-md5:	37d19666ae627bc5f8acdab48a8a0eed
+# Source0-md5:	ef90bb5e76fda0a1e248036b916c8fd8
 Patch0:		link-globalPaths.patch
 Patch1:		cmd-shim-optional.patch
 URL:		http://npmjs.org/
@@ -54,10 +54,12 @@ mv package/* .
 %patch0 -p1
 %patch1 -p1
 
-# fix shebangs
-%{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' \
-	bin/npm-cli.js \
-	bin/npx-cli.js
+grep -rl '#!.*env \(node\|python\|sh\|bash\)' . | xargs %{__sed} -i -e '1{
+	s,^#!.*bin/env bash,#!%{__bash},
+	s,^#!.*bin/env node,#!/usr/bin/node,
+	s,^#!.*bin/env python,#!%{__python},
+	s,^#!.*bin/env sh,#!%{__sh},
+}'
 
 # startup helpers we don't need
 rm bin/npm bin/npm.cmd
@@ -95,7 +97,7 @@ cp -r node_modules $RPM_BUILD_ROOT%{nodejs_libdir}/npm/
 
 # for npm help
 install -d $RPM_BUILD_ROOT%{nodejs_libdir}/npm/doc
-cp -a doc/* $RPM_BUILD_ROOT%{nodejs_libdir}/npm/doc
+cp -a docs/content/* $RPM_BUILD_ROOT%{nodejs_libdir}/npm/doc
 
 # ghosted global config files
 # TODO: package as files to have file permissions set
@@ -144,18 +146,17 @@ rm -rf $RPM_BUILD_ROOT
 %{nodejs_libdir}/npm/man
 
 %dir %{nodejs_libdir}/npm/doc
-%{nodejs_libdir}/npm/doc/cli
-%{nodejs_libdir}/npm/doc/files
-%{nodejs_libdir}/npm/doc/misc
-%{nodejs_libdir}/npm/doc/spec
-
-%{_mandir}/man1/npm*
-%{_mandir}/man1/npx*
-%{_mandir}/man5/npm*
-%{_mandir}/man5/package.json.5*
-%{_mandir}/man5/package-lock.json.5*
-%{_mandir}/man7/npm*
-%{_mandir}/man7/removing-npm.7*
+%{nodejs_libdir}/npm/doc/cli-commands
+%{nodejs_libdir}/npm/doc/configuring-npm
+%{nodejs_libdir}/npm/doc/using-npm
+
+%{_mandir}/man1/npm*.1*
+%{_mandir}/man1/npx*.1*
+%{_mandir}/man5/npm*.5*
+%{_mandir}/man5/package-json.5*
+%{_mandir}/man5/package-lock-json.5*
+%{_mandir}/man5/package-locks.5*
+%{_mandir}/man5/shrinkwrap-json.5*
 %{_mandir}/man7/semver.7*
 
 %files -n bash-completion-%{name}
diff --git a/cmd-shim-optional.patch b/cmd-shim-optional.patch
index 54c71f9..889cf08 100644
--- a/cmd-shim-optional.patch
+++ b/cmd-shim-optional.patch
@@ -1,23 +1,23 @@
-diff -ur package.orig/node_modules/read-cmd-shim/test/integration.js package/node_modules/read-cmd-shim/test/integration.js
---- package.orig/node_modules/read-cmd-shim/test/integration.js	1985-10-26 09:15:00.000000000 +0100
-+++ package/node_modules/read-cmd-shim/test/integration.js	2019-05-20 14:27:58.398000000 +0200
-@@ -3,7 +3,7 @@
- var fs = require('graceful-fs')
- var test = require('tap').test
- var rimraf = require('rimraf')
--var cmdShim = require('cmd-shim')
-+var cmdShim = (process.platform === "win32") ? require("cmd-shim") : {}
- var readCmdShim = require('../index.js')
- var workDir = path.join(__dirname, path.basename(__filename, '.js'))
- var testShbang = path.join(workDir, 'test-shbang')
-diff -ur package.orig/package.json package/package.json
---- package.orig/package.json	1985-10-26 09:15:00.000000000 +0100
-+++ package/package.json	2019-05-20 14:28:25.366000000 +0200
+diff --color -urN npm-6.14.8.orig/node_modules/gentle-fs/lib/bin-link.js npm-6.14.8/node_modules/gentle-fs/lib/bin-link.js
+--- npm-6.14.8.orig/node_modules/gentle-fs/lib/bin-link.js	1985-10-26 09:15:00.000000000 +0100
++++ npm-6.14.8/node_modules/gentle-fs/lib/bin-link.js	2020-09-09 23:11:39.069859423 +0200
+@@ -4,7 +4,7 @@
+ // top level global packages
+ 
+ const readCmdShim = require('read-cmd-shim')
+-const cmdShim = require('cmd-shim')
++const cmdShim = (process.platform == "win32") ? require('cmd-shim') : {}
+ const {linkIfExists} = require('./link.js')
+ 
+ const binLink = (from, to, opts, cb) => {
+diff --color -urN npm-6.14.8.orig/package.json npm-6.14.8/package.json
+--- npm-6.14.8.orig/package.json	1985-10-26 09:15:00.000000000 +0100
++++ npm-6.14.8/package.json	2020-09-09 22:51:11.189638270 +0200
 @@ -48,7 +48,6 @@
      "ci-info": "^2.0.0",
      "cli-columns": "^3.1.2",
      "cli-table3": "^0.5.1",
--    "cmd-shim": "~2.0.2",
+-    "cmd-shim": "^3.0.3",
      "columnify": "~1.5.4",
      "config-chain": "^1.1.12",
      "detect-indent": "~5.0.0",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/npm.git/commitdiff/bc2c141dec9f43e279893e0d1a79658037266c0c



More information about the pld-cvs-commit mailing list