This repository was archived by the owner on Jan 31, 2025. It is now read-only.
Releases: foxkit-js/node-util
Releases · foxkit-js/node-util
v0.6.0
v0.5.4
v0.5.3
v0.5.2 - Hotfix for previous release
- Fixed an incorrect path in ParsedFile causing a directory being created with the file's path, resulting in an "Illegal operation on a directory" error where writeFile had to create directories that didn't exist yet
v0.5.1
- Fixed: fs-extra/ParsedFile should make dir if needed
- UPDATE: This functionality has a bug in this release. Either upgrade to 0.5.2 or make sure to create the directories beforehand by calling
await fs.promises.mkdir(path.dirname(yourTargetFilePathHere), { recursive: true });beforehand.
- UPDATE: This functionality has a bug in this release. Either upgrade to 0.5.2 or make sure to create the directories beforehand by calling
- Fixed: missing doc comment on fs-extra/ParsedFile.readDir
v0.5.0 - fs Rewrite
What's Changed
- Breaking:
fs/dirExistsrenamed tofs/isDirectory - Breaking:
fs/fileExistsrenamed tofs/isFile - Breaking: Removed the following functions:
fs/makeDir- usefs.promises.mkdir(path, { recursive: true })insteadpath/joinPath- usepath.joininsteadpath/toRelativePath- usepath.relative(process.cwd(), absolutePathHere)instead
- Breaking: removed JSON parse/stringify behaviour of
fs/writeFileandfs.readFile. These function will now only handle raw text read/writes - Breaking: moved
path/getFileNametofs/getFilenameto fully retire the path module - Breaking:
fs/readFileJsonandfs-yamlhave been replaced withfs-extra/ParsedFile. This removes the peerdependecy onyaml. - Added:fs-extra/ParsedFile - Added:
fs/readDir- recursive and filterable extension offs.promises.readdir
Usage of new functions/classes as well as rewritten functions have so far been documented via JSDoc comments. A full documentation page will be released later, as well as additional features like caching reads (invalidated by writes). This new class also features a new readDir method which can be used to parse files from an entire directory.
Full Changelog: v0.4.1...v0.5.0