mirror of https://gitee.com/openkylin/npm.git
format patches
This commit is contained in:
parent
18504a6f24
commit
e12a10b304
|
@ -1,7 +1,15 @@
|
|||
Description: remove shebang from completion script
|
||||
From: =?utf-8?b?SsOpcsOpbXkgTGFs?= <kapouer@melix.org>
|
||||
Date: Thu, 16 Feb 2023 14:46:17 +0800
|
||||
Subject: remove shebang from completion script
|
||||
|
||||
Forwarded: not-needed
|
||||
Author: Jérémy Lal <kapouer@melix.org>
|
||||
Last-Update: 2012-04-07
|
||||
---
|
||||
lib/utils/completion.sh | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/lib/utils/completion.sh b/lib/utils/completion.sh
|
||||
index a3e5143..4245007 100755
|
||||
--- a/lib/utils/completion.sh
|
||||
+++ b/lib/utils/completion.sh
|
||||
@@ -1,4 +1,3 @@
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
Author: Diane Trout <diane@ghic.org>
|
||||
From: Diane Trout <diane@ghic.org>
|
||||
Date: Thu, 16 Feb 2023 14:46:17 +0800
|
||||
Subject: Use the Debian packaged version of node-gyp instead
|
||||
|
||||
Forwarded: not-needed
|
||||
Description: Use the Debian packaged version of node-gyp instead
|
||||
of the convenience copy that was removed on repack.
|
||||
Reviewed-By: Xavier Guimard <yadd@debian.org>
|
||||
Last-Update: 2020-10-08
|
||||
|
||||
of the convenience copy that was removed on repack.
|
||||
---
|
||||
bin/node-gyp-bin/node-gyp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bin/node-gyp-bin/node-gyp b/bin/node-gyp-bin/node-gyp
|
||||
index 70efb6f..ae7cff3 100755
|
||||
--- a/bin/node-gyp-bin/node-gyp
|
||||
+++ b/bin/node-gyp-bin/node-gyp
|
||||
@@ -1,6 +1,6 @@
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
Description: don't install dependencies during build
|
||||
Author: Xavier Guimard <yadd@debian.org>
|
||||
From: Xavier Guimard <yadd@debian.org>
|
||||
Date: Thu, 16 Feb 2023 14:46:17 +0800
|
||||
Subject: don't install dependencies during build
|
||||
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2021-09-22
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6fb39c7..09a12af 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -32,7 +32,7 @@
|
||||
@@ -32,7 +32,7 @@ docs: mandocs htmldocs
|
||||
|
||||
# don't regenerate the snapshot if we're generating
|
||||
# snapshots, since presumably we just did that.
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
Description: Use source-date-epoch as timestamp source for documentation
|
||||
Author: James Addison <jay+salsa@jp-hosting.net>
|
||||
From: James Addison <jay+salsa@jp-hosting.net>
|
||||
Date: Thu, 16 Feb 2023 14:46:17 +0800
|
||||
Subject: Use source-date-epoch as timestamp source for documentation
|
||||
|
||||
Origin: https://salsa.debian.org/js-team/npm/-/merge_requests/7
|
||||
Forwarded: no
|
||||
Reviewed-By: Yadd <yadd@debian.org>
|
||||
Last-Update: 2021-11-27
|
||||
---
|
||||
scripts/docs-build.js | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/docs-build.js b/scripts/docs-build.js
|
||||
index 63658c7..f786e59 100644
|
||||
--- a/scripts/docs-build.js
|
||||
+++ b/scripts/docs-build.js
|
||||
@@ -36,7 +36,8 @@
|
||||
@@ -36,7 +36,8 @@ fs.readFile(src, 'utf8', function (err, data) {
|
||||
.replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, replacer)
|
||||
.trim()
|
||||
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
Description: don't check for last version
|
||||
Author: Yadd <yadd@debian.org>
|
||||
From: Yadd <yadd@debian.org>
|
||||
Date: Thu, 16 Feb 2023 14:46:17 +0800
|
||||
Subject: don't check for last version
|
||||
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2021-12-13
|
||||
---
|
||||
lib/utils/update-notifier.js | 81 ++------------------------------------------
|
||||
1 file changed, 2 insertions(+), 79 deletions(-)
|
||||
|
||||
diff --git a/lib/utils/update-notifier.js b/lib/utils/update-notifier.js
|
||||
index 44b6a54..0464561 100644
|
||||
--- a/lib/utils/update-notifier.js
|
||||
+++ b/lib/utils/update-notifier.js
|
||||
@@ -35,85 +35,8 @@
|
||||
@@ -35,85 +35,8 @@ const checkTimeout = async (npm, duration) => {
|
||||
}
|
||||
|
||||
const updateNotifier = async (npm, spec = 'latest') => {
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
Description: fix test
|
||||
Author: Yadd <yadd@debian.org>
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2021-10-06
|
||||
|
||||
--- a/test/lib/edit.js
|
||||
+++ b/test/lib/edit.js
|
||||
@@ -52,11 +52,11 @@
|
||||
editorOpts = null
|
||||
})
|
||||
|
||||
- return edit.exec(['semver'], (err) => {
|
||||
+ return edit.exec(['init-package-json'], (err) => {
|
||||
if (err)
|
||||
throw err
|
||||
|
||||
- const path = resolve(__dirname, '../../node_modules/semver')
|
||||
+ const path = resolve(__dirname, '../../node_modules/init-package-json')
|
||||
t.strictSame(editorBin, EDITOR, 'used the correct editor')
|
||||
t.strictSame(editorArgs, [path], 'edited the correct directory')
|
||||
t.strictSame(editorOpts, { stdio: 'inherit' }, 'passed the correct opts')
|
||||
@@ -75,8 +75,8 @@
|
||||
})
|
||||
|
||||
rebuildFail = new Error('test error')
|
||||
- return edit.exec(['semver'], (err) => {
|
||||
- const path = resolve(__dirname, '../../node_modules/semver')
|
||||
+ return edit.exec(['init-package-json'], (err) => {
|
||||
+ const path = resolve(__dirname, '../../node_modules/init-package-json')
|
||||
t.strictSame(editorBin, EDITOR, 'used the correct editor')
|
||||
t.strictSame(editorArgs, [path], 'edited the correct directory')
|
||||
t.strictSame(editorOpts, { stdio: 'inherit' }, 'passed the correct opts')
|
||||
@@ -96,11 +96,11 @@
|
||||
EDITOR = 'vim'
|
||||
})
|
||||
|
||||
- return edit.exec(['semver'], (err) => {
|
||||
+ return edit.exec(['init-package-json'], (err) => {
|
||||
if (err)
|
||||
throw err
|
||||
|
||||
- const path = resolve(__dirname, '../../node_modules/semver')
|
||||
+ const path = resolve(__dirname, '../../node_modules/init-package-json')
|
||||
t.strictSame(editorBin, 'code', 'used the correct editor')
|
||||
t.strictSame(editorArgs, ['-w', path], 'edited the correct directory, keeping flags')
|
||||
t.strictSame(editorOpts, { stdio: 'inherit' }, 'passed the correct opts')
|
||||
@@ -125,7 +125,7 @@
|
||||
gracefulFs.lstat = _lstat
|
||||
})
|
||||
|
||||
- return edit.exec(['semver'], (err) => {
|
||||
+ return edit.exec(['init-package-json'], (err) => {
|
||||
t.match(err, /lstat failed/, 'user received correct error')
|
||||
t.end()
|
||||
})
|
||||
@@ -137,7 +137,7 @@
|
||||
EDITOR_CODE = 0
|
||||
})
|
||||
|
||||
- return edit.exec(['semver'], (err) => {
|
||||
+ return edit.exec(['init-package-json'], (err) => {
|
||||
t.match(err, /exited with code: 137/, 'user received correct error')
|
||||
t.end()
|
||||
})
|
|
@ -1,70 +0,0 @@
|
|||
Description: remove some tests (needs tap ≥ 14)
|
||||
Author: Xavier Guimard <yadd@debian.org>
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2021-03-15
|
||||
|
||||
--- a/test/lib/utils/config.js
|
||||
+++ b/test/lib/utils/config.js
|
||||
@@ -65,28 +65,6 @@
|
||||
const os = { networkInterfaces, tmpdir }
|
||||
const pkg = { version: '7.0.0' }
|
||||
|
||||
-t.test('working network interfaces, not windows', t => {
|
||||
- const config = requireInject('../../../lib/utils/config.js', {
|
||||
- os,
|
||||
- '@npmcli/ci-detect': () => false,
|
||||
- '../../../lib/utils/is-windows.js': false,
|
||||
- '../../../package.json': pkg,
|
||||
- })
|
||||
- t.matchSnapshot(config)
|
||||
- t.end()
|
||||
-})
|
||||
-
|
||||
-t.test('no working network interfaces, on windows', t => {
|
||||
- const config = requireInject('../../../lib/utils/config.js', {
|
||||
- os: { tmpdir, networkInterfaces: networkInterfacesThrow },
|
||||
- '@npmcli/ci-detect': () => false,
|
||||
- '../../../lib/utils/is-windows.js': true,
|
||||
- '../../../package.json': pkg,
|
||||
- })
|
||||
- t.matchSnapshot(config)
|
||||
- t.end()
|
||||
-})
|
||||
-
|
||||
t.test('no comspec on windows', t => {
|
||||
delete process.env.ComSpec
|
||||
const config = requireInject('../../../lib/utils/config.js', {
|
||||
--- a/test/lib/utils/flat-options.js
|
||||
+++ b/test/lib/utils/flat-options.js
|
||||
@@ -142,7 +142,6 @@
|
||||
npmSession: '12345',
|
||||
cache: generatedFlat.cache.replace(/\\/g, '/'),
|
||||
}
|
||||
- t.matchSnapshot(clean, 'flat options')
|
||||
t.equal(generatedFlat.npmCommand, null, 'command not set yet')
|
||||
npm.command = 'view'
|
||||
t.equal(generatedFlat.npmCommand, 'view', 'command updated via getter')
|
||||
--- a/test/lib/utils/reify-finish.js
|
||||
+++ b/test/lib/utils/reify-finish.js
|
||||
@@ -63,21 +63,6 @@
|
||||
})
|
||||
})
|
||||
|
||||
-t.test('should write if everything above passes', async t => {
|
||||
- expectWrite = true
|
||||
- delete builtinConfMock.loadError
|
||||
- const path = t.testdir()
|
||||
- await reifyFinish(npm, {
|
||||
- options: { global: true },
|
||||
- actualTree: {
|
||||
- inventory: new Map([['node_modules/npm', {path}]]),
|
||||
- },
|
||||
- })
|
||||
- // windowwwwwwssss!!!!!
|
||||
- const data = fs.readFileSync(`${path}/npmrc`, 'utf8').replace(/\r\n/g, '\n')
|
||||
- t.matchSnapshot(data, 'written config')
|
||||
-})
|
||||
-
|
||||
t.test('works without fs.promises', async t => {
|
||||
t.doesNotThrow(() => requireInject('../../../lib/utils/reify-finish.js', {
|
||||
fs: { ...fs, promises: null },
|
|
@ -3,4 +3,3 @@
|
|||
2012_dont_install_man_deps.patch
|
||||
2020_reproducible_documentation_build.patch
|
||||
dont-check-for-last-version.patch
|
||||
#fix-test.patch
|
||||
|
|
Loading…
Reference in New Issue