diff options
Diffstat (limited to 'packages/monorepo-scripts/src/utils/npm_utils.ts')
-rw-r--r-- | packages/monorepo-scripts/src/utils/npm_utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/utils/npm_utils.ts b/packages/monorepo-scripts/src/utils/npm_utils.ts index 7c8310459..9c8e51508 100644 --- a/packages/monorepo-scripts/src/utils/npm_utils.ts +++ b/packages/monorepo-scripts/src/utils/npm_utils.ts @@ -4,14 +4,14 @@ import * as _ from 'lodash'; import { PackageRegistryJson } from '../types'; -const lernaJson = JSON.parse(fs.readFileSync('lerna.json').toString()); -const NPM_REGISTRY_BASE_URL = lernaJson.registry; +import { configs } from './configs'; + const SUCCESS_STATUS = 200; const NOT_FOUND_STATUS = 404; export const npmUtils = { async getPackageRegistryJsonIfExistsAsync(packageName: string): Promise<PackageRegistryJson | undefined> { - const url = `${NPM_REGISTRY_BASE_URL}/${packageName}`; + const url = `${configs.NPM_REGISTRY_URL}/${packageName}`; const response = await fetch(url); if (response.status === NOT_FOUND_STATUS) { |