Skip to content

Commit 6669a6d

Browse files
committed
refactor: remove unused base-64 package
1 parent e074daf commit 6669a6d

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

package-lock.json

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
"author": "Microsoft Corporation",
3131
"license": "MIT",
3232
"dependencies": {
33-
"@types/yazl": "^2.4.2",
3433
"backslash": "^0.1.7",
35-
"base-64": "^0.1.0",
3634
"chalk": "^4.1.0",
3735
"cli-table3": "^0.6.0",
3836
"code-push": "2.0.6",
@@ -64,6 +62,7 @@
6462
"@types/node": "^14.0.10",
6563
"@types/q": "^1.5.4",
6664
"@types/semver": "^7.2.0",
65+
"@types/yazl": "^2.4.2",
6766
"standard-version": "^9.0.0",
6867
"typescript": "^3.9.3"
6968
}

src/command-executor.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
runHermesEmitBinaryCommand,
3737
getReactNativeProjectAppVersion,
3838
} from "./lib/react-native-utils";
39+
import { isBinaryOrZip } from "./lib/file-utils";
3940
import { out } from "./util/interaction";
4041

4142
var configFilePath: string = path.join(process.env.LOCALAPPDATA || process.env.HOME, ".code-push.config");
@@ -1380,10 +1381,6 @@ function releaseErrorHandler(error: CodePushError, command: cli.ICommand): void
13801381
}
13811382
}
13821383

1383-
function isBinaryOrZip(path: string): boolean {
1384-
return path.search(/\.zip$/i) !== -1 || path.search(/\.apk$/i) !== -1 || path.search(/\.ipa$/i) !== -1;
1385-
}
1386-
13871384
function throwForInvalidEmail(email: string): void {
13881385
if (!emailValidator.validate(email)) {
13891386
throw new Error('"' + email + '" is an invalid e-mail address.');

src/lib/file-utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import * as fs from "fs";
22

3+
export function isBinaryOrZip(path: string): boolean {
4+
return path.search(/\.zip$/i) !== -1 || path.search(/\.apk$/i) !== -1 || path.search(/\.ipa$/i) !== -1;
5+
}
6+
37
export function isDirectory(path: string): boolean {
48
return fs.statSync(path).isDirectory();
59
}

0 commit comments

Comments
 (0)