Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Releases: foxkit-js/node-util

v0.6.0

24 Jul 14:21
v0.6.0
306f59c

Choose a tag to compare

  • ParsedFile
    • Added: Parse function now gets the fully resolved file path as a second parameter

v0.5.4

27 Jun 18:26
v0.5.4
9139f80

Choose a tag to compare

  • ParsedFile
    • now exporting FileParserResult<T> and FileWriteResult types as well as ParsedFileError class

v0.5.3

27 Jun 18:24
v0.5.3
7e2f94e

Choose a tag to compare

  • ParsedFile
    • made stringify and parse methods optional. Not passing one will disable the feature.
    • new: Added cache option
    • improved error handling with ParsedFileError class

v0.5.2 - Hotfix for previous release

24 Jun 11:01
v0.5.2
945af81

Choose a tag to compare

  • 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

23 Jun 18:38
v0.5.1
c46642e

Choose a tag to compare

  • 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.
  • Fixed: missing doc comment on fs-extra/ParsedFile.readDir

v0.5.0 - fs Rewrite

18 Jun 15:25
v0.5.0
2af2e1e

Choose a tag to compare

What's Changed

  • Breaking: fs/dirExists renamed to fs/isDirectory
  • Breaking: fs/fileExists renamed to fs/isFile
  • Breaking: Removed the following functions:
    • fs/makeDir - use fs.promises.mkdir(path, { recursive: true }) instead
    • path/joinPath - use path.join instead
    • path/toRelativePath - use path.relative(process.cwd(), absolutePathHere) instead
  • Breaking: removed JSON parse/stringify behaviour of fs/writeFile and fs.readFile. These function will now only handle raw text read/writes
  • Breaking: moved path/getFileName to fs/getFilename to fully retire the path module
  • Breaking: fs/readFileJson and fs-yaml have been replaced with fs-extra/ParsedFile. This removes the peerdependecy on yaml. - Added: fs-extra/ParsedFile
  • Added: fs/readDir - recursive and filterable extension of fs.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

v0.4.1

08 Jun 20:04
v0.4.1
3cc3839

Choose a tag to compare

  • Moved back to foxkit org on github
  • Updated dependencies (fixes peerDependency warning when using up-to-date version of yaml)

v0.2.0

31 Dec 18:05

Choose a tag to compare

  • Added getFileName in path

v0.1.2

31 Dec 18:05

Choose a tag to compare

  • Fixed missing exports in fs

v0.1.1

27 Dec 19:15
v0.1.1
c214c84

Choose a tag to compare

v0.1.1