create-lupine 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -12,13 +12,12 @@ function getLatestVersion(pkgName, fallback, retries = 2) {
12
12
  const version = execSync(`npm view ${pkgName} version`, {
13
13
  encoding: 'utf8',
14
14
  stdio: ['ignore', 'pipe', 'ignore'],
15
- timeout: 5000,
15
+ timeout: 10000,
16
16
  }).trim();
17
17
  return version ? `^${version}` : fallback;
18
18
  } catch (e) {
19
19
  if (i === retries) {
20
- console.warn(`\x1b[33mWarning: Failed to fetch latest version for ${pkgName}. Using fallback ${fallback}\x1b[0m`);
21
- return fallback;
20
+ throw new Error(`\x1b[31m✖ Failed to fetch latest version for ${pkgName} from npm registry after ${retries} retries. Please check your network connection.\x1b[0m`);
22
21
  }
23
22
  }
24
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lupine",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Scaffolding tool for Lupine.js projects",
5
5
  "bin": {
6
6
  "create-lupine": "index.js"