Skip to content

Commit

Permalink
feat!: drop support for node14 and node16 (#718)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Support for node14 and node16 has been dropped. If you need to use one of these versions, please use [@mrgrain/cdk-esbuild@v4](https://github.com/mrgrain/cdk-esbuild/tree/v4)
  • Loading branch information
mrgrain authored Sep 3, 2023
1 parent bbf3fe8 commit 9b76a6d
Show file tree
Hide file tree
Showing 9 changed files with 407 additions and 9,827 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml

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

4 changes: 0 additions & 4 deletions .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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v18
38 changes: 19 additions & 19 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
import { JsonPatch, awscdk, github, javascript, release, vscode } from 'projen';
import { awscdk, github, javascript, release, vscode } from 'projen';
import { SourceFile } from 'ts-morph';
import { tagOnNpm, TypeScriptSourceFile } from './projenrc';
import { LockfileVersion, releaseOptions as configureReleaseBranches, StableReleaseBranches, StableReleases, tagOnNpm, TypeScriptSourceFile, WordmarkReadme } from './projenrc';
import { IntegrationTests } from './projenrc/IntegrationTests';
import { WordmarkReadme } from './projenrc/WordmarkReadme';
import { Esbuild } from './src/private/esbuild-source';

const releaseBranches: StableReleaseBranches = {
main: {
majorVersion: 4,
npmDistTag: 'latest',
lockfileVersion: LockfileVersion.V3,
minNodeVersion: '18.x',
},
v3: {
majorVersion: 3,
npmDistTag: 'old-stable',
lockfileVersion: LockfileVersion.V2,
minNodeVersion: '14.x',
},
};

const project = new awscdk.AwsCdkConstructLibrary({
packageManager: javascript.NodePackageManager.NPM,
projenrcTs: true,
Expand Down Expand Up @@ -63,15 +77,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
},

// Release
npmDistTag: 'latest',
defaultReleaseBranch: 'main',
majorVersion: 4,
releaseBranches: {
v3: {
majorVersion: 3,
npmDistTag: 'old-stable',
},
},
...configureReleaseBranches(releaseBranches),
releaseTrigger: release.ReleaseTrigger.scheduled({
schedule: '0 5 1,15 * *',
}),
Expand Down Expand Up @@ -154,13 +160,7 @@ new IntegrationTests(project, {
},
});

// use npm@8 in upgrade workflow
for (const upgradeWorkflow of project.upgradeWorkflow?.workflows!) {
upgradeWorkflow.file?.patch(JsonPatch.add('/jobs/upgrade/steps/2', {
name: 'Use npm@8',
run: ['npm i -g npm@8', 'npm --version'].join('\n'),
}));
}
new StableReleases(project, releaseBranches);


// test against latest versions
Expand Down
22 changes: 22 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Supported Versions

Only the latest release of each major version is supported.

| Package version | CDK version | Node.js versions | Support |
| --------------- | ----------- | ---------------- | -------------------------------------------------------------- |
| v5 | ^2.12.0 | >=18 | :white_check_mark: |
| v4 | ^2.12.0 | >=14 | :white_check_mark: |
| v3 | ^2.0.0 | >=14 | Security updates and critical bug fixes until February 1, 2024 |
| v2 | ^1.99.0 | >=12 | :x: Support ended on June 1, 2023 |
| v1 | ^1.99.0 | >=12 | :x: |

## Tags on npm

| Tag | Description | Current version | Will the version change? |
| ------------ | ------------------------------------------------------------------------------------------ | --------------- | ------------------------------------ |
| `latest` | The latest stable release of the package | `v4` | Yes, with new major versions |
| `old-stable` | The previous major release. This tag will be updated when a new major version is released. | `v3` | Yes, with new major versions |
| `cdk-v2` | The latest stable release compatible with AWS CDK v2 | `v4` | Yes, with new major versions |
| `cdk-v1` | The latest stable release compatible with AWS CDK v1 | `v2` | Unlikely |
| `next` | Preview versions, if available `>= latest` | `v4` | Yes |
| `unstable` | Used for development purposes only. **Do not use!** | undefined | May change to any version at anytime |
Loading

0 comments on commit 9b76a6d

Please sign in to comment.