summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/tar/node_modules/chownr
diff options
context:
space:
mode:
authorisaacs <nope@not.real>2019-07-03 10:23:19 -0700
committerMichaƫl Zasso <targos@protonmail.com>2019-07-20 11:29:59 +0200
commit1ce2b5e828bf8b68c4c55387eab5a14f8aac7e10 (patch)
tree610a82da92bc5b111f5ae238b99ee9549b3eec64 /deps/npm/node_modules/tar/node_modules/chownr
parentb379c0e8b6b1f67fb7985d3c51f6200e2e3f2290 (diff)
downloadandroid-node-v8-1ce2b5e828bf8b68c4c55387eab5a14f8aac7e10.tar.gz
android-node-v8-1ce2b5e828bf8b68c4c55387eab5a14f8aac7e10.tar.bz2
android-node-v8-1ce2b5e828bf8b68c4c55387eab5a14f8aac7e10.zip
deps: upgrade npm to 6.10.0
PR-URL: https://github.com/nodejs/node/pull/28525 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/tar/node_modules/chownr')
-rw-r--r--deps/npm/node_modules/tar/node_modules/chownr/LICENSE15
-rw-r--r--deps/npm/node_modules/tar/node_modules/chownr/README.md3
-rw-r--r--deps/npm/node_modules/tar/node_modules/chownr/chownr.js88
-rw-r--r--deps/npm/node_modules/tar/node_modules/chownr/package.json59
4 files changed, 0 insertions, 165 deletions
diff --git a/deps/npm/node_modules/tar/node_modules/chownr/LICENSE b/deps/npm/node_modules/tar/node_modules/chownr/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/tar/node_modules/chownr/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/tar/node_modules/chownr/README.md b/deps/npm/node_modules/tar/node_modules/chownr/README.md
deleted file mode 100644
index 70e9a54a32..0000000000
--- a/deps/npm/node_modules/tar/node_modules/chownr/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Like `chown -R`.
-
-Takes the same arguments as `fs.chown()`
diff --git a/deps/npm/node_modules/tar/node_modules/chownr/chownr.js b/deps/npm/node_modules/tar/node_modules/chownr/chownr.js
deleted file mode 100644
index 7e63928827..0000000000
--- a/deps/npm/node_modules/tar/node_modules/chownr/chownr.js
+++ /dev/null
@@ -1,88 +0,0 @@
-'use strict'
-const fs = require('fs')
-const path = require('path')
-
-/* istanbul ignore next */
-const LCHOWN = fs.lchown ? 'lchown' : 'chown'
-/* istanbul ignore next */
-const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
-
-// fs.readdir could only accept an options object as of node v6
-const nodeVersion = process.version
-let readdir = (path, options, cb) => fs.readdir(path, options, cb)
-let readdirSync = (path, options) => fs.readdirSync(path, options)
-/* istanbul ignore next */
-if (/^v4\./.test(nodeVersion))
- readdir = (path, options, cb) => fs.readdir(path, cb)
-
-const chownrKid = (p, child, uid, gid, cb) => {
- if (typeof child === 'string')
- return fs.lstat(path.resolve(p, child), (er, stats) => {
- if (er)
- return cb(er)
- stats.name = child
- chownrKid(p, stats, uid, gid, cb)
- })
-
- if (child.isDirectory()) {
- chownr(path.resolve(p, child.name), uid, gid, er => {
- if (er)
- return cb(er)
- fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
- })
- } else
- fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
-}
-
-
-const chownr = (p, uid, gid, cb) => {
- readdir(p, { withFileTypes: true }, (er, children) => {
- // any error other than ENOTDIR or ENOTSUP means it's not readable,
- // or doesn't exist. give up.
- if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er)
- if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb)
-
- let len = children.length
- let errState = null
- const then = er => {
- if (errState) return
- if (er) return cb(errState = er)
- if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb)
- }
-
- children.forEach(child => chownrKid(p, child, uid, gid, then))
- })
-}
-
-const chownrKidSync = (p, child, uid, gid) => {
- if (typeof child === 'string') {
- const stats = fs.lstatSync(path.resolve(p, child))
- stats.name = child
- child = stats
- }
-
- if (child.isDirectory())
- chownrSync(path.resolve(p, child.name), uid, gid)
-
- fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid)
-}
-
-const chownrSync = (p, uid, gid) => {
- let children
- try {
- children = readdirSync(p, { withFileTypes: true })
- } catch (er) {
- if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
- return fs[LCHOWNSYNC](p, uid, gid)
- throw er
- }
-
- if (children.length)
- children.forEach(child => chownrKidSync(p, child, uid, gid))
-
- return fs[LCHOWNSYNC](p, uid, gid)
-}
-
-module.exports = chownr
-chownr.sync = chownrSync
diff --git a/deps/npm/node_modules/tar/node_modules/chownr/package.json b/deps/npm/node_modules/tar/node_modules/chownr/package.json
deleted file mode 100644
index 41e75b7fa6..0000000000
--- a/deps/npm/node_modules/tar/node_modules/chownr/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "chownr@^1.1.1",
- "_id": "chownr@1.1.1",
- "_inBundle": false,
- "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
- "_location": "/tar/chownr",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "chownr@^1.1.1",
- "name": "chownr",
- "escapedName": "chownr",
- "rawSpec": "^1.1.1",
- "saveSpec": null,
- "fetchSpec": "^1.1.1"
- },
- "_requiredBy": [
- "/tar"
- ],
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
- "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494",
- "_spec": "chownr@^1.1.1",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/chownr/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "like `chown -R`",
- "devDependencies": {
- "mkdirp": "0.3",
- "rimraf": "",
- "tap": "^12.0.1"
- },
- "files": [
- "chownr.js"
- ],
- "homepage": "https://github.com/isaacs/chownr#readme",
- "license": "ISC",
- "main": "chownr.js",
- "name": "chownr",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/chownr.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --cov"
- },
- "version": "1.1.1"
-}