mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-18 22:02:53 -04:00
chore(deps): remove fs-extra
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
"@types/sinon": "^9.0.4",
|
||||
"@types/tape-promise": "^4.0.1",
|
||||
"@zkochan/rimraf": "1.0.0",
|
||||
"fs-extra": "9.0.0",
|
||||
"is-windows": "1.0.2",
|
||||
"isexe": "2.0.0",
|
||||
"load-json-file": "6.2.0",
|
||||
|
||||
@@ -14,8 +14,8 @@ import { fromDir as readPackageJsonFromDir } from '@pnpm/read-package-json'
|
||||
import readprojectsContext from '@pnpm/read-projects-context'
|
||||
import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock'
|
||||
import rimraf = require('@zkochan/rimraf')
|
||||
import fse = require('fs-extra')
|
||||
import loadJsonFile = require('load-json-file')
|
||||
import fs = require('mz/fs')
|
||||
import path = require('path')
|
||||
import exists = require('path-exists')
|
||||
import readYamlFile from 'read-yaml-file'
|
||||
@@ -287,15 +287,15 @@ test('orphan packages are removed', async (t) => {
|
||||
|
||||
const simpleWithMoreDepsDir = path.join(fixtures, 'simple-with-more-deps')
|
||||
const simpleDir = path.join(fixtures, 'simple')
|
||||
fse.copySync(path.join(simpleWithMoreDepsDir, 'package.json'), destPackageJsonPath)
|
||||
fse.copySync(path.join(simpleWithMoreDepsDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
await fs.copyFile(path.join(simpleWithMoreDepsDir, 'package.json'), destPackageJsonPath)
|
||||
await fs.copyFile(path.join(simpleWithMoreDepsDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
|
||||
await headless(await testDefaults({
|
||||
lockfileDir: projectDir,
|
||||
}))
|
||||
|
||||
fse.copySync(path.join(simpleDir, 'package.json'), destPackageJsonPath)
|
||||
fse.copySync(path.join(simpleDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
await fs.copyFile(path.join(simpleDir, 'package.json'), destPackageJsonPath)
|
||||
await fs.copyFile(path.join(simpleDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
|
||||
const reporter = sinon.spy()
|
||||
await headless(await testDefaults({
|
||||
@@ -328,13 +328,13 @@ test('available packages are used when node_modules is not clean', async (t) =>
|
||||
|
||||
const hasGlobDir = path.join(fixtures, 'has-glob')
|
||||
const hasGlobAndRimrafDir = path.join(fixtures, 'has-glob-and-rimraf')
|
||||
fse.copySync(path.join(hasGlobDir, 'package.json'), destPackageJsonPath)
|
||||
fse.copySync(path.join(hasGlobDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
await fs.copyFile(path.join(hasGlobDir, 'package.json'), destPackageJsonPath)
|
||||
await fs.copyFile(path.join(hasGlobDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
|
||||
await headless(await testDefaults({ lockfileDir: projectDir }))
|
||||
|
||||
fse.copySync(path.join(hasGlobAndRimrafDir, 'package.json'), destPackageJsonPath)
|
||||
fse.copySync(path.join(hasGlobAndRimrafDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
await fs.copyFile(path.join(hasGlobAndRimrafDir, 'package.json'), destPackageJsonPath)
|
||||
await fs.copyFile(path.join(hasGlobAndRimrafDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
|
||||
const reporter = sinon.spy()
|
||||
await headless(await testDefaults({ lockfileDir: projectDir, reporter }))
|
||||
@@ -368,13 +368,13 @@ test('available packages are relinked during forced install', async (t) => {
|
||||
|
||||
const hasGlobDir = path.join(fixtures, 'has-glob')
|
||||
const hasGlobAndRimrafDir = path.join(fixtures, 'has-glob-and-rimraf')
|
||||
fse.copySync(path.join(hasGlobDir, 'package.json'), destPackageJsonPath)
|
||||
fse.copySync(path.join(hasGlobDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
await fs.copyFile(path.join(hasGlobDir, 'package.json'), destPackageJsonPath)
|
||||
await fs.copyFile(path.join(hasGlobDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
|
||||
await headless(await testDefaults({ lockfileDir: projectDir }))
|
||||
|
||||
fse.copySync(path.join(hasGlobAndRimrafDir, 'package.json'), destPackageJsonPath)
|
||||
fse.copySync(path.join(hasGlobAndRimrafDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
await fs.copyFile(path.join(hasGlobAndRimrafDir, 'package.json'), destPackageJsonPath)
|
||||
await fs.copyFile(path.join(hasGlobAndRimrafDir, WANTED_LOCKFILE), destLockfileYamlPath)
|
||||
|
||||
const reporter = sinon.spy()
|
||||
await headless(await testDefaults({ lockfileDir: projectDir, reporter, force: true }))
|
||||
@@ -404,10 +404,10 @@ test(`fail when ${WANTED_LOCKFILE} is not up-to-date with package.json`, async (
|
||||
t.comment(projectDir)
|
||||
|
||||
const simpleDir = path.join(fixtures, 'simple')
|
||||
fse.copySync(path.join(simpleDir, 'package.json'), path.join(projectDir, 'package.json'))
|
||||
await fs.copyFile(path.join(simpleDir, 'package.json'), path.join(projectDir, 'package.json'))
|
||||
|
||||
const simpleWithMoreDepsDir = path.join(fixtures, 'simple-with-more-deps')
|
||||
fse.copySync(path.join(simpleWithMoreDepsDir, WANTED_LOCKFILE), path.join(projectDir, WANTED_LOCKFILE))
|
||||
await fs.copyFile(path.join(simpleWithMoreDepsDir, WANTED_LOCKFILE), path.join(projectDir, WANTED_LOCKFILE))
|
||||
|
||||
try {
|
||||
await headless(await testDefaults({ lockfileDir: projectDir }))
|
||||
@@ -448,8 +448,8 @@ test('installing using passed in lockfile files', async (t) => {
|
||||
t.comment(prefix)
|
||||
|
||||
const simplePkgPath = path.join(fixtures, 'simple')
|
||||
fse.copySync(path.join(simplePkgPath, 'package.json'), path.join(prefix, 'package.json'))
|
||||
fse.copySync(path.join(simplePkgPath, WANTED_LOCKFILE), path.join(prefix, WANTED_LOCKFILE))
|
||||
await fs.copyFile(path.join(simplePkgPath, 'package.json'), path.join(prefix, 'package.json'))
|
||||
await fs.copyFile(path.join(simplePkgPath, WANTED_LOCKFILE), path.join(prefix, WANTED_LOCKFILE))
|
||||
|
||||
const wantedLockfile = await readWantedLockfile(simplePkgPath, { ignoreIncompatible: false })
|
||||
|
||||
@@ -667,7 +667,7 @@ test.skip('using side effects cache and hoistPattern=*', async (t) => {
|
||||
await project.has('.pnpm/node_modules/es6-promise') // verifying that a flat node_modules was created
|
||||
|
||||
const cacheBuildDir = path.join(opts.storeDir, `localhost+${REGISTRY_MOCK_PORT}/diskusage@1.1.3/side_effects/${ENGINE_DIR}/package/build`)
|
||||
fse.writeFileSync(path.join(cacheBuildDir, 'new-file.txt'), 'some new content')
|
||||
fs.writeFileSync(path.join(cacheBuildDir, 'new-file.txt'), 'some new content')
|
||||
|
||||
await rimraf(path.join(lockfileDir, 'node_modules'))
|
||||
await headless(opts)
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
"dir-is-case-sensitive": "1.0.2",
|
||||
"execa": "^4.0.2",
|
||||
"exists-link": "2.0.0",
|
||||
"fs-extra": "9.0.0",
|
||||
"is-ci": "2.0.0",
|
||||
"is-windows": "1.0.2",
|
||||
"ncp": "2.0.0",
|
||||
|
||||
15
pnpm-lock.yaml
generated
15
pnpm-lock.yaml
generated
@@ -636,7 +636,6 @@ importers:
|
||||
'@types/sinon': 9.0.4
|
||||
'@types/tape-promise': 4.0.1
|
||||
'@zkochan/rimraf': 1.0.0
|
||||
fs-extra: 9.0.0
|
||||
is-windows: 1.0.2
|
||||
isexe: 2.0.0
|
||||
load-json-file: 6.2.0
|
||||
@@ -684,7 +683,6 @@ importers:
|
||||
'@types/tape-promise': ^4.0.1
|
||||
'@zkochan/rimraf': 1.0.0
|
||||
dependency-path: 'workspace:4.0.7'
|
||||
fs-extra: 9.0.0
|
||||
is-windows: 1.0.2
|
||||
isexe: 2.0.0
|
||||
load-json-file: 6.2.0
|
||||
@@ -2637,7 +2635,6 @@ importers:
|
||||
dir-is-case-sensitive: 1.0.2
|
||||
execa: 4.0.2
|
||||
exists-link: 2.0.0
|
||||
fs-extra: 9.0.0
|
||||
is-ci: 2.0.0
|
||||
is-windows: 1.0.2
|
||||
ncp: 2.0.0
|
||||
@@ -2716,7 +2713,6 @@ importers:
|
||||
encode-registry: 2.0.2
|
||||
execa: ^4.0.2
|
||||
exists-link: 2.0.0
|
||||
fs-extra: 9.0.0
|
||||
get-npm-tarball-url: 2.0.1
|
||||
graceful-fs: 4.2.1
|
||||
graph-sequencer: 2.0.0
|
||||
@@ -6709,17 +6705,6 @@ packages:
|
||||
node: '>=6 <7 || >=8'
|
||||
resolution:
|
||||
integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
||||
/fs-extra/9.0.0:
|
||||
dependencies:
|
||||
at-least-node: 1.0.0
|
||||
graceful-fs: 4.2.4
|
||||
jsonfile: 6.0.1
|
||||
universalify: 1.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==
|
||||
/fs-extra/9.0.1:
|
||||
dependencies:
|
||||
at-least-node: 1.0.0
|
||||
|
||||
Reference in New Issue
Block a user