@form8ion/javascript 15.6.1 → 15.7.0

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.js CHANGED
@@ -43,8 +43,8 @@ const questionNames$1 = {
43
43
  DIALECT: 'dialect'
44
44
  };
45
45
 
46
- async function scaffoldCoverage({projectRoot, vcs, visibility, pathWithinParent}) {
47
- return deepmerge(await scaffold({projectRoot}), await scaffold$1({vcs, visibility, pathWithinParent}));
46
+ async function scaffoldCoverage({projectRoot}) {
47
+ return deepmerge(await scaffold({projectRoot}), await scaffold$1({projectRoot}));
48
48
  }
49
49
 
50
50
  function nyvInUse({projectRoot}) {
@@ -120,20 +120,12 @@ async function gatherUnitTestingInput({frameworks, decisions}) {
120
120
 
121
121
  const pluginsSchema = joi.object().pattern(/^/, optionsSchemas.form8ionPlugin).default({});
122
122
 
123
- async function scaffoldUnitTesting({
124
- projectRoot,
125
- frameworks,
126
- decisions,
127
- visibility,
128
- vcs,
129
- pathWithinParent,
130
- dialect
131
- }) {
123
+ async function scaffoldUnitTesting({projectRoot, frameworks, decisions, dialect}) {
132
124
  const validatedFrameworks = validateOptions(pluginsSchema, frameworks);
133
125
  const [framework, coverage] = await Promise.all([
134
126
  gatherUnitTestingInput({frameworks: validatedFrameworks, decisions})
135
127
  .then(chosenFramework => scaffoldChoice(validatedFrameworks, chosenFramework, {projectRoot, dialect})),
136
- scaffoldCoverage({projectRoot, vcs, visibility, pathWithinParent})
128
+ scaffoldCoverage({projectRoot})
137
129
  ]);
138
130
 
139
131
  return deepmerge.all([
@@ -183,6 +175,7 @@ function validate(options) {
183
175
  }).default({registries: {}}),
184
176
  plugins: {
185
177
  unitTestFrameworks: pluginsSchema,
178
+ integrationTestFrameworks: pluginsSchema,
186
179
  packageBundlers: pluginsSchema,
187
180
  applicationTypes: pluginsSchema,
188
181
  packageTypes: pluginsSchema,
@@ -1511,32 +1504,30 @@ async function scaffoldProjectTypePlugin({
1511
1504
  );
1512
1505
  }
1513
1506
 
1507
+ function scaffoldIntegrationTesting() {
1508
+ return {};
1509
+ }
1510
+
1514
1511
  async function scaffoldTesting({
1515
1512
  projectRoot,
1516
- visibility,
1517
1513
  tests: {unit, integration},
1518
- vcs,
1519
1514
  unitTestFrameworks,
1515
+ integrationTestFrameworks,
1520
1516
  decisions,
1521
- dialect,
1522
- pathWithinParent
1517
+ dialect
1523
1518
  }) {
1524
- const unitResults = unit
1525
- ? await scaffoldUnitTesting({
1526
- projectRoot,
1527
- visibility,
1528
- vcs,
1529
- frameworks: unitTestFrameworks,
1530
- decisions,
1531
- dialect,
1532
- pathWithinParent
1533
- })
1534
- : {};
1519
+ const [unitResults, integrationResults] = await Promise.all([
1520
+ unit ? scaffoldUnitTesting({projectRoot, frameworks: unitTestFrameworks, decisions, dialect}) : {},
1521
+ integration
1522
+ ? scaffoldIntegrationTesting()
1523
+ : {}
1524
+ ]);
1535
1525
 
1536
- return deepmerge(
1526
+ return deepmerge.all([
1537
1527
  {dependencies: {javascript: {development: [...(unit || integration) ? ['@travi/any'] : []]}}, eslint: {}},
1538
- unitResults
1539
- );
1528
+ unitResults,
1529
+ integrationResults
1530
+ ]);
1540
1531
  }
1541
1532
 
1542
1533
  function buildAllowedHosts({packageManager, registries = {}}) {
@@ -1599,26 +1590,17 @@ async function scaffoldLinting({projectRoot, packageManager, registries}) {
1599
1590
  async function scaffoldVerification({
1600
1591
  projectRoot,
1601
1592
  dialect,
1602
- visibility,
1603
1593
  packageManager,
1604
1594
  vcs,
1605
1595
  registries,
1606
1596
  tests,
1607
1597
  unitTestFrameworks,
1598
+ integrationTestFrameworks,
1608
1599
  decisions,
1609
1600
  pathWithinParent
1610
1601
  }) {
1611
1602
  const [testingResults, lintingResults, huskyResults] = await Promise.all([
1612
- scaffoldTesting({
1613
- projectRoot,
1614
- tests,
1615
- visibility,
1616
- vcs,
1617
- unitTestFrameworks,
1618
- decisions,
1619
- dialect,
1620
- pathWithinParent
1621
- }),
1603
+ scaffoldTesting({projectRoot, tests, unitTestFrameworks, integrationTestFrameworks, decisions, dialect}),
1622
1604
  scaffoldLinting({projectRoot, packageManager, registries}),
1623
1605
  scaffold$2({projectRoot, packageManager, pathWithinParent})
1624
1606
  ]);
@@ -1715,6 +1697,7 @@ async function scaffoldJavascript(options) {
1715
1697
  monorepoTypes,
1716
1698
  packageBundlers,
1717
1699
  unitTestFrameworks,
1700
+ integrationTestFrameworks,
1718
1701
  hosts,
1719
1702
  ciServices
1720
1703
  }
@@ -1762,12 +1745,12 @@ async function scaffoldJavascript(options) {
1762
1745
  const verificationResults = await scaffoldVerification({
1763
1746
  projectRoot,
1764
1747
  dialect,
1765
- visibility,
1766
1748
  packageManager,
1767
1749
  vcs,
1768
1750
  registries: configs.registries,
1769
1751
  tests,
1770
1752
  unitTestFrameworks,
1753
+ integrationTestFrameworks,
1771
1754
  decisions,
1772
1755
  pathWithinParent
1773
1756
  });