Skip to content

Commit

Permalink
Merge pull request #928 from Microsoft/pgonzal/delete-rimraf
Browse files Browse the repository at this point in the history
Remove all dependencies on the "rimraf" library
  • Loading branch information
pgonzal committed Nov 2, 2018
2 parents 5e289f8 + e6db8f9 commit ac03c77
Show file tree
Hide file tree
Showing 18 changed files with 118 additions and 109 deletions.
1 change: 0 additions & 1 deletion apps/rush-lib/package.json
Expand Up @@ -43,7 +43,6 @@
"node-fetch": "~2.1.2",
"npm-package-arg": "~5.1.2",
"read-package-tree": "~5.1.5",
"rimraf": "~2.5.4",
"semver": "~5.3.0",
"strict-uri-encode": "~2.0.0",
"tar": "~4.4.1",
Expand Down
8 changes: 4 additions & 4 deletions apps/rush-lib/src/scripts/install-run.ts
Expand Up @@ -8,7 +8,7 @@
// version of the specified tool (if not already installed), and then pass a command-line to it.
// An example usage would be:
//
// node common/scripts/install-run.js rimraf@2.6.2 rimraf -f project1/lib
// node common/scripts/install-run.js qrcode@1.2.2 qrcode https://rushjs.io
//
// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/

Expand Down Expand Up @@ -431,8 +431,8 @@ function run(): void {
const [
nodePath, /* Ex: /bin/node */ // tslint:disable-line:no-unused-variable
scriptPath, /* /repo/common/scripts/install-run-rush.js */
rawPackageSpecifier, /* rimraf@^2.0.0 */
packageBinName, /* rimraf */
rawPackageSpecifier, /* qrcode@^1.2.0 */
packageBinName, /* qrcode */
...packageBinArgs /* [-f, myproject/lib] */
]: string[] = process.argv;

Expand All @@ -445,7 +445,7 @@ function run(): void {

if (process.argv.length < 4) {
console.log('Usage: install-run.js <package>@<version> <command> [args...]');
console.log('Example: install-run.js rimraf@2.6.2 rimraf -f project1/lib');
console.log('Example: install-run.js qrcode@1.2.2 qrcode https://rushjs.io');
process.exit(1);
}

Expand Down
3 changes: 1 addition & 2 deletions apps/rush-lib/src/utilities/Utilities.ts
Expand Up @@ -4,7 +4,6 @@
import * as child_process from 'child_process';
import * as fs from 'fs';
import * as os from 'os';
import * as rimraf from 'rimraf';
import * as tty from 'tty';
import * as path from 'path';
import * as wordwrap from 'wordwrap';
Expand Down Expand Up @@ -171,7 +170,7 @@ export class Utilities {
*/
public static dangerouslyDeletePath(folderPath: string): void {
try {
rimraf.sync(folderPath, { disableGlob: true });
FileSystem.deleteFolder(folderPath);
} catch (e) {
throw new Error(e.message + os.EOL + 'Often this is caused by a file lock'
+ ' from a process such as your text editor, command prompt, or "gulp serve"');
Expand Down
25 changes: 0 additions & 25 deletions apps/rush-lib/typings/rimraf/rimraf.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/rush-lib/typings/tsd.d.ts
Expand Up @@ -3,7 +3,6 @@

/// <reference path="git-repo-info/git-repo-info.d.ts" />
/// <reference path="jju/jju.d.ts" />
/// <reference path="rimraf/rimraf.d.ts" />
/// <reference path="builtins/builtins.d.ts" />
/// <reference path="glob-escape/glob-escape.d.ts" />
/// <reference path="npm-package-arg/npm-package-arg.d.ts" />
Expand Down
2 changes: 1 addition & 1 deletion build-tests/api-extractor-test-01/package.json
Expand Up @@ -15,7 +15,7 @@
"@microsoft/api-extractor": "6.1.1",
"@types/jest": "21.1.10",
"@types/node": "8.5.8",
"fs-extra": "~5.0.0",
"fs-extra": "~7.0.0",
"typescript": "~3.0.3"
}
}
2 changes: 1 addition & 1 deletion build-tests/api-extractor-test-02/package.json
Expand Up @@ -17,7 +17,7 @@
"@types/node": "8.5.8",
"api-extractor-test-01": "1.0.0",
"semver": "~5.3.0",
"fs-extra": "~5.0.0",
"fs-extra": "~7.0.0",
"typescript": "~3.0.3"
}
}
2 changes: 1 addition & 1 deletion build-tests/api-extractor-test-03/package.json
Expand Up @@ -10,7 +10,7 @@
"@types/jest": "21.1.10",
"@types/node": "8.5.8",
"api-extractor-test-02": "1.0.0",
"fs-extra": "~5.0.0",
"fs-extra": "~7.0.0",
"typescript": "~3.0.3"
}
}
2 changes: 1 addition & 1 deletion build-tests/api-extractor-test-04/package.json
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@microsoft/api-extractor": "6.1.1",
"fs-extra": "~5.0.0",
"fs-extra": "~7.0.0",
"typescript": "~3.0.3"
}
}
2 changes: 1 addition & 1 deletion build-tests/api-extractor-test-05/package.json
Expand Up @@ -16,7 +16,7 @@
"@microsoft/api-documenter": "1.5.49",
"@types/jest": "21.1.10",
"@types/node": "8.5.8",
"fs-extra": "~5.0.0",
"fs-extra": "~7.0.0",
"typescript": "~3.0.3"
}
}
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@microsoft/gulp-core-build",
"comment": "Remove all dependencies on the \"rimraf\" library",
"type": "patch"
}
],
"packageName": "@microsoft/gulp-core-build",
"email": "pgonzal@users.noreply.github.com"
}
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@microsoft/node-core-library",
"comment": "Remove all dependencies on the \"rimraf\" library",
"type": "patch"
}
],
"packageName": "@microsoft/node-core-library",
"email": "pgonzal@users.noreply.github.com"
}
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "Remove all dependencies on the \"rimraf\" library",
"packageName": "@microsoft/rush",
"type": "none"
}
],
"packageName": "@microsoft/rush",
"email": "pgonzal@users.noreply.github.com"
}
4 changes: 0 additions & 4 deletions common/config/rush/nonbrowser-approved-packages.json
Expand Up @@ -426,10 +426,6 @@
"name": "resolve",
"allowedCategories": [ "libraries" ]
},
{
"name": "rimraf",
"allowedCategories": [ "libraries" ]
},
{
"name": "semver",
"allowedCategories": [ "libraries", "tests" ]
Expand Down

0 comments on commit ac03c77

Please sign in to comment.