Skip to content

2.0.0

Compare
Choose a tag to compare
@wooorm wooorm released this 21 Aug 13:27
· 262 commits to main since this release

Highlights

  • Remove some of the non-essentials currently in this project (hasFailed, namespace, move)
  • Streamline path-manipulation (there’s now getter/setters for path, dirname, basename, stem, and extname)
  • Add support for buffers as content
  • Simplify messages: no quiet, remove old #message() and rename #warn() to #message()
  • Standardise custom properties

API difference

The following diff shows in short the major API changes:

  `VFile.contents` // now also accepts buffers
- `VFile#directory`
+ `VFile.dirname`
- `VFile#filename`
+ `VFile.stem`
- `VFile#extension`
+ `VFile.extname`
- `VFile#basename()`
+ `VFile.basename`
- `VFile#filePath()`
+ `VFile.path`
- `VFile#quiet`
- `VFile#move(options)`
- `VFile#namespace(key)` // use `vfile.data` directly;
- `VFile#message(reason[, position[, ruleId]])`
- `VFile#warn(reason[, position[, ruleId]])`
+ `VFile#message(reason[, position[, ruleId]])`
  `VFile#fail(reason[, position[, ruleId]])`
- `VFile#hasFailed()`

🎉