@form8ion/javascript 13.0.0-alpha.1 → 13.0.0-alpha.2

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/README.md CHANGED
@@ -74,9 +74,13 @@ const {
74
74
  babelPreset: {name: `@${accountName}`, packageName: `@${accountName}/babel-preset`},
75
75
  commitlint: {name: `@${accountName}`, packageName: `@${accountName}/commitlint-config`}
76
76
  },
77
- overrides: {npmAccount: accountName},
77
+ plugins: {
78
+ unitTestFrameworks: {},
79
+ applicationTypes: {},
80
+ packageTypes: {},
81
+ packageBundlers: {}
82
+ },
78
83
  ciServices: {},
79
- unitTestFrameworks: {},
80
84
  decisions: {
81
85
  [questionNames.DIALECT]: dialects.BABEL,
82
86
  [questionNames.NODE_VERSION_CATEGORY]: 'LTS',
@@ -116,8 +120,8 @@ const {
116
120
  await scaffoldUnitTesting({
117
121
  projectRoot: process.cwd(),
118
122
  frameworks: {
119
- Mocha: {scaffolder: options => options},
120
- Jest: {scaffolder: options => options}
123
+ Mocha: {scaffold: options => options},
124
+ Jest: {scaffold: options => options}
121
125
  },
122
126
  visibility: 'Public',
123
127
  vcs: {host: 'GitHub', owner: 'foo', name: 'bar'},
package/example.js CHANGED
@@ -42,9 +42,13 @@ const {
42
42
  babelPreset: {name: `@${accountName}`, packageName: `@${accountName}/babel-preset`},
43
43
  commitlint: {name: `@${accountName}`, packageName: `@${accountName}/commitlint-config`}
44
44
  },
45
- overrides: {npmAccount: accountName},
45
+ plugins: {
46
+ unitTestFrameworks: {},
47
+ applicationTypes: {},
48
+ packageTypes: {},
49
+ packageBundlers: {}
50
+ },
46
51
  ciServices: {},
47
- unitTestFrameworks: {},
48
52
  decisions: {
49
53
  [questionNames.DIALECT]: dialects.BABEL,
50
54
  [questionNames.NODE_VERSION_CATEGORY]: 'LTS',
@@ -84,8 +88,8 @@ const {
84
88
  await scaffoldUnitTesting({
85
89
  projectRoot: process.cwd(),
86
90
  frameworks: {
87
- Mocha: {scaffolder: options => options},
88
- Jest: {scaffolder: options => options}
91
+ Mocha: {scaffold: options => options},
92
+ Jest: {scaffold: options => options}
89
93
  },
90
94
  visibility: 'Public',
91
95
  vcs: {host: 'GitHub', owner: 'foo', name: 'bar'},
package/lib/index.js CHANGED
@@ -163,7 +163,7 @@ var coveragePlugin = /*#__PURE__*/Object.freeze({
163
163
  test: tester$4
164
164
  });
165
165
 
166
- const unitTestFrameworksSchema = joi__default["default"].object().required().pattern(/^/, core.optionsSchemas.form8ionPlugin);
166
+ const unitTestFrameworksSchema = joi__default["default"].object().pattern(/^/, core.optionsSchemas.form8ionPlugin).default({});
167
167
 
168
168
  async function chooseFramework ({frameworks, decisions}) {
169
169
  if (!Object.keys(frameworks).length) return 'Other';
@@ -1241,16 +1241,6 @@ function validate(options) {
1241
1241
  remark: joi__default["default"].string()
1242
1242
  }).default({})
1243
1243
  })
1244
- .keys({
1245
- overrides: joi__default["default"].object({
1246
- npmAccount: joi__default["default"].string(),
1247
- author: joi__default["default"].object({
1248
- name: joi__default["default"].string().required(),
1249
- email: joi__default["default"].string().email(),
1250
- url: joi__default["default"].string().uri()
1251
- })
1252
- }).default({})
1253
- })
1254
1244
  .keys({
1255
1245
  ciServices: joi__default["default"].object().pattern(/^/, joi__default["default"].object({
1256
1246
  scaffolder: joi__default["default"].func().arity(1).required(),
@@ -1356,7 +1346,6 @@ function authorQuestions({name, email, url}) {
1356
1346
  }
1357
1347
 
1358
1348
  async function prompt(
1359
- {npmAccount, author},
1360
1349
  ciServices,
1361
1350
  hosts,
1362
1351
  visibility,
@@ -1433,9 +1422,9 @@ async function prompt(
1433
1422
  message: 'What is the scope?',
1434
1423
  when: scopePromptShouldBePresentedFactory(visibility),
1435
1424
  validate: scope(visibility),
1436
- default: npmAccount || maybeLoggedInNpmUsername
1425
+ default: maybeLoggedInNpmUsername
1437
1426
  },
1438
- ...authorQuestions(author || {
1427
+ ...authorQuestions({
1439
1428
  name: npmConf.get('init.author.name'),
1440
1429
  email: npmConf.get('init.author.email'),
1441
1430
  url: npmConf.get('init.author.url')
@@ -1706,7 +1695,6 @@ async function scaffolder (options) {
1706
1695
  vcs,
1707
1696
  description,
1708
1697
  configs,
1709
- overrides,
1710
1698
  ciServices,
1711
1699
  hosts,
1712
1700
  decisions,
@@ -1733,7 +1721,7 @@ async function scaffolder (options) {
1733
1721
  provideExample,
1734
1722
  packageManager,
1735
1723
  dialect
1736
- } = await prompt(overrides, ciServices, hosts, visibility, vcs, decisions, configs, pathWithinParent);
1724
+ } = await prompt(ciServices, hosts, visibility, vcs, decisions, configs, pathWithinParent);
1737
1725
 
1738
1726
  cliMessages.info('Writing project files', {level: 'secondary'});
1739
1727