Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Remove unused ncp (#3367)
Browse files Browse the repository at this point in the history
  • Loading branch information
fson authored Apr 7, 2021
1 parent bb3b249 commit d3333e9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 25 deletions.
2 changes: 0 additions & 2 deletions packages/xdl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"md5hex": "1.0.0",
"minimatch": "3.0.4",
"mv": "2.1.1",
"ncp": "2.0.0",
"node-forge": "0.10.0",
"p-map": "3.0.0",
"p-retry": "4.1.0",
Expand Down Expand Up @@ -107,7 +106,6 @@
"@types/fs-extra": "^9.0.1",
"@types/getenv": "^0.7.0",
"@types/hapi__joi": "^17.1.2",
"@types/ncp": "^2.0.1",
"@types/node-forge": "^0.9.7",
"@types/text-table": "^0.2.1",
"@types/raven": "^2.5.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/xdl/src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
With this module in place, we can fix these circular dependency problems by
changing the order in this file.
*/
export * from './Utils';
export { Semaphore } from './utils/Semaphore';
export * as Env from './Env';
export { default as Config } from './Config';
export * as Xcode from './Xcode';
Expand Down
14 changes: 0 additions & 14 deletions packages/xdl/src/Utils.ts → packages/xdl/src/utils/Semaphore.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
import { ncp } from 'ncp';

export function ncpAsync(source: string, dest: string, options: any = {}) {
return new Promise((resolve, reject) => {
ncp(source, dest, options, (err: any) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
}

export class Semaphore {
queue: ((v: boolean) => void)[] = [];
available = 1;
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4198,13 +4198,6 @@
dependencies:
"@types/minimatch" "*"

"@types/ncp@^2.0.1":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/ncp/-/ncp-2.0.3.tgz#68429472698a68f2c85a984932e9d8014d5f2ed0"
integrity sha512-eZatZMWhPHUHY/1hUUqwGrWzBAE9deYR3L0QJMicpVkBUOrQslhWblw5Ye+rKuzvFG/UQ3jDolMcjhC2WKUQ5w==
dependencies:
"@types/node" "*"

"@types/next-server@*":
version "9.0.0"
resolved "https://registry.yarnpkg.com/@types/next-server/-/next-server-9.0.0.tgz#4884670da2d846c0050a608153a48cd0c6cdbeb2"
Expand Down Expand Up @@ -14779,7 +14772,7 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=

ncp@2.0.0, ncp@~2.0.0:
ncp@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=
Expand Down

0 comments on commit d3333e9

Please sign in to comment.