Skip to content

Commit

Permalink
refactor: replace provenance with environment variable
Browse files Browse the repository at this point in the history
* refactor: replace provenance with environment variable

* ci: run renovate monthly
  • Loading branch information
gmeligio authored Feb 13, 2024
1 parent 92efd02 commit 5f3b25b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RenovatebotOptions } from 'projen';
import { RenovatebotOptions, RenovatebotScheduleInterval } from 'projen';
import { JsiiProjectOptions } from 'projen/lib/cdk';
import {
JestReporter,
Expand Down Expand Up @@ -103,6 +103,7 @@ const renovatebotOptions: RenovatebotOptions = {
},
],
},
scheduleInterval: [RenovatebotScheduleInterval.MONTHLY],
};

const dependencyOptions: Pick<TypeScriptProjectOptions, 'bundledDeps' | 'devDeps' | 'peerDeps' | 'renovatebotOptions'> =
Expand Down
3 changes: 1 addition & 2 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion renovate.json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions src/patch/JsiiProjectPatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ export class JsiiProjectPatch extends JsiiProject {
// NPM metadata
this.addKeywords('projen');

// .npmrc
// TODO: Submit to upstream projen with some sort of logic like `npmProvenance`
this.tryFindObjectFile('package.json')?.patch(JsonPatch.add('/publishConfig/provenance', true));

const versionFilePath = 'version.json';

const renovateGithubActionsManager = 'github-actions';
Expand Down Expand Up @@ -368,10 +364,10 @@ export class JsiiProjectPatch extends JsiiProject {
// path: [1, 'uses'],
// element: options.actions.actionsDownloadArtifact,
// },
// {
// path: [8, 'env', 'NPM_ACCESS_LEVEL'],
// element: { value: 'public' },
// },
{
path: [8, 'env', 'NPM_CONFIG_PROVENANCE'],
element: { value: 'true' },
},
])
.createTransformations();

Expand Down

0 comments on commit 5f3b25b

Please sign in to comment.