@startupjs/cli 0.54.9 → 0.54.10

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 +14 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -388,7 +388,7 @@ commander
388
388
  { shell: true, stdio: 'inherit' }
389
389
  )
390
390
  } catch (e) {
391
- console.error(e.stderr)
391
+ throw new Error('Setup corepack error: ', e)
392
392
  }
393
393
 
394
394
  const projectPath = path.join(process.cwd(), LOCAL_DIR, projectName)
@@ -416,6 +416,19 @@ commander
416
416
  stdio: 'inherit'
417
417
  })
418
418
 
419
+ // specify yarn version
420
+ // it would be more correct to reinstall the packages
421
+ // after specifying the yarn version
422
+ // but since the 'yarn add' command will be executed next - it will
423
+ // reinstall the packages
424
+ // also, it would be more correct don't use 'yarn remove' command
425
+ // because if there is no package (due to the difference in react native packages)
426
+ // then everything will break
427
+ await execa('corepack', ['use', `yarn@${yarn}`], {
428
+ cwd: projectPath,
429
+ stdio: 'inherit'
430
+ })
431
+
419
432
  // remove extra files which are covered by startupjs core
420
433
  if (REMOVE_FILES.length) {
421
434
  await execa('rm', ['-f'].concat(REMOVE_FILES), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs/cli",
3
- "version": "0.54.9",
3
+ "version": "0.54.10",
4
4
  "description": "start, watch and build startupjs project",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -25,5 +25,5 @@
25
25
  "webpack-cli": "^4.9.1",
26
26
  "webpack-dev-server": "^4.4.0"
27
27
  },
28
- "gitHead": "791daaabed5ef6799830b3321ac6074f89402114"
28
+ "gitHead": "30e50628e1b4750711b52d370454e7add126088a"
29
29
  }