From 357cc29a335e684391c7b840019223e555919406 Mon Sep 17 00:00:00 2001 From: Gar Date: Fri, 14 Apr 2023 19:24:32 -0700 Subject: [PATCH] deps: walk-up-path@3.0.1 --- node_modules/walk-up-path/dist/cjs/index.js | 18 ++++++ .../walk-up-path/dist/cjs/package.json | 3 + node_modules/walk-up-path/dist/mjs/index.js | 14 +++++ .../walk-up-path/dist/mjs/package.json | 3 + node_modules/walk-up-path/index.js | 11 ---- node_modules/walk-up-path/package.json | 60 ++++++++++++++++--- package-lock.json | 12 ++-- .../arborist/lib/arborist/load-actual.js | 2 +- workspaces/arborist/lib/arborist/reify.js | 2 +- workspaces/arborist/lib/node.js | 2 +- workspaces/arborist/package.json | 2 +- workspaces/config/lib/index.js | 2 +- workspaces/config/package.json | 2 +- workspaces/libnpmexec/lib/file-exists.js | 2 +- workspaces/libnpmexec/package.json | 2 +- 15 files changed, 104 insertions(+), 33 deletions(-) create mode 100644 node_modules/walk-up-path/dist/cjs/index.js create mode 100644 node_modules/walk-up-path/dist/cjs/package.json create mode 100644 node_modules/walk-up-path/dist/mjs/index.js create mode 100644 node_modules/walk-up-path/dist/mjs/package.json delete mode 100644 node_modules/walk-up-path/index.js diff --git a/node_modules/walk-up-path/dist/cjs/index.js b/node_modules/walk-up-path/dist/cjs/index.js new file mode 100644 index 0000000000000..9295d00ca85b1 --- /dev/null +++ b/node_modules/walk-up-path/dist/cjs/index.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.walkUp = void 0; +const path_1 = require("path"); +const walkUp = function* (path) { + for (path = (0, path_1.resolve)(path); path;) { + yield path; + const pp = (0, path_1.dirname)(path); + if (pp === path) { + break; + } + else { + path = pp; + } + } +}; +exports.walkUp = walkUp; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/walk-up-path/dist/cjs/package.json b/node_modules/walk-up-path/dist/cjs/package.json new file mode 100644 index 0000000000000..5bbefffbabee3 --- /dev/null +++ b/node_modules/walk-up-path/dist/cjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/walk-up-path/dist/mjs/index.js b/node_modules/walk-up-path/dist/mjs/index.js new file mode 100644 index 0000000000000..93f37e1d81968 --- /dev/null +++ b/node_modules/walk-up-path/dist/mjs/index.js @@ -0,0 +1,14 @@ +import { dirname, resolve } from 'path'; +export const walkUp = function* (path) { + for (path = resolve(path); path;) { + yield path; + const pp = dirname(path); + if (pp === path) { + break; + } + else { + path = pp; + } + } +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/walk-up-path/dist/mjs/package.json b/node_modules/walk-up-path/dist/mjs/package.json new file mode 100644 index 0000000000000..3dbc1ca591c05 --- /dev/null +++ b/node_modules/walk-up-path/dist/mjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/walk-up-path/index.js b/node_modules/walk-up-path/index.js deleted file mode 100644 index 05524a6c055eb..0000000000000 --- a/node_modules/walk-up-path/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const {dirname, resolve} = require('path') -module.exports = function* (path) { - for (path = resolve(path); path;) { - yield path - const pp = dirname(path) - if (pp === path) - path = null - else - path = pp - } -} diff --git a/node_modules/walk-up-path/package.json b/node_modules/walk-up-path/package.json index df69d9238514c..0931c670a8d04 100644 --- a/node_modules/walk-up-path/package.json +++ b/node_modules/walk-up-path/package.json @@ -1,9 +1,24 @@ { "name": "walk-up-path", - "version": "1.0.0", + "version": "3.0.1", "files": [ - "index.js" + "dist" ], + "main": "./dist/cjs/index.js", + "module": "./dist/mjs/index.js", + "types": "./dist/mjs/index.d.ts", + "exports": { + ".": { + "require": { + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index.js" + }, + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.js" + } + } + }, "description": "Given a path string, return a generator that walks up the path, emitting each dirname.", "repository": { "type": "git", @@ -12,17 +27,46 @@ "author": "Isaac Z. Schlueter (https://izs.me)", "license": "ISC", "scripts": { - "test": "tap", - "snap": "tap", "preversion": "npm test", "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "c8 tap", + "snap": "c8 tap", + "format": "prettier --write . --loglevel warn", + "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" + }, + "prettier": { + "semi": false, + "printWidth": 75, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" }, "tap": { - "check-coverage": true + "coverage": false, + "node-arg": [ + "--no-warnings", + "--loader", + "ts-node/esm" + ], + "ts": false }, "devDependencies": { - "tap": "^14.10.7", - "require-inject": "^1.4.4" + "@types/node": "^18.15.5", + "@types/tap": "^15.0.8", + "c8": "^7.13.0", + "eslint-config-prettier": "^8.8.0", + "prettier": "^2.8.6", + "tap": "^16.3.4", + "ts-node": "^10.9.1", + "typedoc": "^0.23.28", + "typescript": "^5.0.2" } } diff --git a/package-lock.json b/package-lock.json index 906600f0d4711..03f1e28874a3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14593,9 +14593,9 @@ } }, "node_modules/walk-up-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", - "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", + "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==" }, "node_modules/wcwidth": { "version": "1.0.1", @@ -15060,7 +15060,7 @@ "semver": "^7.3.7", "ssri": "^10.0.1", "treeverse": "^3.0.0", - "walk-up-path": "^1.0.0" + "walk-up-path": "^3.0.1" }, "bin": { "arborist": "bin/index.js" @@ -15091,7 +15091,7 @@ "proc-log": "^3.0.0", "read-package-json-fast": "^3.0.2", "semver": "^7.3.5", - "walk-up-path": "^1.0.0" + "walk-up-path": "^3.0.1" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", @@ -15158,7 +15158,7 @@ "read": "^2.0.0", "read-package-json-fast": "^3.0.2", "semver": "^7.3.7", - "walk-up-path": "^1.0.0" + "walk-up-path": "^3.0.1" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", diff --git a/workspaces/arborist/lib/arborist/load-actual.js b/workspaces/arborist/lib/arborist/load-actual.js index 6c3f917c6ac9d..a87e09bc05328 100644 --- a/workspaces/arborist/lib/arborist/load-actual.js +++ b/workspaces/arborist/lib/arborist/load-actual.js @@ -4,7 +4,7 @@ const { relative, dirname, resolve, join, normalize } = require('path') const rpj = require('read-package-json-fast') const { readdirScoped } = require('@npmcli/fs') -const walkUp = require('walk-up-path') +const { walkUp } = require('walk-up-path') const ancestorPath = require('common-ancestor-path') const treeCheck = require('../tree-check.js') diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index 760fa977ecfd9..6c9fc438a024b 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -6,7 +6,7 @@ const { subset, intersects } = require('semver') const npa = require('npm-package-arg') const semver = require('semver') const debug = require('../debug.js') -const walkUp = require('walk-up-path') +const { walkUp } = require('walk-up-path') const log = require('proc-log') const hgi = require('hosted-git-info') const rpj = require('read-package-json-fast') diff --git a/workspaces/arborist/lib/node.js b/workspaces/arborist/lib/node.js index b21a3d8e3de0a..e264194fd6a6c 100644 --- a/workspaces/arborist/lib/node.js +++ b/workspaces/arborist/lib/node.js @@ -39,7 +39,7 @@ const npa = require('npm-package-arg') const debug = require('./debug.js') const gatherDepSet = require('./gather-dep-set.js') const treeCheck = require('./tree-check.js') -const walkUp = require('walk-up-path') +const { walkUp } = require('walk-up-path') const { resolve, relative, dirname, basename } = require('path') const util = require('util') diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index f5706d414ef12..3506c27027e79 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -35,7 +35,7 @@ "semver": "^7.3.7", "ssri": "^10.0.1", "treeverse": "^3.0.0", - "walk-up-path": "^1.0.0" + "walk-up-path": "^3.0.1" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", diff --git a/workspaces/config/lib/index.js b/workspaces/config/lib/index.js index 7148e126a5db9..9bba1d6977ae3 100644 --- a/workspaces/config/lib/index.js +++ b/workspaces/config/lib/index.js @@ -1,5 +1,5 @@ // TODO: set the scope config from package.json or explicit cli config -const walkUp = require('walk-up-path') +const { walkUp } = require('walk-up-path') const ini = require('ini') const nopt = require('nopt') const mapWorkspaces = require('@npmcli/map-workspaces') diff --git a/workspaces/config/package.json b/workspaces/config/package.json index 7aec3c2d9cc92..d12aeed64a5fd 100644 --- a/workspaces/config/package.json +++ b/workspaces/config/package.json @@ -43,7 +43,7 @@ "proc-log": "^3.0.0", "read-package-json-fast": "^3.0.2", "semver": "^7.3.5", - "walk-up-path": "^1.0.0" + "walk-up-path": "^3.0.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" diff --git a/workspaces/libnpmexec/lib/file-exists.js b/workspaces/libnpmexec/lib/file-exists.js index 0a8d79e83b256..55c04bd4dc547 100644 --- a/workspaces/libnpmexec/lib/file-exists.js +++ b/workspaces/libnpmexec/lib/file-exists.js @@ -1,6 +1,6 @@ const { resolve } = require('path') const { stat } = require('fs/promises') -const walkUp = require('walk-up-path') +const { walkUp } = require('walk-up-path') const fileExists = async (file) => { try { diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 2582a253f906c..92e14355868b6 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -71,7 +71,7 @@ "read": "^2.0.0", "read-package-json-fast": "^3.0.2", "semver": "^7.3.7", - "walk-up-path": "^1.0.0" + "walk-up-path": "^3.0.1" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",