Skip to content

Commit

Permalink
deps: add @npmcli/fs@2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar authored and nlf committed Aug 2, 2022
1 parent 703dbbf commit c18dbc4
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 261 deletions.
2 changes: 2 additions & 0 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ graph LR;
libnpmexec-->npmcli-arborist["@npmcli/arborist"];
libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"];
libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"];
libnpmexec-->npmcli-fs["@npmcli/fs"];
libnpmexec-->npmcli-run-script["@npmcli/run-script"];
libnpmexec-->npmcli-template-oss["@npmcli/template-oss"];
libnpmexec-->npmlog;
Expand Down Expand Up @@ -345,6 +346,7 @@ graph LR;
libnpmexec-->npmcli-arborist["@npmcli/arborist"];
libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"];
libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"];
libnpmexec-->npmcli-fs["@npmcli/fs"];
libnpmexec-->npmcli-run-script["@npmcli/run-script"];
libnpmexec-->npmcli-template-oss["@npmcli/template-oss"];
libnpmexec-->npmlog;
Expand Down
17 changes: 0 additions & 17 deletions node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js

This file was deleted.

121 changes: 0 additions & 121 deletions node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js

This file was deleted.

4 changes: 2 additions & 2 deletions node_modules/@npmcli/fs/lib/common/owner-sync.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { dirname, resolve } = require('path')
const url = require('url')

const fileURLToPath = require('./file-url-to-path/index.js')
const fs = require('../fs.js')

// given a path, find the owner of the nearest parent
Expand All @@ -13,7 +13,7 @@ const find = (path) => {
// fs methods accept URL objects with a scheme of file: so we need to unwrap
// those into an actual path string before we can resolve it
const resolved = path != null && path.href && path.origin
? resolve(fileURLToPath(path))
? resolve(url.fileURLToPath(path))
: resolve(path)

let stat
Expand Down
4 changes: 2 additions & 2 deletions node_modules/@npmcli/fs/lib/common/owner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { dirname, resolve } = require('path')
const url = require('url')

const fileURLToPath = require('./file-url-to-path/index.js')
const fs = require('../fs.js')

// given a path, find the owner of the nearest parent
Expand All @@ -13,7 +13,7 @@ const find = async (path) => {
// fs methods accept URL objects with a scheme of file: so we need to unwrap
// those into an actual path string before we can resolve it
const resolved = path != null && path.href && path.origin
? resolve(fileURLToPath(path))
? resolve(url.fileURLToPath(path))
: resolve(path)

let stat
Expand Down
2 changes: 1 addition & 1 deletion node_modules/@npmcli/fs/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
...require('./fs.js'),
copyFile: require('./copy-file.js'),
cp: require('./cp/index.js'),
mkdir: require('./mkdir/index.js'),
mkdir: require('./mkdir.js'),
mkdtemp: require('./mkdtemp.js'),
rm: require('./rm/index.js'),
withTempDir: require('./with-temp-dir.js'),
Expand Down
19 changes: 19 additions & 0 deletions node_modules/@npmcli/fs/lib/mkdir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const fs = require('./fs.js')
const getOptions = require('./common/get-options.js')
const withOwner = require('./with-owner.js')

// extends mkdir with the ability to specify an owner of the new dir
const mkdir = async (path, opts) => {
const options = getOptions(opts, {
copy: ['mode', 'recursive'],
wrap: 'mode',
})

return withOwner(
path,
() => fs.mkdir(path, options),
opts
)
}

module.exports = mkdir
29 changes: 0 additions & 29 deletions node_modules/@npmcli/fs/lib/mkdir/index.js

This file was deleted.

81 changes: 0 additions & 81 deletions node_modules/@npmcli/fs/lib/mkdir/polyfill.js

This file was deleted.

2 changes: 1 addition & 1 deletion node_modules/@npmcli/fs/lib/with-temp-dir.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { join, sep } = require('path')

const getOptions = require('./common/get-options.js')
const mkdir = require('./mkdir/index.js')
const mkdir = require('./mkdir.js')
const mkdtemp = require('./mkdtemp.js')
const rm = require('./rm/index.js')

Expand Down
8 changes: 4 additions & 4 deletions node_modules/@npmcli/fs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@npmcli/fs",
"version": "2.1.0",
"version": "2.1.1",
"description": "filesystem utilities for the npm cli",
"main": "lib/index.js",
"files": [
Expand Down Expand Up @@ -33,8 +33,8 @@
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.1.2",
"tap": "^15.1.6"
"@npmcli/template-oss": "3.5.0",
"tap": "^16.0.1"
},
"dependencies": {
"@gar/promisify": "^1.1.3",
Expand All @@ -45,6 +45,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.1.2"
"version": "3.5.0"
}
}
7 changes: 4 additions & 3 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,9 @@
}
},
"node_modules/@npmcli/fs": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz",
"integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.1.tgz",
"integrity": "sha512-1Q0uzx6c/NVNGszePbr5Gc2riSU1zLpNlo/1YWntH+eaPmMgBssAW0qXofCVkpdj3ce4swZtlDYQu+NKiYcptg==",
"inBundle": true,
"dependencies": {
"@gar/promisify": "^1.1.3",
Expand Down Expand Up @@ -10136,6 +10136,7 @@
"dependencies": {
"@npmcli/arborist": "^5.0.0",
"@npmcli/ci-detect": "^2.0.0",
"@npmcli/fs": "^2.1.1",
"@npmcli/run-script": "^4.1.3",
"chalk": "^4.1.0",
"mkdirp-infer-owner": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions workspaces/libnpmexec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"dependencies": {
"@npmcli/arborist": "^5.0.0",
"@npmcli/ci-detect": "^2.0.0",
"@npmcli/fs": "^2.1.1",
"@npmcli/run-script": "^4.1.3",
"chalk": "^4.1.0",
"mkdirp-infer-owner": "^2.0.0",
Expand Down

0 comments on commit c18dbc4

Please sign in to comment.