Skip to content

Commit 357cc29

Browse files
committedApr 17, 2023
deps: walk-up-path@3.0.1
1 parent 2c80b1e commit 357cc29

File tree

15 files changed

+104
-33
lines changed

15 files changed

+104
-33
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.walkUp = void 0;
4+
const path_1 = require("path");
5+
const walkUp = function* (path) {
6+
for (path = (0, path_1.resolve)(path); path;) {
7+
yield path;
8+
const pp = (0, path_1.dirname)(path);
9+
if (pp === path) {
10+
break;
11+
}
12+
else {
13+
path = pp;
14+
}
15+
}
16+
};
17+
exports.walkUp = walkUp;
18+
//# sourceMappingURL=index.js.map
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "commonjs"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { dirname, resolve } from 'path';
2+
export const walkUp = function* (path) {
3+
for (path = resolve(path); path;) {
4+
yield path;
5+
const pp = dirname(path);
6+
if (pp === path) {
7+
break;
8+
}
9+
else {
10+
path = pp;
11+
}
12+
}
13+
};
14+
//# sourceMappingURL=index.js.map
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

‎node_modules/walk-up-path/index.js

-11
This file was deleted.
+52-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
{
22
"name": "walk-up-path",
3-
"version": "1.0.0",
3+
"version": "3.0.1",
44
"files": [
5-
"index.js"
5+
"dist"
66
],
7+
"main": "./dist/cjs/index.js",
8+
"module": "./dist/mjs/index.js",
9+
"types": "./dist/mjs/index.d.ts",
10+
"exports": {
11+
".": {
12+
"require": {
13+
"types": "./dist/cjs/index.d.ts",
14+
"default": "./dist/cjs/index.js"
15+
},
16+
"import": {
17+
"types": "./dist/mjs/index.d.ts",
18+
"default": "./dist/mjs/index.js"
19+
}
20+
}
21+
},
722
"description": "Given a path string, return a generator that walks up the path, emitting each dirname.",
823
"repository": {
924
"type": "git",
@@ -12,17 +27,46 @@
1227
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
1328
"license": "ISC",
1429
"scripts": {
15-
"test": "tap",
16-
"snap": "tap",
1730
"preversion": "npm test",
1831
"postversion": "npm publish",
19-
"prepublishOnly": "git push origin --follow-tags"
32+
"prepublishOnly": "git push origin --follow-tags",
33+
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh",
34+
"pretest": "npm run prepare",
35+
"presnap": "npm run prepare",
36+
"test": "c8 tap",
37+
"snap": "c8 tap",
38+
"format": "prettier --write . --loglevel warn",
39+
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
40+
},
41+
"prettier": {
42+
"semi": false,
43+
"printWidth": 75,
44+
"tabWidth": 2,
45+
"useTabs": false,
46+
"singleQuote": true,
47+
"jsxSingleQuote": false,
48+
"bracketSameLine": true,
49+
"arrowParens": "avoid",
50+
"endOfLine": "lf"
2051
},
2152
"tap": {
22-
"check-coverage": true
53+
"coverage": false,
54+
"node-arg": [
55+
"--no-warnings",
56+
"--loader",
57+
"ts-node/esm"
58+
],
59+
"ts": false
2360
},
2461
"devDependencies": {
25-
"tap": "^14.10.7",
26-
"require-inject": "^1.4.4"
62+
"@types/node": "^18.15.5",
63+
"@types/tap": "^15.0.8",
64+
"c8": "^7.13.0",
65+
"eslint-config-prettier": "^8.8.0",
66+
"prettier": "^2.8.6",
67+
"tap": "^16.3.4",
68+
"ts-node": "^10.9.1",
69+
"typedoc": "^0.23.28",
70+
"typescript": "^5.0.2"
2771
}
2872
}

‎package-lock.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -14593,9 +14593,9 @@
1459314593
}
1459414594
},
1459514595
"node_modules/walk-up-path": {
14596-
"version": "1.0.0",
14597-
"resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz",
14598-
"integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg=="
14596+
"version": "3.0.1",
14597+
"resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz",
14598+
"integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA=="
1459914599
},
1460014600
"node_modules/wcwidth": {
1460114601
"version": "1.0.1",
@@ -15060,7 +15060,7 @@
1506015060
"semver": "^7.3.7",
1506115061
"ssri": "^10.0.1",
1506215062
"treeverse": "^3.0.0",
15063-
"walk-up-path": "^1.0.0"
15063+
"walk-up-path": "^3.0.1"
1506415064
},
1506515065
"bin": {
1506615066
"arborist": "bin/index.js"
@@ -15091,7 +15091,7 @@
1509115091
"proc-log": "^3.0.0",
1509215092
"read-package-json-fast": "^3.0.2",
1509315093
"semver": "^7.3.5",
15094-
"walk-up-path": "^1.0.0"
15094+
"walk-up-path": "^3.0.1"
1509515095
},
1509615096
"devDependencies": {
1509715097
"@npmcli/eslint-config": "^4.0.0",
@@ -15158,7 +15158,7 @@
1515815158
"read": "^2.0.0",
1515915159
"read-package-json-fast": "^3.0.2",
1516015160
"semver": "^7.3.7",
15161-
"walk-up-path": "^1.0.0"
15161+
"walk-up-path": "^3.0.1"
1516215162
},
1516315163
"devDependencies": {
1516415164
"@npmcli/eslint-config": "^4.0.0",

‎workspaces/arborist/lib/arborist/load-actual.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { relative, dirname, resolve, join, normalize } = require('path')
44

55
const rpj = require('read-package-json-fast')
66
const { readdirScoped } = require('@npmcli/fs')
7-
const walkUp = require('walk-up-path')
7+
const { walkUp } = require('walk-up-path')
88
const ancestorPath = require('common-ancestor-path')
99
const treeCheck = require('../tree-check.js')
1010

‎workspaces/arborist/lib/arborist/reify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { subset, intersects } = require('semver')
66
const npa = require('npm-package-arg')
77
const semver = require('semver')
88
const debug = require('../debug.js')
9-
const walkUp = require('walk-up-path')
9+
const { walkUp } = require('walk-up-path')
1010
const log = require('proc-log')
1111
const hgi = require('hosted-git-info')
1212
const rpj = require('read-package-json-fast')

‎workspaces/arborist/lib/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const npa = require('npm-package-arg')
3939
const debug = require('./debug.js')
4040
const gatherDepSet = require('./gather-dep-set.js')
4141
const treeCheck = require('./tree-check.js')
42-
const walkUp = require('walk-up-path')
42+
const { walkUp } = require('walk-up-path')
4343

4444
const { resolve, relative, dirname, basename } = require('path')
4545
const util = require('util')

‎workspaces/arborist/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"semver": "^7.3.7",
3636
"ssri": "^10.0.1",
3737
"treeverse": "^3.0.0",
38-
"walk-up-path": "^1.0.0"
38+
"walk-up-path": "^3.0.1"
3939
},
4040
"devDependencies": {
4141
"@npmcli/eslint-config": "^4.0.0",

‎workspaces/config/lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// TODO: set the scope config from package.json or explicit cli config
2-
const walkUp = require('walk-up-path')
2+
const { walkUp } = require('walk-up-path')
33
const ini = require('ini')
44
const nopt = require('nopt')
55
const mapWorkspaces = require('@npmcli/map-workspaces')

‎workspaces/config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"proc-log": "^3.0.0",
4444
"read-package-json-fast": "^3.0.2",
4545
"semver": "^7.3.5",
46-
"walk-up-path": "^1.0.0"
46+
"walk-up-path": "^3.0.1"
4747
},
4848
"engines": {
4949
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"

‎workspaces/libnpmexec/lib/file-exists.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { resolve } = require('path')
22
const { stat } = require('fs/promises')
3-
const walkUp = require('walk-up-path')
3+
const { walkUp } = require('walk-up-path')
44

55
const fileExists = async (file) => {
66
try {

‎workspaces/libnpmexec/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"read": "^2.0.0",
7272
"read-package-json-fast": "^3.0.2",
7373
"semver": "^7.3.7",
74-
"walk-up-path": "^1.0.0"
74+
"walk-up-path": "^3.0.1"
7575
},
7676
"templateOSS": {
7777
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",

0 commit comments

Comments
 (0)
Please sign in to comment.