remove the use of fs-extra (#4370)

This commit is contained in:
Peter Hedenskog 2024-12-28 22:48:05 +01:00 committed by GitHub
parent 9a4ec79b8c
commit e027097429
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 46 deletions

View File

@ -9,7 +9,7 @@ import {
writeFile as _writeFile
} from 'node:fs';
import { copy } from 'fs-extra/esm';
import { cp } from 'node:fs/promises';
import intel from 'intel';
import { pathToFolder } from './pathToFolder.js';
@ -69,10 +69,12 @@ export function storageManager(baseDir, storagePathPrefix, options) {
return storagePathPrefix;
},
copyToResultDir(filename) {
return this.createDirectory().then(dir => copy(filename, dir));
return this.createDirectory().then(dir =>
cp(filename, dir, { recursive: true })
);
},
copyFileToDir(filename, dir) {
return copy(filename, dir);
return cp(filename, dir, { recursive: true });
},
// TODO is missing alias
removeDataForUrl(url) {

44
npm-shrinkwrap.json generated
View File

@ -25,7 +25,6 @@
"fast-crc32c": "2.0.0",
"fast-stats": "0.0.7",
"find-up": "7.0.0",
"fs-extra": "11.2.0",
"getos": "3.2.1",
"import-global": "1.1.1",
"influx": "5.9.3",
@ -5998,27 +5997,6 @@
}
]
},
"node_modules/fs-extra": {
"version": "11.2.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=14.14"
}
},
"node_modules/fs-extra/node_modules/universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
@ -6442,7 +6420,8 @@
"node_modules/graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
"dev": true
},
"node_modules/gtoken": {
"version": "7.1.0",
@ -7507,25 +7486,6 @@
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
"dev": true
},
"node_modules/jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dependencies": {
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/jsonfile/node_modules/universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/jsonify": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz",

View File

@ -95,7 +95,6 @@
"fast-crc32c": "2.0.0",
"fast-stats": "0.0.7",
"find-up": "7.0.0",
"fs-extra": "11.2.0",
"getos": "3.2.1",
"import-global": "1.1.1",
"influx": "5.9.3",