Skip to content

Commit

Permalink
chore: Update repo deps (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored Dec 2, 2024
1 parent 59586a8 commit c778179
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions integration/__tests__/pnpm-workspaces.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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()
})

Expand Down
12 changes: 2 additions & 10 deletions integration/__tests__/scan-once.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down
10 changes: 10 additions & 0 deletions integration/helpers/renamer.ts
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit c778179

Please sign in to comment.