@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.js
CHANGED
|
@@ -121,8 +121,8 @@ async function removeNyc ({projectRoot, packageManager}) {
|
|
|
121
121
|
]);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
async function lift$2({projectRoot, packageManager}) {
|
|
125
|
-
const codecovResults = await codecov.lift({projectRoot, packageManager});
|
|
124
|
+
async function lift$2({projectRoot, packageManager, vcs}) {
|
|
125
|
+
const codecovResults = await codecov.lift({projectRoot, packageManager, vcs});
|
|
126
126
|
|
|
127
127
|
if (await nycIsConfigured({projectRoot})) {
|
|
128
128
|
const [c8Results] = await Promise.all([
|
|
@@ -503,8 +503,8 @@ async function scaffoldPackageType ({
|
|
|
503
503
|
]);
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
-
function enhanceSlsa ({
|
|
507
|
-
if (
|
|
506
|
+
function enhanceSlsa ({provenance}) {
|
|
507
|
+
if (provenance) {
|
|
508
508
|
return {
|
|
509
509
|
badges: {
|
|
510
510
|
status: {
|
|
@@ -521,11 +521,21 @@ function enhanceSlsa ({packageDetails: {publishConfig: {access, provenance}}}) {
|
|
|
521
521
|
return {};
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
async function
|
|
525
|
-
|
|
524
|
+
async function liftProvenance ({projectRoot, packageDetails}) {
|
|
525
|
+
const {publishConfig: {access}} = packageDetails;
|
|
526
|
+
|
|
527
|
+
if ('public' === access) {
|
|
528
|
+
await javascriptCore.mergeIntoExistingPackageJson({projectRoot, config: {publishConfig: {provenance: true}}});
|
|
529
|
+
|
|
530
|
+
return enhanceSlsa({provenance: true});
|
|
531
|
+
}
|
|
526
532
|
|
|
533
|
+
return {};
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
async function liftPublishable ({projectRoot, packageDetails}) {
|
|
527
537
|
return deepmerge__default["default"](
|
|
528
|
-
|
|
538
|
+
await liftProvenance({packageDetails, projectRoot}),
|
|
529
539
|
{devDependencies: ['publint'], scripts: {'lint:publish': 'publint --strict'}}
|
|
530
540
|
);
|
|
531
541
|
}
|