@form8ion/javascript 4.5.0 → 4.6.1

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.
package/lib/index.es.js CHANGED
@@ -7,7 +7,7 @@ import { prompt as prompt$1 } from '@form8ion/overridable-prompts';
7
7
  import { scaffold, lift as lift$3 } from '@form8ion/codecov';
8
8
  import { promises } from 'fs';
9
9
  import { fileExists, applyEnhancers } from '@form8ion/core';
10
- import { info, warn } from '@travi/cli-messages';
10
+ import { info, error, warn } from '@travi/cli-messages';
11
11
  import * as commitConventionPlugin from '@form8ion/commit-convention';
12
12
  import { scaffold as scaffold$4 } from '@form8ion/commit-convention';
13
13
  import hoek from '@hapi/hoek';
@@ -304,8 +304,13 @@ async function liftPackage ({
304
304
  }
305
305
 
306
306
  info('Installing dependencies');
307
- await installDependencies(dependencies || [], PROD_DEPENDENCY_TYPE, projectRoot, packageManager);
308
- await installDependencies([...(devDependencies || [])], DEV_DEPENDENCY_TYPE, projectRoot, packageManager);
307
+
308
+ try {
309
+ await installDependencies(dependencies || [], PROD_DEPENDENCY_TYPE, projectRoot, packageManager);
310
+ await installDependencies([...(devDependencies || [])], DEV_DEPENDENCY_TYPE, projectRoot, packageManager);
311
+ } catch (e) {
312
+ error('Failed to install dependencies');
313
+ }
309
314
  }
310
315
 
311
316
  async function resolvePackageManager ({
@@ -1427,7 +1432,10 @@ async function scaffoldRemark ({
1427
1432
  })));
1428
1433
  }
1429
1434
 
1430
- function scaffoldBanSensitiveFiles () {
1435
+ function scaffoldBanSensitiveFiles ({
1436
+ pathWithinParent
1437
+ }) {
1438
+ if (pathWithinParent) return {};
1431
1439
  return {
1432
1440
  scripts: {
1433
1441
  'lint:sensitive': 'ban'
@@ -1493,6 +1501,7 @@ async function scaffoldLinting ({
1493
1501
  vcs,
1494
1502
  configureLinting,
1495
1503
  buildDirectory,
1504
+ pathWithinParent,
1496
1505
  eslint
1497
1506
  }) {
1498
1507
  return deepmerge.all(await Promise.all([scaffoldLockfileLint({
@@ -1510,7 +1519,9 @@ async function scaffoldLinting ({
1510
1519
  dialect,
1511
1520
  vcs,
1512
1521
  config: configs.remark || '@form8ion/remark-lint-preset'
1513
- }), vcs ? scaffoldBanSensitiveFiles() : {}]));
1522
+ }), vcs ? scaffoldBanSensitiveFiles({
1523
+ pathWithinParent
1524
+ }) : {}]));
1514
1525
  }
1515
1526
 
1516
1527
  async function scaffoldVerification({
@@ -1554,6 +1565,7 @@ async function scaffoldVerification({
1554
1565
  vcs,
1555
1566
  configureLinting,
1556
1567
  buildDirectory,
1568
+ pathWithinParent,
1557
1569
  eslint: deepmerge.all([testingResults.eslint, {
1558
1570
  configs: testingResults.eslintConfigs
1559
1571
  }, {