deps: remove backup files
PR-URL: https://github.com/nodejs/node/pull/28865 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
779a05d5d1
commit
ddf7e2a752
127
deps/npm/node_modules/copy-concurrently/README.md~
generated
vendored
127
deps/npm/node_modules/copy-concurrently/README.md~
generated
vendored
@ -1,127 +0,0 @@
|
||||
# copy-concurrently
|
||||
|
||||
Copy files, directories and symlinks
|
||||
|
||||
```
|
||||
const copy = require('copy-concurrently')
|
||||
copy('/path/to/thing', '/new/path/thing').then(() => {
|
||||
// this is now copied
|
||||
}).catch(err => {
|
||||
// oh noooo
|
||||
})
|
||||
```
|
||||
|
||||
Copies files, directories and symlinks. Ownership is maintained when
|
||||
running as root, permissions are always maintained. On Windows, if symlinks
|
||||
are unavailable then junctions will be used.
|
||||
|
||||
## PUBLIC INTERFACE
|
||||
|
||||
### copy(from, to, [options]) → Promise
|
||||
|
||||
Recursively copies `from` to `to` and resolves its promise when finished.
|
||||
If `to` already exists then the promise will be rejected with an `EEXIST`
|
||||
error.
|
||||
|
||||
Options are:
|
||||
|
||||
* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once.
|
||||
* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory.
|
||||
* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
|
||||
an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
|
||||
fails then we'll try making a junction instead.
|
||||
|
||||
Options can also include dependency injection:
|
||||
|
||||
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
|
||||
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
|
||||
to use `graceful-fs` or to inject a mock.
|
||||
* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The
|
||||
implementation of `writeStreamAtomic` to use. Used to inject a mock.
|
||||
* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
|
||||
|
||||
## EXTENSION INTERFACE
|
||||
|
||||
Ordinarily you'd only call `copy` above. But it's possible to use it's
|
||||
component functions directly. This is useful if, say, you're writing
|
||||
[move-concurently](https://npmjs.com/package/move-concurrently).
|
||||
|
||||
### copy.file(from, to, options) → Promise
|
||||
|
||||
Copies a ordinary file `from` to destination `to`. Uses
|
||||
`fs-write-stream-atomic` to ensure that the file is entirely copied or not
|
||||
at all.
|
||||
|
||||
Options are:
|
||||
|
||||
* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
|
||||
set the user and group of `to`. If uid is present then gid must be too.
|
||||
* mode - (Optional) If set then `to` will have its perms set to `mode`.
|
||||
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
|
||||
to use `graceful-fs` or to inject a mock.
|
||||
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
|
||||
* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The
|
||||
implementation of `writeStreamAtomic` to use. Used to inject a mock.
|
||||
|
||||
### copy.symlink(from, to, options) → Promise
|
||||
|
||||
Copies a symlink `from` to destination `to`. If on Windows then if
|
||||
symlinking fails, a junction will be used instead.
|
||||
|
||||
Options are:
|
||||
|
||||
* top - The top level the copy is being run from. This is used to determine
|
||||
if the symlink destination is within the set of files we're copying or
|
||||
outside it.
|
||||
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
|
||||
to use `graceful-fs` or to inject a mock.
|
||||
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
|
||||
* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
|
||||
an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
|
||||
fails then we'll try making a junction instead.
|
||||
|
||||
### copy.recurse(from, to, options) → Promise
|
||||
|
||||
Reads all of the files in directory `from` and adds them to the `queue`
|
||||
using `recurseWith` (by default `copy.item`).
|
||||
|
||||
Options are:
|
||||
|
||||
* queue - A [`run-queue`](https://npmjs.com/package/run-queue) object to add files found inside `from` to.
|
||||
* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory.
|
||||
* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
|
||||
set the user and group of `to`. If uid is present then gid must be too.
|
||||
* mode - (Optional) If set then `to` will have its perms set to `mode`.
|
||||
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
|
||||
to use `graceful-fs` or to inject a mock.
|
||||
* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
|
||||
|
||||
### copy.item(from, to, options) → Promise
|
||||
|
||||
Copies some kind of `from` to destination `to`. This looks at the filetype
|
||||
and calls `copy.file`, `copy.symlink` or `copy.recurse` as appropriate.
|
||||
|
||||
Symlink copies are queued with a priority such that they happen after all
|
||||
file and directory copies as you can't create a junction on windows to a
|
||||
file that doesn't exist yet.
|
||||
|
||||
Options are:
|
||||
|
||||
* top - The top level the copy is being run from. This is used to determine
|
||||
if the symlink destination is within the set of files we're copying or
|
||||
outside it.
|
||||
* queue - The [`run-queue`](https://npmjs.com/package/run-queue) object to
|
||||
pass to `copy.recurse` if `from` is a directory.
|
||||
* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory.
|
||||
* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
|
||||
set the user and group of `to`. If uid is present then gid must be too.
|
||||
* mode - (Optional) If set then `to` will have its perms set to `mode`.
|
||||
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
|
||||
to use `graceful-fs` or to inject a mock.
|
||||
* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
|
||||
* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
|
||||
an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
|
||||
fails then we'll try making a junction instead.
|
||||
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
|
||||
* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The
|
||||
implementation of `writeStreamAtomic` to use. Used to inject a mock.
|
79
deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~
generated
vendored
79
deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~
generated
vendored
@ -1,79 +0,0 @@
|
||||
'use strict'
|
||||
const Bluebird = require('bluebird')
|
||||
const test = require('tap').test
|
||||
const requireInject = require('require-inject')
|
||||
const findPrefix = requireInject('../find-prefix.js', {
|
||||
fs: {
|
||||
readdir: mockReaddir
|
||||
}
|
||||
})
|
||||
|
||||
test('find-prefix', t => {
|
||||
const tests = {
|
||||
'/Users/example/code/test1/node_modules': '/Users/example/code/test1',
|
||||
'/Users/example/code/test1/node_modules/node_modules': '/Users/example/code/test1',
|
||||
'/Users/example/code/test1/sub1': '/Users/example/code/test1',
|
||||
'/Users/example/code/test1/sub1/sub1a': '/Users/example/code/test1',
|
||||
'/Users/example/code/test2': '/Users/example/code/test2',
|
||||
'/Users/example/code/test2/sub2': '/Users/example/code/test2',
|
||||
'/Users/example/code': '/Users/example/code',
|
||||
'/Users/example': '/Users/example',
|
||||
'/does/not/exist': '/does/not/exist'
|
||||
}
|
||||
t.plan(Object.keys(tests).length)
|
||||
return Bluebird.map(Object.keys(tests), dir => {
|
||||
return findPrefix(dir).then(pre => {
|
||||
t.is(pre, tests[dir], dir)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
test('fail-prefix', t => {
|
||||
return findPrefix('/Users/example/eperm').then(pre => {
|
||||
t.fail('no eperm')
|
||||
}).catch(err => {
|
||||
t.is(err.code, 'EPERM', 'got perm error')
|
||||
})
|
||||
})
|
||||
|
||||
const fixture = {
|
||||
'Users': {
|
||||
'example': {
|
||||
'code': {
|
||||
'test1': {
|
||||
'node_modules': {
|
||||
'node_modules': {}
|
||||
},
|
||||
'sub1': {
|
||||
'sub1a': {}
|
||||
}
|
||||
},
|
||||
'test2': {
|
||||
'package.json': {},
|
||||
'sub2': {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mockReaddir (dir, cb) {
|
||||
if (/eperm/.test(dir)) {
|
||||
const err = new Error('Can not read: ' + dir)
|
||||
err.code = 'EPERM'
|
||||
return cb(err)
|
||||
}
|
||||
const parts = dir.split(/\//).slice(1)
|
||||
let cwd = fixture
|
||||
let part
|
||||
while (part = parts.shift()) {
|
||||
if (part in cwd) {
|
||||
cwd = cwd[part]
|
||||
} else {
|
||||
const err = new Error('Does not exist: ' + dir + ' * ' + part)
|
||||
err.code = 'ENOENT'
|
||||
return cb(err)
|
||||
}
|
||||
}
|
||||
return cb(null, Object.keys(cwd))
|
||||
}
|
52
deps/npm/node_modules/move-concurrently/README.md~
generated
vendored
52
deps/npm/node_modules/move-concurrently/README.md~
generated
vendored
@ -1,52 +0,0 @@
|
||||
# move-concurrently
|
||||
|
||||
Move files and directories.
|
||||
|
||||
```
|
||||
const move = require('move-concurrently')
|
||||
move('/path/to/thing', '/new/path/thing'), err => {
|
||||
if (err) throw err
|
||||
// thing is now moved!
|
||||
})
|
||||
```
|
||||
|
||||
Uses `rename` to move things as fast as possible.
|
||||
|
||||
If you `move` across devices or on filesystems that don't support renaming
|
||||
large directories. That is, situations that result in `rename` returning
|
||||
the `EXDEV` error, then `move` will fallback to copy + delete.
|
||||
|
||||
When recursively copying directories it will first try to rename the
|
||||
contents before falling back to copying. While this will be slightly slower
|
||||
in true cross-device scenarios, it is MUCH faster in cases where the
|
||||
filesystem can't handle directory renames.
|
||||
|
||||
When copying ownership is maintained when running as root. Permissions are
|
||||
always maintained. On Windows, if symlinks are unavailable then junctions
|
||||
will be used.
|
||||
|
||||
## INTERFACE
|
||||
|
||||
### move(from, to, options) → Promise
|
||||
|
||||
Recursively moves `from` to `to` and resolves its promise when finished.
|
||||
If `to` already exists then the promise will be rejected with an `EEXIST`
|
||||
error.
|
||||
|
||||
Starts by trying to rename `from` to `to`.
|
||||
|
||||
Options are:
|
||||
|
||||
* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once.
|
||||
* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
|
||||
an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
|
||||
fails then we'll try making a junction instead.
|
||||
|
||||
Options can also include dependency injection:
|
||||
|
||||
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
|
||||
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
|
||||
to use `graceful-fs` or to inject a mock.
|
||||
* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The
|
||||
implementation of `writeStreamAtomic` to use. Used to inject a mock.
|
||||
* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
|
Loading…
x
Reference in New Issue
Block a user