@form8ion/javascript 4.6.0 → 4.8.0-alpha.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.cjs.js CHANGED
@@ -104,6 +104,7 @@ const questionNames$1 = {
104
104
  UNIT_TEST_FRAMEWORK: 'unitTestFramework',
105
105
  NODE_VERSION_CATEGORY: 'nodeVersionCategory',
106
106
  PACKAGE_MANAGER: 'packageManager',
107
+ PACKAGE_BUNDLER: 'packageBundler',
107
108
  PROJECT_TYPE: 'projectType',
108
109
  PROJECT_TYPE_CHOICE: 'projectTypeChoice',
109
110
  SHOULD_BE_SCOPED: 'shouldBeScoped',
@@ -406,6 +407,10 @@ async function lift ({
406
407
  return enhancerResults;
407
408
  }
408
409
 
410
+ const packageBundlersSchema = joi__namespace.object().pattern(/^/, joi__namespace.object({
411
+ scaffolder: joi__namespace.func().arity(1).required()
412
+ }));
413
+
409
414
  function validate(options) {
410
415
  const schema = joi__namespace.object().required().keys({
411
416
  projectRoot: joi__namespace.string().required(),
@@ -471,9 +476,10 @@ function validate(options) {
471
476
  scaffolder: joi__namespace.func().arity(1).required()
472
477
  }))
473
478
  }).keys({
474
- decisions: joi__namespace.object()
479
+ unitTestFrameworks: unitTestFrameworksSchema,
480
+ packageBundlers: packageBundlersSchema
475
481
  }).keys({
476
- unitTestFrameworks: unitTestFrameworksSchema
482
+ decisions: joi__namespace.object()
477
483
  }).keys({
478
484
  registries: joi__namespace.object().pattern(joi__namespace.string(), joi__namespace.string().uri()).default({})
479
485
  });
@@ -1466,7 +1472,10 @@ async function scaffoldRemark ({
1466
1472
  })));
1467
1473
  }
1468
1474
 
1469
- function scaffoldBanSensitiveFiles () {
1475
+ function scaffoldBanSensitiveFiles ({
1476
+ pathWithinParent
1477
+ }) {
1478
+ if (pathWithinParent) return {};
1470
1479
  return {
1471
1480
  scripts: {
1472
1481
  'lint:sensitive': 'ban'
@@ -1532,6 +1541,7 @@ async function scaffoldLinting ({
1532
1541
  vcs,
1533
1542
  configureLinting,
1534
1543
  buildDirectory,
1544
+ pathWithinParent,
1535
1545
  eslint
1536
1546
  }) {
1537
1547
  return deepmerge__default["default"].all(await Promise.all([scaffoldLockfileLint({
@@ -1549,7 +1559,9 @@ async function scaffoldLinting ({
1549
1559
  dialect,
1550
1560
  vcs,
1551
1561
  config: configs.remark || '@form8ion/remark-lint-preset'
1552
- }), vcs ? scaffoldBanSensitiveFiles() : {}]));
1562
+ }), vcs ? scaffoldBanSensitiveFiles({
1563
+ pathWithinParent
1564
+ }) : {}]));
1553
1565
  }
1554
1566
 
1555
1567
  async function scaffoldVerification({
@@ -1593,6 +1605,7 @@ async function scaffoldVerification({
1593
1605
  vcs,
1594
1606
  configureLinting,
1595
1607
  buildDirectory,
1608
+ pathWithinParent,
1596
1609
  eslint: deepmerge__default["default"].all([testingResults.eslint, {
1597
1610
  configs: testingResults.eslintConfigs
1598
1611
  }, {