From c778179c1b71ec9657521857a7ef25b6b808507f Mon Sep 17 00:00:00 2001 From: Lennart Date: Mon, 2 Dec 2024 14:58:14 +0100 Subject: [PATCH] chore: Update repo deps (#135) --- .github/workflows/integration-testing.yml | 2 +- integration/__tests__/pnpm-workspaces.ts | 3 +++ integration/__tests__/scan-once.ts | 12 ++---------- ...pm-workspace.yaml => fixture.pnpm-workspace.yaml} | 0 integration/helpers/renamer.ts | 10 ++++++++++ 5 files changed, 16 insertions(+), 11 deletions(-) rename integration/fixtures/pnpm-workspaces/source/{pnpm-workspace.yaml => fixture.pnpm-workspace.yaml} (100%) create mode 100644 integration/helpers/renamer.ts diff --git a/.github/workflows/integration-testing.yml b/.github/workflows/integration-testing.yml index c3dcdfe..d2ffd67 100644 --- a/.github/workflows/integration-testing.yml +++ b/.github/workflows/integration-testing.yml @@ -13,7 +13,7 @@ jobs: version: 10.8.1 - name: pnpm displayName: pnpm - version: 9.4.0 + version: 9.12.3 - name: yarn displayName: yarn (classic) version: 1.22.22 diff --git a/integration/__tests__/pnpm-workspaces.ts b/integration/__tests__/pnpm-workspaces.ts index c485d92..53ac552 100644 --- a/integration/__tests__/pnpm-workspaces.ts +++ b/integration/__tests__/pnpm-workspaces.ts @@ -1,5 +1,6 @@ import type { Application } from '../models/application' import getPort from 'get-port' +import { renamePnpmWorkspaceFixture } from '../helpers/renamer' import { presets } from '../presets' const isPnpm = process.env.INTEGRATION_PM_NAME === 'pnpm' @@ -10,6 +11,8 @@ describe.runIf(isPnpm)('pnpm workspaces', () => { beforeAll(async () => { app = await presets.pnpmWorkspaces.commit() + await renamePnpmWorkspaceFixture(app, 'source') + process.env.SECCO_VERDACCIO_PORT = (await getPort()).toString() }) diff --git a/integration/__tests__/scan-once.ts b/integration/__tests__/scan-once.ts index 56c8dad..52f5e42 100644 --- a/integration/__tests__/scan-once.ts +++ b/integration/__tests__/scan-once.ts @@ -1,16 +1,8 @@ import type { Application } from '../models/application' -import fs from 'fs-extra' import getPort from 'get-port' -import { join } from 'pathe' +import { renamePnpmWorkspaceFixture } from '../helpers/renamer' import { presets } from '../presets' -async function renamePnpmWorkspaceFixture(app: Application) { - const fixture = join(app.dir, 'destination', 'fixture.pnpm-workspace.yaml') - const tmpWorkspaceYaml = join(app.dir, 'destination', 'pnpm-workspace.yaml') - - await fs.rename(fixture, tmpWorkspaceYaml) -} - describe.sequential('scan-once', () => { describe.sequential('single package', () => { let app: Application @@ -59,7 +51,7 @@ describe.sequential('scan-once', () => { app = await presets.kitchenSinkWorkspaces.commit() if (process.env.INTEGRATION_PM_NAME === 'pnpm') { - await renamePnpmWorkspaceFixture(app) + await renamePnpmWorkspaceFixture(app, 'destination') } process.env.SECCO_VERDACCIO_PORT = (await getPort()).toString() diff --git a/integration/fixtures/pnpm-workspaces/source/pnpm-workspace.yaml b/integration/fixtures/pnpm-workspaces/source/fixture.pnpm-workspace.yaml similarity index 100% rename from integration/fixtures/pnpm-workspaces/source/pnpm-workspace.yaml rename to integration/fixtures/pnpm-workspaces/source/fixture.pnpm-workspace.yaml diff --git a/integration/helpers/renamer.ts b/integration/helpers/renamer.ts new file mode 100644 index 0000000..c6279fb --- /dev/null +++ b/integration/helpers/renamer.ts @@ -0,0 +1,10 @@ +import type { Application } from '../models/application' +import fs from 'fs-extra' +import { join } from 'pathe' + +export async function renamePnpmWorkspaceFixture(app: Application, folder: 'destination' | 'source') { + const fixture = join(app.dir, folder, 'fixture.pnpm-workspace.yaml') + const tmpWorkspaceYaml = join(app.dir, folder, 'pnpm-workspace.yaml') + + await fs.rename(fixture, tmpWorkspaceYaml) +}