Skip to content

Migrating from v0.5.3 to v0.6

Nate Fischer edited this page Jan 17, 2022 · 5 revisions

Did we miss any features you like? Did we skip over any breaking changes you found? Feel free to document them below.

Breaking changes

  • Bash compat: The semantics of ln('-s', ...) changed slightly. Relative symbolic links are now relative to the destination, not to the source like they were in v0.5.3. If you notice that your links break, you may be able to use absolute symbolic links instead using path.resolve().
  • Bash compat: mv() and cp() now use the -f flag by default. Previously, mv(srcFile, destFile) would complain if destFile already existed. If you need the old behavior back, use the -n (no-clobber) option.
  • We introduced a bug... cp('-r', 'file.txt', 'file2.txt') ('-r' on regular files) fails in v0.6. This was unintentional, and has been fixed in v0.7. As a workaround, use cp() with the -r flag only for directories (which still works 👍).
  • Deprecated: exec() used to return an object that looks like {code: ..., output: ...}. It now returns an object that looks like {code: ..., stdout: ..., stderr: ..., output: ...}. The .output attribute is deprecated.

Awesome features

  • This actually runs on Windows! We added Appveyor CI for v0.6, and got many of our functions fixed to be Windows compatible (special thanks to BYK).
  • Bash compat: You can use ~/ to specify your home directory!
  • Bash compat: cd() goes to your home directory, cd('-') jumps back to the previous directory.
  • ls('-l') and ls('-d') are now available.
  • New command: touch() - create files, modify timestamps, etc.
  • New command: set() - edit configuration variables easily (try out set('-e'))