Skip to content

Commit

Permalink
Revert "chore(deps): remove 2 unnecessary dev deps"
Browse files Browse the repository at this point in the history
This reverts commit 055a7b0.
  • Loading branch information
serhalp committed Feb 4, 2025
1 parent 2eb463a commit 5e4b8fc
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 8 deletions.
65 changes: 65 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
"@netlify/eslint-config-node": "7.0.1",
"@netlify/functions": "3.0.0",
"@sindresorhus/slugify": "2.2.1",
"@types/fs-extra": "11.0.4",
"@types/inquirer": "9.0.7",
"@types/jsonwebtoken": "9.0.8",
"@types/lodash": "4.17.15",
Expand All @@ -197,6 +198,7 @@
"eslint-plugin-sort-destructure-keys": "2.0.0",
"eslint-plugin-workspace": "file:./tools/lint-rules",
"form-data": "4.0.1",
"fs-extra": "11.3.0",
"husky": "9.1.7",
"is-ci": "4.1.0",
"nock": "14.0.0",
Expand Down
7 changes: 2 additions & 5 deletions tests/integration/utils/fixture.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { cp } from 'fs/promises'
import { join } from 'path'
import { fileURLToPath } from 'url'

import type { NodeOptions } from 'execa'
import { copy } from 'fs-extra'
import { temporaryDirectory } from 'tempy'
import { afterAll, afterEach, beforeAll, beforeEach, describe } from 'vitest'

Expand Down Expand Up @@ -75,10 +75,7 @@ export class Fixture {
static async create(fixturePath: string, options?: FixtureSettings): Promise<Fixture> {
const fixture = new Fixture(fixturePath, temporaryDirectory(), options)

await cp(join(FIXTURES_DIRECTORY, fixturePath), fixture.directory, {
recursive: true,
verbatimSymlinks: true,
})
await copy(join(FIXTURES_DIRECTORY, fixturePath), fixture.directory)

return fixture
}
Expand Down
7 changes: 4 additions & 3 deletions tests/unit/utils/get-global-config.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { existsSync } from 'fs'
import { cp, mkdir, readFile, rm, writeFile } from 'fs/promises'
import { mkdir, readFile, rm, writeFile } from 'fs/promises'
import os from 'os'
import { join } from 'path'

import { copy } from 'fs-extra'
import { afterAll, beforeAll, beforeEach, expect, test } from 'vitest'

import { getLegacyPathInHome, getPathInHome } from '../../../dist/lib/settings.js'
Expand All @@ -19,7 +20,7 @@ const tmpConfigBackupPath = join(os.tmpdir(), `netlify-config-backup-${Date.now(
beforeAll(async () => {
// backup current user config directory
if (existsSync(configPath)) {
await cp(configPath, tmpConfigBackupPath, { recursive: true })
await copy(configPath, tmpConfigBackupPath)
}
})

Expand All @@ -33,7 +34,7 @@ afterAll(async () => {
// Restore user config directory if exists
if (existsSync(tmpConfigBackupPath)) {
await mkdir(configPath)
await cp(tmpConfigBackupPath, configPath, { recursive: true })
await copy(tmpConfigBackupPath, configPath)
// Remove tmp backup
await rm(tmpConfigBackupPath, { force: true, recursive: true })
}
Expand Down

0 comments on commit 5e4b8fc

Please sign in to comment.