@form8ion/javascript 11.7.1 → 11.7.3
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 +17 -7
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +17 -7
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -2
package/lib/index.mjs
CHANGED
|
@@ -85,8 +85,8 @@ async function removeNyc ({projectRoot, packageManager}) {
|
|
|
85
85
|
]);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
async function lift$2({projectRoot, packageManager}) {
|
|
89
|
-
const codecovResults = await lift$3({projectRoot, packageManager});
|
|
88
|
+
async function lift$2({projectRoot, packageManager, vcs}) {
|
|
89
|
+
const codecovResults = await lift$3({projectRoot, packageManager, vcs});
|
|
90
90
|
|
|
91
91
|
if (await nycIsConfigured({projectRoot})) {
|
|
92
92
|
const [c8Results] = await Promise.all([
|
|
@@ -467,8 +467,8 @@ async function scaffoldPackageType ({
|
|
|
467
467
|
]);
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
function enhanceSlsa ({
|
|
471
|
-
if (
|
|
470
|
+
function enhanceSlsa ({provenance}) {
|
|
471
|
+
if (provenance) {
|
|
472
472
|
return {
|
|
473
473
|
badges: {
|
|
474
474
|
status: {
|
|
@@ -485,11 +485,21 @@ function enhanceSlsa ({packageDetails: {publishConfig: {access, provenance}}}) {
|
|
|
485
485
|
return {};
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
async function
|
|
489
|
-
|
|
488
|
+
async function liftProvenance ({projectRoot, packageDetails}) {
|
|
489
|
+
const {publishConfig: {access}} = packageDetails;
|
|
490
|
+
|
|
491
|
+
if ('public' === access) {
|
|
492
|
+
await mergeIntoExistingPackageJson({projectRoot, config: {publishConfig: {provenance: true}}});
|
|
493
|
+
|
|
494
|
+
return enhanceSlsa({provenance: true});
|
|
495
|
+
}
|
|
490
496
|
|
|
497
|
+
return {};
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
async function liftPublishable ({projectRoot, packageDetails}) {
|
|
491
501
|
return deepmerge(
|
|
492
|
-
|
|
502
|
+
await liftProvenance({packageDetails, projectRoot}),
|
|
493
503
|
{devDependencies: ['publint'], scripts: {'lint:publish': 'publint --strict'}}
|
|
494
504
|
);
|
|
495
505
|
}
|