Skip to content

Commit 49ed081

Browse files
dgp1130alan-agius4
authored andcommitted
refactor: move Wombat registry to reusable constant
Pure refactor that just pulls the Wombat registry into a separate string constant to be re-used across scripts.
1 parent f9996de commit 49ed081

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/registries.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
/** URL to Wombat NPM registry proxy. */
10+
export const wombat = 'https://wombat-dressing-room.appspot.com';

scripts/publish.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { logging, tags } from '@angular-devkit/core';
1010
import { spawnSync } from 'child_process';
1111
import * as semver from 'semver';
1212
import { packages } from '../lib/packages';
13+
import { wombat } from '../lib/registries';
1314
import build from './build';
1415

15-
1616
export interface PublishArgs {
1717
tag?: string;
1818
branchCheck?: boolean;
@@ -118,7 +118,7 @@ export default async function (args: PublishArgs, logger: logging.Logger) {
118118
}
119119

120120
// If no registry is provided, the wombat proxy should be used.
121-
publishArgs.push('--registry', args.registry || 'https://wombat-dressing-room.appspot.com');
121+
publishArgs.push('--registry', args.registry ?? wombat);
122122

123123
return _exec('npm', publishArgs, {
124124
cwd: pkg.dist,

0 commit comments

Comments
 (0)