diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f5994ec..cf79c40c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: yarn install --check-files - name: build @@ -91,7 +91,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: yarn install --check-files - name: Install Rosetta version @@ -109,3 +109,4 @@ jobs: - 5.0.14 - 5.1.2 - 5.2.0 + - 5.3.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7af6a5c..0a2f7ba1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: release @@ -56,7 +56,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Download build artifacts uses: actions/download-artifact@v3 with: @@ -81,7 +81,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Download build artifacts uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/upgrade-dev-deps-main.yml b/.github/workflows/upgrade-dev-deps-main.yml index f86173fe..2eec2005 100644 --- a/.github/workflows/upgrade-dev-deps-main.yml +++ b/.github/workflows/upgrade-dev-deps-main.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies diff --git a/.github/workflows/upgrade-main.yml b/.github/workflows/upgrade-main.yml index 0a177a1f..48f9d830 100644 --- a/.github/workflows/upgrade-main.yml +++ b/.github/workflows/upgrade-main.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies diff --git a/.projen/deps.json b/.projen/deps.json index ec50cdbc..b44b6f4b 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -10,7 +10,7 @@ }, { "name": "@types/node", - "version": "^16", + "version": "^18", "type": "build" }, { @@ -60,7 +60,7 @@ }, { "name": "jsii-rosetta", - "version": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0", + "version": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0 || ~5.3.0", "type": "build" }, { @@ -86,7 +86,7 @@ }, { "name": "jsii-rosetta", - "version": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0", + "version": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0 || ~5.3.0", "type": "peer" }, { diff --git a/.projenrc.ts b/.projenrc.ts index a3341489..52710b3a 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -41,8 +41,9 @@ const project = new CdklabsTypeScriptProject({ }, autoApproveUpgrades: true, - minNodeVersion: '16.0.0', - workflowNodeVersion: '16.x', + minNodeVersion: '18.12.0', + setNodeEngineVersion: false, + workflowNodeVersion: '18.x', jestOptions: { jestConfig: { setupFilesAfterEnv: ['/test/setup-jest.ts'], @@ -66,6 +67,7 @@ new RosettaPeerDependency(project, { [RosettaVersionLines.V5_0]: '~5.0.14', [RosettaVersionLines.V5_1]: '~5.1.2', [RosettaVersionLines.V5_2]: '~5.2.0', + [RosettaVersionLines.V5_3]: '~5.3.0', }, }); diff --git a/package.json b/package.json index f4a3bdfd..1309fa3d 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^29", - "@types/node": "^16", + "@types/node": "^18", "@types/semver": "^7.5.6", "@typescript-eslint/eslint-plugin": "^6", "@typescript-eslint/parser": "^6", @@ -50,7 +50,7 @@ "eslint-plugin-import": "^2.29.1", "jest": "^29", "jest-junit": "^15", - "jsii-rosetta": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0", + "jsii-rosetta": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0 || ~5.3.0", "projen": "^0.77.6", "standard-version": "^9", "ts-jest": "^29", @@ -58,7 +58,7 @@ "typescript": "~5.3.3" }, "peerDependencies": { - "jsii-rosetta": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0" + "jsii-rosetta": "~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0 || ~5.3.0" }, "dependencies": { "@jsii/spec": "^1.93.0", @@ -70,9 +70,6 @@ "semver": "^7.5.4", "yargs": "^16.2.0" }, - "engines": { - "node": ">= 16.0.0" - }, "main": "lib/index.js", "license": "Apache-2.0", "version": "0.0.0", diff --git a/projenrc/rosetta.ts b/projenrc/rosetta.ts index cc4dd42d..5c5e9770 100644 --- a/projenrc/rosetta.ts +++ b/projenrc/rosetta.ts @@ -8,6 +8,7 @@ export enum RosettaVersionLines { V5_0, V5_1, V5_2, + V5_3, } export interface RosettaPeerDependencyOptions { diff --git a/test/docgen/view/_npm.test.ts b/test/docgen/view/_npm.test.ts index a38ab8fd..123b35d5 100644 --- a/test/docgen/view/_npm.test.ts +++ b/test/docgen/view/_npm.test.ts @@ -1,7 +1,7 @@ import { ChildProcess, spawn } from 'child_process'; import { EventEmitter } from 'events'; import { tmpdir } from 'os'; -import { Readable, Writable } from 'stream'; +import { Pipe, Readable, Writable } from 'stream'; import { NoSpaceLeftOnDevice, NpmError, UnInstallablePackageError } from '../../../src'; import { Npm } from '../../../src/docgen/view/_npm'; @@ -146,6 +146,8 @@ class MockChildProcess extends EventEmitter implements ChildProcess { null as any, ] as ChildProcess['stdio']; + public readonly channel?: Pipe | null | undefined; + public constructor( public readonly exitCode: number | null, { @@ -162,6 +164,10 @@ class MockChildProcess extends EventEmitter implements ChildProcess { }); } + [Symbol.dispose](): void { + throw new Error('Method not implemented.'); + } + public addListener(): never { throw new UnsupportedCallError(); } diff --git a/yarn.lock b/yarn.lock index 98cc51de..ca2815c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -618,14 +618,6 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jsii/check-node@1.90.0": - version "1.90.0" - resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.90.0.tgz#05de59bb9024fb6a24c8d13c834f9badb5caf3db" - integrity sha512-bHrSs/X0mX6rVgBySk6JB/VYiqIV0HkznthZ4lpLabrgTEistwBYXxTf1kgNzfmUbIt0EeETwxdLAY0sqHE/+A== - dependencies: - chalk "^4.1.2" - semver "^7.5.4" - "@jsii/check-node@1.91.0": version "1.91.0" resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.91.0.tgz#2beb99cf9c8a022d1444f524f4b7729a1bc91168" @@ -642,7 +634,7 @@ chalk "^4.1.2" semver "^7.5.4" -"@jsii/spec@^1.90.0", "@jsii/spec@^1.91.0": +"@jsii/spec@^1.91.0": version "1.91.0" resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.91.0.tgz#91d624357a66148ab9a2d8b5fb26331fc7b01932" integrity sha512-Ir01bk5CwIFAApRJjRC+JG/f9db5dACEYFSxsHyvXRMu+J/LIANdwD4OPSelWrhbRiQdY6U16BKsRO63uaNRqg== @@ -854,10 +846,12 @@ dependencies: undici-types "~5.26.4" -"@types/node@^16": - version "16.18.68" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.68.tgz#3155f64a961b3d8d10246c80657f9a7292e3421a" - integrity sha512-sG3hPIQwJLoewrN7cr0dwEy+yF5nD4D/4FxtQpFciRD/xwUzgD+G05uxZHv5mhfXo4F9Jkp13jjn0CC2q325sg== +"@types/node@^18": + version "18.19.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.3.tgz#e4723c4cb385641d61b983f6fe0b716abd5f8fc0" + integrity sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg== + dependencies: + undici-types "~5.26.4" "@types/normalize-package-data@^2.4.0": version "2.4.4" @@ -2120,7 +2114,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9: +fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -2131,17 +2125,6 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" - integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-json-patch@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" @@ -3253,20 +3236,20 @@ jsii-reflect@^1.93.0: oo-ascii-tree "^1.93.0" yargs "^16.2.0" -"jsii-rosetta@~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0": - version "5.2.1" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.2.1.tgz#bd9d71bdc6b9c83d93c52163f99afacffff4746e" - integrity sha512-X98IBiNZSIkwmYfZ0de2b3dh7/BVBW//j8a/CVwm55J1YXYW9r6M/uIqRvqihD0GXgPVRCUjLpM/6BDluNSA8w== +"jsii-rosetta@~v1.85.0 || ~5.0.14 || ~5.1.2 || ~5.2.0 || ~5.3.0": + version "5.2.7" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.2.7.tgz#fdff8dcc8c0b2a6fc4add600324da1cff2a93d43" + integrity sha512-l7FuVxbAzySIQdedG20LqKplUHyY/f1MfgdinXLfEgxj8XY/o/7EXtGd0ZaG4anLaCQedUPjF7GRbI9NVo+eRA== dependencies: - "@jsii/check-node" "1.90.0" - "@jsii/spec" "^1.90.0" + "@jsii/check-node" "1.93.0" + "@jsii/spec" "^1.93.0" "@xmldom/xmldom" "^0.8.10" chalk "^4" commonmark "^0.30.0" - fast-glob "^3.3.1" + fast-glob "^3.3.2" jsii "~5.2.5" semver "^7.5.4" - semver-intersect "^1.4.0" + semver-intersect "^1.5.0" stream-json "^1.8.0" typescript "~5.2.2" workerpool "^6.5.1" @@ -4155,6 +4138,13 @@ semver-intersect@^1.4.0: dependencies: semver "^5.0.0" +semver-intersect@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/semver-intersect/-/semver-intersect-1.5.0.tgz#bb3aa0ea504935410d34cf15f49818d56906bd48" + integrity sha512-BDjWX7yCC0haX4W/zrnV2JaMpVirwaEkGOBmgRQtH++F1N3xl9v7k9H44xfTqwl+yLNNSbMKosoVSTIiJVQ2Pw== + dependencies: + semver "^6.3.0" + "semver@2 || 3 || 4 || 5", semver@^5.0.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"