File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
packages/create-app/src/lib/utils Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' create-rock ' : patch
3+ ---
4+
5+ fix: create-app local workflow
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export async function downloadTarballFromNpm(
4242
4343async function getPackageVersionData ( packageName : string , version : string ) {
4444 // Fetch package metadata from npm registry
45- const registryUrl = `https://registry.npmjs.org/${ packageName } ` ;
45+ const registryUrl = `${ process . env [ 'NPM_CONFIG_REGISTRY' ] || ' https://registry.npmjs.org' } /${ packageName } ` ;
4646 const response = await fetch ( registryUrl ) ;
4747
4848 if ( ! response . ok ) {
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ import { logger } from '@rock-js/tools';
66export function getRockVersion ( ) {
77 try {
88 const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
9-
10- // Note: account for 'dist' folder
11- const packageJsonPath = join ( __dirname , '../../../../package.json' ) ;
9+ const packageJsonPath = join ( __dirname , '../../package.json' ) ;
1210 const packageJson = JSON . parse ( fs . readFileSync ( packageJsonPath , 'utf-8' ) ) ;
1311 return packageJson . version ;
1412 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments