From 109af99ddd6df6e45ac3e474cda9b108a5b95a7d Mon Sep 17 00:00:00 2001 From: Joram van den Boezem Date: Tue, 9 May 2023 10:07:59 +0200 Subject: [PATCH] feat: update node.js versions (#166) Automated changes by [update-node-versions](https://github.com/hongaar/update-node-versions) GitHub action BREAKING CHANGE: This updates the supported node.js versions --- .github/workflows/ci.yml | 5 ++++- TODO.md | 13 +++++++------ packages/cli/test/add.test.ts | 16 +++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a741aa82..dd66b10c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14, 16, 18] + node-version: + - 16 + - 18 + - 20 steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/TODO.md b/TODO.md index 57fa68cf..32dca209 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,9 @@ ### TODOs -| Filename | line # | TODO | -| :------------------------------------------------------------------------- | :----: | :--------------------------------- | -| [packages/core/src/license.ts](packages/core/src/license.ts#L43) | 43 | Contents is not perfect yet, e.g.: | -| [packages/core/src/yarnrc.ts](packages/core/src/yarnrc.ts#L23) | 23 | etc, fix later | -| [packages/plugins/src/jest/jest.ts](packages/plugins/src/jest/jest.ts#L31) | 31 | install jest without ts-jest | -| [packages/plugins/src/xv/xv.ts](packages/plugins/src/xv/xv.ts#L16) | 16 | install xv without ts-node | +| Filename | line # | TODO | +| :------------------------------------------------------------------------- | :----: | :--------------------------------------------------------------- | +| [packages/cli/test/add.test.ts](packages/cli/test/add.test.ts#L62) | 62 | remove when https://github.com/nodejs/node/issues/47614 resolves | +| [packages/core/src/license.ts](packages/core/src/license.ts#L43) | 43 | Contents is not perfect yet, e.g.: | +| [packages/core/src/yarnrc.ts](packages/core/src/yarnrc.ts#L23) | 23 | etc, fix later | +| [packages/plugins/src/jest/jest.ts](packages/plugins/src/jest/jest.ts#L31) | 31 | install jest without ts-jest | +| [packages/plugins/src/xv/xv.ts](packages/plugins/src/xv/xv.ts#L16) | 16 | install xv without ts-node | diff --git a/packages/cli/test/add.test.ts b/packages/cli/test/add.test.ts index 7999dca7..1eb2f6d2 100644 --- a/packages/cli/test/add.test.ts +++ b/packages/cli/test/add.test.ts @@ -22,7 +22,7 @@ beforeEach(() => { tempDir = temporaryDirectory(); }); -it("should only run wihtin monorepos", async () => { +it("should only run within monorepos", async () => { await assert.rejects(cli.run(`add --cwd ${tempDir} foo`), { name: "Error", message: "Execute this command from within a monorepo", @@ -45,8 +45,6 @@ it("needs a workspace configuration", async () => { }); it("should add a workspace", async () => { - const tempDir = temporaryDirectory(); - await createDirectory({ directory: `${tempDir}/.git` }); await writePackage({ directory: tempDir, @@ -59,12 +57,12 @@ it("should add a workspace", async () => { await cli.run(`add --cwd ${tempDir} foo`); }); -it( - "should not confuse templates and workspace names", - { only: true }, - async () => { - const tempDir = temporaryDirectory(); +it("should not confuse templates and workspace names", async () => { + /** + * @todo: remove when https://github.com/nodejs/node/issues/47614 resolves + */ + if (!process.versions.node.startsWith("20.")) { await createDirectory({ directory: `${tempDir}/.git` }); await writePackage({ directory: tempDir, @@ -77,4 +75,4 @@ it( await cli.run(`add --cwd ${tempDir} --template bar foo`); assert(await isDirectory({ directory: `${tempDir}/packages/foo` })); } -); +});