Skip to content

Commit

Permalink
build: configure min/max nodejs versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aripalo committed Nov 20, 2024
1 parent 0492342 commit 6c27665
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml

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

10 changes: 5 additions & 5 deletions .github/workflows/release-beta.yml

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

10 changes: 5 additions & 5 deletions .github/workflows/release.yml

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

2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-report.yml

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

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-beta.yml

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

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-main.yml

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

2 changes: 1 addition & 1 deletion .nvmrc

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

1 change: 1 addition & 0 deletions .projen/deps.json

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

2 changes: 1 addition & 1 deletion .projen/tasks.json

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

16 changes: 15 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ import { awscdk, javascript, TextFile } from 'projen';
import { WorkflowSteps } from 'projen/lib/github';
import { JobPermission } from 'projen/lib/github/workflows-model';

const nodejsVersion = {
/**
* Minimum supported version.
*/
MIN: '18',
/**
* Maximum supported version.
*/
MAX: '23',
} as const;

const project = new awscdk.AwsCdkConstructLibrary({
minNodeVersion: nodejsVersion.MIN,
maxNodeVersion: nodejsVersion.MAX,
projenrcTs: true,
jsiiVersion: '~5.3.24',
// Metadata
Expand Down Expand Up @@ -39,6 +52,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
constructsVersion: '10.3.0',
devDeps: [
'@types/nunjucks',
`@types/node@^${nodejsVersion.MIN}`,
],
bundledDeps: [
'change-case',
Expand Down Expand Up @@ -117,7 +131,7 @@ new TextFile(project, 'sonar-project.properties', {
* .nvmrc file
*/
new TextFile(project, '.nvmrc', {
lines: ['20.11.1'],
lines: [nodejsVersion.MIN],
});

project.synth();
3 changes: 3 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json

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

0 comments on commit 6c27665

Please sign in to comment.