Skip to content

Commit f0f3071

Browse files
committed
deps: @npmcli/[email protected]
1 parent d7e2499 commit f0f3071

File tree

10 files changed

+622
-15
lines changed

10 files changed

+622
-15
lines changed

node_modules/@npmcli/fs/LICENSE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file is automatically added by @npmcli/template-oss. Do not edit. -->
2+
13
ISC License
24

35
Copyright npm, Inc.

node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class ERR_INVALID_FILE_URL_PATH extends TypeError {
2929

3030
class ERR_INVALID_ARG_TYPE extends TypeError {
3131
constructor (name, actual) {
32-
super(`The "${name}" argument must be one of type string or an instance of URL. Received type ${typeof actual} ${actual}`)
32+
super(`The "${name}" argument must be one of type string or an instance ` +
33+
`of URL. Received type ${typeof actual} ${actual}`)
3334
this.code = 'ERR_INVALID_ARG_TYPE'
3435
}
3536

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2011-2017 JP Richardson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
6+
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
7+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
13+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
14+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const fs = require('../fs.js')
2+
const getOptions = require('../common/get-options.js')
3+
const node = require('../common/node.js')
4+
const polyfill = require('./polyfill.js')
5+
6+
// node 16.7.0 added fs.cp
7+
const useNative = node.satisfies('>=16.7.0')
8+
9+
const cp = async (src, dest, opts) => {
10+
const options = getOptions(opts, {
11+
copy: ['dereference', 'errorOnExist', 'filter', 'force', 'preserveTimestamps', 'recursive'],
12+
})
13+
14+
// the polyfill is tested separately from this module, no need to hack
15+
// process.version to try to trigger it just for coverage
16+
// istanbul ignore next
17+
return useNative
18+
? fs.cp(src, dest, options)
19+
: polyfill(src, dest, options)
20+
}
21+
22+
module.exports = cp

0 commit comments

Comments
 (0)