Le 11/08/2019 à 18:30, Manas Kashyap a écrit :
> Hola, 
> I am Manas Kashyap, a Debian contributor and currently, I am working on
> updating npm to newer version i,e, 6.10.3. 
> Currently the work focus on removing the packages from node_modules
> folder, i,e the modules which are available in Debian archive to be
> removed from the embedded packages and add it in the dependency list of
> the package, current work you can view in my forked repo of
> npm https://salsa.debian.org/Manas-kashyap-guest/npm . 
> As, the list is really big and there are many embedded modules which are
> already packaged, so looking for more contributors to help in updating npm. 
> Thank you 
> Manas Kashyap 

Remove also node-gyp, update debian/copyright and apply my patches. Then
push an MR to js-team/npm so that we can work together.

Cheers,
Xavier
diff --git a/debian/patches/2010_privacy_breach_travis.patch b/debian/patches/2010_privacy_breach_travis.patch
index 0e92853..91e6d3b 100644
--- a/debian/patches/2010_privacy_breach_travis.patch
+++ b/debian/patches/2010_privacy_breach_travis.patch
@@ -9,7 +9,7 @@ Last-Update: 2014-07-29
  npm(1) -- a JavaScript package manager
  ==============================
  
--[![Build Status](https://img.shields.io/travis/npm/npm/latest.svg)](https://travis-ci.org/npm/npm)
+-[![Build Status](https://img.shields.io/travis/npm/cli/latest.svg)](https://travis-ci.org/npm/cli)
 +[Build Status](https://travis-ci.org/npm/npm)
  
  ## SYNOPSIS
diff --git a/debian/patches/2011_node-gyp-path.patch b/debian/patches/2011_node-gyp-path.patch
index e561475..bb874a8 100644
--- a/debian/patches/2011_node-gyp-path.patch
+++ b/debian/patches/2011_node-gyp-path.patch
@@ -13,6 +13,17 @@ Description: Use the Debian packaged version of node-gyp instead
  else
    "$npm_config_node_gyp" "$@"
  fi
+--- a/node_modules/npm-lifecycle/index.js
++++ b/node_modules/npm-lifecycle/index.js
+@@ -18,7 +18,7 @@
+ const byline = require('byline')
+ const resolveFrom = require('resolve-from')
+ 
+-const DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, 'node-gyp/bin/node-gyp')
++const DEFAULT_NODE_GYP_PATH = '/usr/bin/node-gyp'
+ const hookStatCache = new Map()
+ 
+ let PATH = isWindows ? 'Path' : 'PATH'
 --- a/node_modules/npm-lifecycle/node-gyp-bin/node-gyp
 +++ b/node_modules/npm-lifecycle/node-gyp-bin/node-gyp
 @@ -1,6 +1,6 @@
@@ -23,14 +34,3 @@ Description: Use the Debian packaged version of node-gyp instead
  else
    "$npm_config_node_gyp" "$@"
  fi
---- a/node_modules/npm-lifecycle/index.js
-+++ b/node_modules/npm-lifecycle/index.js
-@@ -15,7 +15,7 @@
- const byline = require('byline')
- const resolveFrom = require('resolve-from')
- 
--const DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, 'node-gyp/bin/node-gyp')
-+const DEFAULT_NODE_GYP_PATH = '/usr/bin/node-gyp'
- 
- let PATH = 'PATH'
- 
diff --git a/debian/patches/2013_make_clean_force.patch b/debian/patches/2013_make_clean_force.patch
deleted file mode 100644
index 88c133c..0000000
--- a/debian/patches/2013_make_clean_force.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: npm nows chokes on cache clean unless --force is added
-Forwarded: https://github.com/npm/npm/pull/20398
-Last-Update: 2018-21-04
-Author: Jérémy Lal <[email protected]>
---- a/Makefile
-+++ b/Makefile
-@@ -67,7 +67,7 @@
- 
- clean: markedclean marked-manclean doc-clean
- 	rm -rf npmrc
--	node bin/npm-cli.js cache clean
-+	node bin/npm-cli.js cache clean --force
- 
- uninstall:
- 	node bin/npm-cli.js rm npm -g -f
diff --git a/debian/patches/2014_remove_readable_stream.patch b/debian/patches/2014_remove_readable_stream.patch
index 417494d..a647d83 100644
--- a/debian/patches/2014_remove_readable_stream.patch
+++ b/debian/patches/2014_remove_readable_stream.patch
@@ -1,50 +1,118 @@
-readable-stream is available natively as stream
+Description: readable-stream is available natively as stream
 
 --- a/package.json
 +++ b/package.json
-@@ -107,7 +107,6 @@
+@@ -121,7 +121,6 @@
      "read-installed": "~4.0.3",
      "read-package-json": "^2.0.13",
-     "read-package-tree": "~5.1.6",
--    "readable-stream": "^2.3.5",
-     "request": "~2.83.0",
-     "retry": "~0.10.1",
-     "rimraf": "~2.6.2",
-@@ -216,7 +215,6 @@
-     "read-installed",
+     "read-package-tree": "^5.3.1",
+-    "readable-stream": "^3.4.0",
+     "readdir-scoped-modules": "^1.1.0",
+     "request": "^2.88.0",
+     "retry": "^0.12.0",
+@@ -246,7 +245,6 @@
      "read-package-json",
      "read-package-tree",
+     "read",
 -    "readable-stream",
      "readdir-scoped-modules",
      "request",
      "retry",
---- a/node_modules/npm-profile/package.json
-+++ b/node_modules/npm-profile/package.json
-@@ -9,7 +9,6 @@
-     "inherits": "2.0.3",
-     "lru-cache": "4.1.1",
-     "once": "1.4.0",
--    "readable-stream": "2.3.4",
-     "retry": "0.10.1",
-     "safe-buffer": "5.1.1",
-     "ssri": "5.2.4"
---- a/node_modules/npm-registry-client/package.json
-+++ b/node_modules/npm-registry-client/package.json
-@@ -54,7 +54,6 @@
+--- a/node_modules/are-we-there-yet/package.json
++++ b/node_modules/are-we-there-yet/package.json
+@@ -31,8 +31,7 @@
+   },
+   "bundleDependencies": false,
+   "dependencies": {
+-    "delegates": "^1.0.0",
+-    "readable-stream": "^2.0.6"
++    "delegates": "^1.0.0"
+   },
+   "deprecated": false,
+   "description": "Keep track of the overall completion of many disparate processes",
+--- a/node_modules/bl/package.json
++++ b/node_modules/bl/package.json
+@@ -32,7 +32,6 @@
+   },
+   "bundleDependencies": false,
+   "dependencies": {
+-    "readable-stream": "^3.0.1"
+   },
+   "deprecated": false,
+   "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
+--- a/node_modules/concat-stream/package.json
++++ b/node_modules/concat-stream/package.json
+@@ -38,7 +38,6 @@
+   "dependencies": {
+     "buffer-from": "^1.0.0",
+     "inherits": "^2.0.3",
+-    "readable-stream": "^2.2.2",
+     "typedarray": "^0.0.6"
+   },
+   "deprecated": false,
+--- a/node_modules/duplexify/package.json
++++ b/node_modules/duplexify/package.json
+@@ -36,7 +36,6 @@
+   "dependencies": {
+     "end-of-stream": "^1.0.0",
+     "inherits": "^2.0.1",
+-    "readable-stream": "^2.0.0",
+     "stream-shift": "^1.0.0"
+   },
+   "deprecated": false,
+--- a/node_modules/flush-write-stream/package.json
++++ b/node_modules/flush-write-stream/package.json
+@@ -34,8 +34,7 @@
+   },
+   "bundleDependencies": false,
+   "dependencies": {
+-    "inherits": "^2.0.1",
+-    "readable-stream": "^2.0.4"
++    "inherits": "^2.0.1"
+   },
+   "deprecated": false,
+   "description": "A write stream constructor that supports a flush function that is called before finish is emitted",
+--- a/node_modules/from2/package.json
++++ b/node_modules/from2/package.json
+@@ -41,8 +41,7 @@
+     }
+   ],
+   "dependencies": {
+-    "inherits": "^2.0.1",
+-    "readable-stream": "^2.0.0"
++    "inherits": "^2.0.1"
+   },
+   "deprecated": false,
+   "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"",
+--- a/node_modules/gauge/package.json
++++ b/node_modules/gauge/package.json
+@@ -46,7 +46,6 @@
+   "deprecated": false,
+   "description": "A terminal based horizontal guage",
    "devDependencies": {
-     "negotiator": "^0.6.1",
-     "nock": "^9.0.9",
--    "readable-stream": "^2.1.5",
+-    "readable-stream": "^2.0.6",
      "require-inject": "^1.4.0",
-     "rimraf": "^2.5.4",
-     "standard": "^11.0.0",
---- a/node_modules/pacote/package.json
-+++ b/node_modules/pacote/package.json
-@@ -10,7 +10,6 @@
-     "lru-cache": "4.1.1",
-     "npm-package-arg": "6.0.0",
-     "once": "1.4.0",
--    "readable-stream": "2.3.5",
-     "retry": "0.10.1",
-     "safe-buffer": "5.1.1",
-     "semver": "5.5.0",
+     "standard": "^7.1.2",
+     "tap": "^5.7.2",
+--- a/node_modules/isstream/package.json
++++ b/node_modules/isstream/package.json
+@@ -44,7 +44,6 @@
+     "stream",
+     "type",
+     "streams",
+-    "readable-stream",
+     "hippo"
+   ],
+   "license": "MIT",
+--- a/node_modules/parallel-transform/package.json
++++ b/node_modules/parallel-transform/package.json
+@@ -35,8 +35,7 @@
+   "bundleDependencies": false,
+   "dependencies": {
+     "cyclist": "~0.2.2",
+-    "inherits": "^2.0.3",
+-    "readable-stream": "^2.1.5"
++    "inherits": "^2.0.3"
+   },
+   "deprecated": false,
+   "description": "Transform stream that allows you to run your transforms in parallel without changing the order",
diff --git a/debian/patches/new-lru-cache.patch b/debian/patches/new-lru-cache.patch
deleted file mode 100644
index 9bc3bcb..0000000
--- a/debian/patches/new-lru-cache.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: call new on lru-cache, it's a class
-Forwarded: not-needed
-Last-Update: 2019-01-10
-Author: Jérémy Lal <[email protected]>
-
---- a/lib/fetch-package-metadata.js
-+++ b/lib/fetch-package-metadata.js
-@@ -25,8 +25,8 @@
-     return done(er, pkg)
-   }
- }
--
--const CACHE = require('lru-cache')({
-+const LRUCache = require('lru-cache')
-+const CACHE = new LRUCache({
-   max: 300 * 1024 * 1024,
-   length: (p) => p._contentLength
- })
diff --git a/debian/patches/series b/debian/patches/series
index c29dbfe..674b008 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,7 +5,5 @@
 2010_privacy_breach_travis.patch
 2011_node-gyp-path.patch
 2012_marked_path.patch
-2013_make_clean_force.patch
 2014_remove_readable_stream.patch
 2015_use_system_libnpx_1.patch
-new-lru-cache.patch
diff --git a/debian/rules b/debian/rules
index 7e847b4..4e0f017 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,7 +24,6 @@ override_dh_clean:
 override_dh_fixperms:
 	dh_fixperms
 	chmod a-x debian/npm/usr/share/npm/lib/utils/completion.sh
-	chmod a-x debian/npm/usr/share/npm/node_modules/uid-number/get-uid-gid.js
 	chmod a-x debian/npm/usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp.cmd
 	chmod a+x debian/npm/usr/share/npm/bin/npm-cli.js
 	chmod a+x debian/npm/usr/share/npm/bin/npx-cli.js
@@ -34,13 +33,11 @@ override_dh_auto_install:
 
 override_dh_install:
 	dh_install
-	find debian/npm -iname LICENSE -delete
-	find debian/npm -iname LICENCE -delete
-	find debian/npm -iname LICENSE.txt -delete
-	find debian/npm -iname LICENSE.md -delete
+	find debian/npm -iname 'LICENSE*' -delete
 	find debian/npm/usr/share/npm/node_modules -name .npmignore -delete
-	find debian/npm/usr/share/npm/node_modules -name .eslintrc.json -delete
-	find debian/npm/usr/share/npm/node_modules -name .eslintrc -delete
+	find debian/npm/usr/share/npm/node_modules -name '.eslintrc*' -delete
+	find debian/npm/usr/share/npm/node_modules -name '*.md' -delete
+	rm -rf debian/npm/usr/share/npm/node_modules/*/.git*
 
 override_dh_auto_test:
 	cp debian/npmrc npmrc
-- 
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to