Skip to content

Commit 0597135

Browse files
authored
chore: set yarn registry (#590)
1 parent 92be5be commit 0597135

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.changeset/long-frogs-see.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

scripts/start_npm_proxy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ console.log(`Local npm proxy running at ${EXPECTED_URL}.`);
5252
*/
5353
await execa('npm', ['config', 'set', 'registry', EXPECTED_URL]);
5454
console.log(`Set npm registry to ${EXPECTED_URL}`);
55+
56+
await execa('yarn', ['config', 'set', 'registry', EXPECTED_URL]);
57+
console.log(`Set yarn registry to ${EXPECTED_URL}`);

scripts/stop_npm_proxy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { execa, execaCommand } from 'execa';
22

33
const VERDACCIO_PORT = 4873;
44
const NPM_REGISTRY = 'https://registry.npmjs.org/';
5+
const YARN_REGISTRY = 'https://registry.yarnpkg.com/';
56

67
/**
78
* Kills the process that is listening on VERDACCIO_PORT
@@ -13,6 +14,7 @@ const NPM_REGISTRY = 'https://registry.npmjs.org/';
1314
* https://github.com/sindresorhus/execa/blob/HEAD/docs/escaping.md
1415
*/
1516
await execa('npm', ['config', 'set', 'registry', NPM_REGISTRY]);
17+
await execa('yarn', ['config', 'set', 'registry', YARN_REGISTRY]);
1618

1719
// returns the process id of the process listening on the specified port
1820
let pid: number;

0 commit comments

Comments
 (0)