@form8ion/javascript 12.6.2 → 13.0.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/README.md +6 -0
- package/example.js +6 -0
- package/lib/index.js +27 -26
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +26 -25
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
- package/templates/example.mustache +1 -1
package/README.md
CHANGED
package/example.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -163,9 +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(/^/,
|
|
167
|
-
scaffolder: joi__default["default"].func().arity(1).required()
|
|
168
|
-
}));
|
|
166
|
+
const unitTestFrameworksSchema = joi__default["default"].object().required().pattern(/^/, core.optionsSchemas.form8ionPlugin);
|
|
169
167
|
|
|
170
168
|
async function chooseFramework ({frameworks, decisions}) {
|
|
171
169
|
if (!Object.keys(frameworks).length) return 'Other';
|
|
@@ -597,8 +595,8 @@ async function scaffoldPackageType ({
|
|
|
597
595
|
}
|
|
598
596
|
},
|
|
599
597
|
...javascriptCore.dialects.ESM === dialect && {
|
|
600
|
-
main: './lib/index.
|
|
601
|
-
exports: './lib/index.
|
|
598
|
+
main: './lib/index.js',
|
|
599
|
+
exports: './lib/index.js'
|
|
602
600
|
},
|
|
603
601
|
...javascriptCore.dialects.TYPESCRIPT === dialect && {
|
|
604
602
|
main: './lib/index.js',
|
|
@@ -620,6 +618,7 @@ async function scaffoldPackageType ({
|
|
|
620
618
|
documentation: scaffoldPackageDocumentation({packageName, visibility, scope, packageManager, provideExample}),
|
|
621
619
|
nextSteps: [
|
|
622
620
|
{summary: 'Add the appropriate `save` flag to the installation instructions in the README'},
|
|
621
|
+
{summary: 'Define supported node.js versions as `engines.node` in the `package.json` file'},
|
|
623
622
|
{summary: 'Publish pre-release versions to npm until package is stable enough to publish v1.0.0'}
|
|
624
623
|
]
|
|
625
624
|
},
|
|
@@ -718,7 +717,7 @@ async function scaffoldCliType ({
|
|
|
718
717
|
devDependencies: ['rimraf'],
|
|
719
718
|
vcsIgnore: {files: [], directories: [`/${defaultBuildDirectory}/`]},
|
|
720
719
|
buildDirectory: defaultBuildDirectory,
|
|
721
|
-
nextSteps: []
|
|
720
|
+
nextSteps: [{summary: 'Define supported node.js versions as `engines.node` in the `package.json` file'}]
|
|
722
721
|
}
|
|
723
722
|
]);
|
|
724
723
|
}
|
|
@@ -1156,7 +1155,7 @@ var packageManagers = /*#__PURE__*/Object.freeze({
|
|
|
1156
1155
|
defineLockfilePath: determineLockfilePathFor
|
|
1157
1156
|
});
|
|
1158
1157
|
|
|
1159
|
-
async function lift ({projectRoot, vcs, results, pathWithinParent}) {
|
|
1158
|
+
async function lift ({projectRoot, vcs, results, pathWithinParent, enhancers = {}}) {
|
|
1160
1159
|
cliMessages.info('Lifting JavaScript-specific details');
|
|
1161
1160
|
|
|
1162
1161
|
const {
|
|
@@ -1174,17 +1173,18 @@ async function lift ({projectRoot, vcs, results, pathWithinParent}) {
|
|
|
1174
1173
|
|
|
1175
1174
|
const enhancerResults = await core.applyEnhancers({
|
|
1176
1175
|
results,
|
|
1177
|
-
enhancers:
|
|
1178
|
-
|
|
1176
|
+
enhancers: {
|
|
1177
|
+
...enhancers,
|
|
1178
|
+
huskyPlugin: huskyPlugin__namespace,
|
|
1179
1179
|
enginesEnhancer,
|
|
1180
1180
|
coveragePlugin,
|
|
1181
|
-
commitConventionPlugin__namespace,
|
|
1181
|
+
commitConventionPlugin: commitConventionPlugin__namespace,
|
|
1182
1182
|
dialects,
|
|
1183
1183
|
codeStylePlugin,
|
|
1184
1184
|
npmConfigPlugin,
|
|
1185
1185
|
projectTypes,
|
|
1186
1186
|
packageManagers
|
|
1187
|
-
|
|
1187
|
+
},
|
|
1188
1188
|
options: {packageManager, projectRoot, vcs, packageDetails: JSON.parse(packageContents)}
|
|
1189
1189
|
});
|
|
1190
1190
|
|
|
@@ -1198,8 +1198,7 @@ async function lift ({projectRoot, vcs, results, pathWithinParent}) {
|
|
|
1198
1198
|
return enhancerResults;
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
|
-
const
|
|
1202
|
-
const pluginMapSchema = joi__default["default"].object().pattern(joi__default["default"].string(), pluginSchema);
|
|
1201
|
+
const pluginMapSchema = joi__default["default"].object().pattern(joi__default["default"].string(), core.optionsSchemas.form8ionPlugin);
|
|
1203
1202
|
|
|
1204
1203
|
const packageBundlersSchema = pluginMapSchema.default({});
|
|
1205
1204
|
|
|
@@ -1266,13 +1265,13 @@ function validate(options) {
|
|
|
1266
1265
|
})).default({})
|
|
1267
1266
|
})
|
|
1268
1267
|
.keys({
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1268
|
+
plugins: {
|
|
1269
|
+
unitTestFrameworks: unitTestFrameworksSchema,
|
|
1270
|
+
packageBundlers: packageBundlersSchema,
|
|
1271
|
+
applicationTypes: applicationTypesSchema,
|
|
1272
|
+
packageTypes: packageTypesSchema,
|
|
1273
|
+
monorepoTypes: monorepoTypesSchema
|
|
1274
|
+
}
|
|
1276
1275
|
})
|
|
1277
1276
|
.keys({
|
|
1278
1277
|
decisions: joi__default["default"].object()
|
|
@@ -1710,14 +1709,16 @@ async function scaffolder (options) {
|
|
|
1710
1709
|
overrides,
|
|
1711
1710
|
ciServices,
|
|
1712
1711
|
hosts,
|
|
1713
|
-
applicationTypes,
|
|
1714
|
-
packageTypes,
|
|
1715
|
-
packageBundlers,
|
|
1716
|
-
monorepoTypes,
|
|
1717
1712
|
decisions,
|
|
1718
|
-
unitTestFrameworks,
|
|
1719
1713
|
pathWithinParent,
|
|
1720
|
-
registries
|
|
1714
|
+
registries,
|
|
1715
|
+
plugins: {
|
|
1716
|
+
applicationTypes,
|
|
1717
|
+
packageTypes,
|
|
1718
|
+
monorepoTypes,
|
|
1719
|
+
packageBundlers,
|
|
1720
|
+
unitTestFrameworks
|
|
1721
|
+
}
|
|
1721
1722
|
} = validate(options);
|
|
1722
1723
|
|
|
1723
1724
|
const {
|