Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f776c7

Browse files
committed
fix: replace npmjs by yarn registry
1 parent 9b68a00 commit 0f776c7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ const sander = require( 'sander' );
33

44
exports.root = path.resolve( __dirname );
55
exports.tmpdir = process.env.NOW ? `/tmp` : `${exports.root}/.tmp`;
6-
exports.registry = 'https://registry.npmjs.org';
6+
7+
// TODO(sven): this is a workarround https://twitter.com/svensauleau/status/1035880023964766209
8+
// exports.registry = 'https://registry.npmjs.org';
9+
exports.registry = 'https://registry.yarnpkg.com';
710

811
if ( !process.env.NOW ) {
912
try {

server/child-processes/create-bundle.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ async function createBundle ({ hash, pkg, version, deep, query }) {
5656
}
5757

5858
function fetchAndExtract ( pkg, version, dir ) {
59-
const tarUrl = pkg.versions[ version ].dist.tarball;
59+
let tarUrl = pkg.versions[ version ].dist.tarball;
60+
61+
// TODO(sven): this is a workarround https://twitter.com/svensauleau/status/1035880023964766209
62+
tarUrl = tarUrl.replace("npmjs.org", "yarnpkg.com");
6063

6164
info( `[${pkg.name}] fetching ${tarUrl}` );
6265

0 commit comments

Comments
 (0)