@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.es.js CHANGED
@@ -70,6 +70,7 @@ const questionNames$1 = {
70
70
  UNIT_TEST_FRAMEWORK: 'unitTestFramework',
71
71
  NODE_VERSION_CATEGORY: 'nodeVersionCategory',
72
72
  PACKAGE_MANAGER: 'packageManager',
73
+ PACKAGE_BUNDLER: 'packageBundler',
73
74
  PROJECT_TYPE: 'projectType',
74
75
  PROJECT_TYPE_CHOICE: 'projectTypeChoice',
75
76
  SHOULD_BE_SCOPED: 'shouldBeScoped',
@@ -372,6 +373,10 @@ async function lift ({
372
373
  return enhancerResults;
373
374
  }
374
375
 
376
+ const packageBundlersSchema = joi.object().pattern(/^/, joi.object({
377
+ scaffolder: joi.func().arity(1).required()
378
+ }));
379
+
375
380
  function validate(options) {
376
381
  const schema = joi.object().required().keys({
377
382
  projectRoot: joi.string().required(),
@@ -437,9 +442,10 @@ function validate(options) {
437
442
  scaffolder: joi.func().arity(1).required()
438
443
  }))
439
444
  }).keys({
440
- decisions: joi.object()
445
+ unitTestFrameworks: unitTestFrameworksSchema,
446
+ packageBundlers: packageBundlersSchema
441
447
  }).keys({
442
- unitTestFrameworks: unitTestFrameworksSchema
448
+ decisions: joi.object()
443
449
  }).keys({
444
450
  registries: joi.object().pattern(joi.string(), joi.string().uri()).default({})
445
451
  });
@@ -1432,7 +1438,10 @@ async function scaffoldRemark ({
1432
1438
  })));
1433
1439
  }
1434
1440
 
1435
- function scaffoldBanSensitiveFiles () {
1441
+ function scaffoldBanSensitiveFiles ({
1442
+ pathWithinParent
1443
+ }) {
1444
+ if (pathWithinParent) return {};
1436
1445
  return {
1437
1446
  scripts: {
1438
1447
  'lint:sensitive': 'ban'
@@ -1498,6 +1507,7 @@ async function scaffoldLinting ({
1498
1507
  vcs,
1499
1508
  configureLinting,
1500
1509
  buildDirectory,
1510
+ pathWithinParent,
1501
1511
  eslint
1502
1512
  }) {
1503
1513
  return deepmerge.all(await Promise.all([scaffoldLockfileLint({
@@ -1515,7 +1525,9 @@ async function scaffoldLinting ({
1515
1525
  dialect,
1516
1526
  vcs,
1517
1527
  config: configs.remark || '@form8ion/remark-lint-preset'
1518
- }), vcs ? scaffoldBanSensitiveFiles() : {}]));
1528
+ }), vcs ? scaffoldBanSensitiveFiles({
1529
+ pathWithinParent
1530
+ }) : {}]));
1519
1531
  }
1520
1532
 
1521
1533
  async function scaffoldVerification({
@@ -1559,6 +1571,7 @@ async function scaffoldVerification({
1559
1571
  vcs,
1560
1572
  configureLinting,
1561
1573
  buildDirectory,
1574
+ pathWithinParent,
1562
1575
  eslint: deepmerge.all([testingResults.eslint, {
1563
1576
  configs: testingResults.eslintConfigs
1564
1577
  }, {