Skip to content

Commit 789c320

Browse files
authored
Replace mkdirp with fs.mkdirSync(path, { recursive: true }) (#228017)
* Replace mkdirp with fs.mkdirSync(path, { recursive: true }) (fix #227931) * compile
1 parent 8b7eb51 commit 789c320

17 files changed

+11
-129
lines changed

build/gulpfile.vscode.win32.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const pkg = require('../package.json');
1616
const product = require('../product.json');
1717
const vfs = require('vinyl-fs');
1818
const rcedit = require('rcedit');
19-
const mkdirp = require('mkdirp');
2019

2120
const repoPath = path.dirname(__dirname);
2221
const buildPath = (/** @type {string} */ arch) => path.join(path.dirname(repoPath), `VSCode-win32-${arch}`);
@@ -75,7 +74,7 @@ function buildWin32Setup(arch, target) {
7574

7675
const sourcePath = buildPath(arch);
7776
const outputPath = setupDir(arch, target);
78-
mkdirp.sync(outputPath);
77+
fs.mkdirSync(outputPath, { recursive: true });
7978

8079
const originalProductJsonPath = path.join(sourcePath, 'resources/app/product.json');
8180
const productJsonPath = path.join(outputPath, 'product.json');

build/lib/builtInExtensions.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/builtInExtensions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import * as fancyLog from 'fancy-log';
1515
import * as ansiColors from 'ansi-colors';
1616
import { Stream } from 'stream';
1717

18-
const mkdirp = require('mkdirp');
19-
2018
export interface IExtensionDefinition {
2119
name: string;
2220
version: string;
@@ -147,7 +145,7 @@ function readControlFile(): IControlFile {
147145
}
148146

149147
function writeControlFile(control: IControlFile): void {
150-
mkdirp.sync(path.dirname(controlFilePath));
148+
fs.mkdirSync(path.dirname(controlFilePath), { recursive: true });
151149
fs.writeFileSync(controlFilePath, JSON.stringify(control, null, 2));
152150
}
153151

build/package-lock.json

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"@types/mime": "0.0.29",
2626
"@types/minimatch": "^3.0.3",
2727
"@types/minimist": "^1.2.1",
28-
"@types/mkdirp": "^1.0.1",
2928
"@types/mocha": "^9.1.1",
3029
"@types/node": "20.x",
3130
"@types/pump": "^1.0.1",
@@ -48,7 +47,6 @@
4847
"gulp-sort": "^2.0.0",
4948
"jsonc-parser": "^2.3.0",
5049
"mime": "^1.4.1",
51-
"mkdirp": "^1.0.4",
5250
"source-map": "0.6.1",
5351
"ternary-stream": "^3.0.0",
5452
"through2": "^4.0.2",

cglicenses.json

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -241,33 +241,6 @@
241241
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
242242
]
243243
},
244-
{
245-
// Reason: The substack org has been deleted on GH
246-
"name": "mkdirp",
247-
"fullLicenseText": [
248-
"Copyright 2010 James Halliday ([email protected])",
249-
"",
250-
"This project is free software released under the MIT/X11 license:",
251-
"",
252-
"Permission is hereby granted, free of charge, to any person obtaining a copy",
253-
"of this software and associated documentation files (the \"Software\"), to deal",
254-
"in the Software without restriction, including without limitation the rights",
255-
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
256-
"copies of the Software, and to permit persons to whom the Software is",
257-
"furnished to do so, subject to the following conditions:",
258-
"",
259-
"The above copyright notice and this permission notice shall be included in",
260-
"all copies or substantial portions of the Software.",
261-
"",
262-
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
263-
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
264-
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
265-
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
266-
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
267-
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
268-
"THE SOFTWARE."
269-
]
270-
},
271244
{
272245
// Reason: repo URI is wrong on crate, pending https://github.com/warp-tech/russh/pull/53
273246
"name": "russh-cryptovec",

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@
193193
"mime": "^1.4.1",
194194
"minimatch": "^3.0.4",
195195
"minimist": "^1.2.6",
196-
"mkdirp": "^1.0.4",
197196
"mocha": "^10.2.0",
198197
"mocha-junit-reporter": "^2.2.1",
199198
"mocha-multi-reporters": "^1.5.1",

test/automation/package-lock.json

Lines changed: 0 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/automation/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@
1818
"prepublishOnly": "npm run copy-package-version"
1919
},
2020
"dependencies": {
21-
"mkdirp": "^1.0.4",
2221
"ncp": "^2.0.0",
2322
"tmp": "0.2.1",
2423
"tree-kill": "1.2.2",
2524
"vscode-uri": "3.0.2"
2625
},
2726
"devDependencies": {
28-
"@types/mkdirp": "^1.0.1",
2927
"@types/ncp": "2.0.1",
3028
"@types/node": "20.x",
3129
"@types/tmp": "0.2.2",

0 commit comments

Comments
 (0)