3.4.2 - 2024-03-16
- fix failing test on Node.js v12 by changing the nullish coalescing to a direct null check
3.4.1 - 2024-03-09
- bump dependencies
- use UVU and c8 instead of jest for testing
- refined tests to use a controlled, local socket
basename(path, extension?)
: make theextension
argument optional
3.4.0 - 2021-08-21
isEmptyDir(path)
method: determine whether the givenpath
points to an empty directory- in comparison to the
Fs.emptyDir(path)
method, thisFs.isEmptyDir(path)
method doesn’t load all files into memory. It opens the folder as a stream and checks if at least one file exists
- in comparison to the
- bump dependencies
3.3.0 - 2021-07-26
appendLine(file, content, options)
method: append the givencontent
in a new line to thefile
- use
PathLike
type for the file parameter in theappend(file, content, options)
andappendLine(file, content, options)
methods
3.2.0 - 2021-07-20
- type definitions for the
options
object inallFiles(path, options
- bump dependencies
- refined doc blocks for the
files
andallFiles
methods
3.1.0 - 2021-07-04
content(file)
method: reads the content of the givenfile
and returns it as a string
- bump dependencies
readFile(file)
is deprecated- use
Fs.content(file)
orFs.readFile(file, 'utf8)
instead. You’ll receive a deprecation message when using this method without specifying theenconding
as the second argument
- use
3.0.1 - 2021-06-20
- moved
@types/fs-extra
from devDependencies to dependencies fixing missing tpying issues in Typescript
3.0.0 - 2021-06-14
lstat(path)
method: retrieve file system details about the givenpath
(used for symbolic links)fstat(path)
method: retrieve file system details about the givenpath
(used for file descriptors)isSocket(path)
method: determine whether the givenpath
is a socketisSymLink(path)
method: determine whether the givenpath
is a symbolic link
- export all methods from
fs-extra
: previously a subset of methods was exposed. Stream-related methods were not available. That changes with this release where all methods fromfs-extra
are exposed. On top of that, we add some helpful defaults to some methods, e.g.readFile
returns the content as string in this package) - bump dependencies
- updated to
fs-extra
10.x
- updated to
- moving the code base from being a class to export an object
- allows destructured imports for individual methods
// before import Fs from '@supercharge/fs' Fs.copy(src, dest) // now import { copy } from '@supercharge/fs' copy(src, dest)
- requires Node.js v12 or later (v10 before)
- renamed this package from
@supercharge/filesystem
to@supercharge/fs
@supercharge/filesystem
is now deprecated in favor of@supercharge/fs
- starting from 3.0.0: use
@supercharge/fs
- until version 2.3.0: use
@supercharge/filesystem
2.3.0 - 2021-02-14
- add
touch(file)
method: update the file’s last accessed and modified timestamps to the current time. Creates thefile
if it doesn’t exist.
2.2.1 - 2021-02-14
- configuration to publish the package in the GitHub Package Registry
2.2.0 - 2021-02-14
- add
homeDir(path?)
method: resolves the path to the user’s home directory - add
realPath
method: returns the real file path by resolving symbolic links
- bump dependencies
- change
main
entrypoint inpackage.json
todist
folder - move test runner from
@hapi/lab
tojest
- move assertions from
@hapi/code
tojest
- remove
index.js
file which acted as a middleman to export fromdist
folder
2.1.0 - 2020-06-12
- export TypeScript types that are used by this package
- bump dependencies
2.0.0 - 2020-05-21
rename(src, dest)
method to rename asrc
pathname todest
append(file, content, options)
method to append the givencontent
to afile
isNotLocked(file, options)
method to determine whether a givenfile
is not locked
- move code to TypeScript to automatically generate typings
We noticed issues using the lockfile
package to lock and unlock files. The file lock would even be aquired for non-existent files.
We switched the dependency for locking and unlocking files to proper-lockfile
. This package is now used to aquire, check, and release file locks.
Breaking Changes
- require Node.js v10 or later
- removed internally used
prepareLockFile
method because it’s not needed anymore
1.0.0
release 🚀 🎉