Skip to content

0.4.0: The Shipshape Update

Choose a tag to compare

@Cykelero Cykelero released this 19 Jan 15:34
· 48 commits to main since this release

This release is about smoothing off rough edges, and fixing a few long-standing inconveniences.

Script headers have been completely revamped: they're now much more compact, no longer raise syntax errors in some editors, and contain Tasklemon's full name, for better discoverability.

- #!/usr/bin/env lemon
- #version 0.2
- #require extract-iptc@0.1.3
- #require username@5.0.0

+ #!/usr/bin/env tasklemon-v0.2
+ // tl:require: extract-iptc@0.1.3, username@5.0.0

Command-line arguments can now be marked as required, or given a default value, and Tasklemon will produce a nice error message when appropriate. Also, the -- separator is now supported, along with using = for named argument values.

cli.accept({
    quality: ['-q --quality', Number],
    source: ['-s --source', Folder, required()],
    destination: ['-d --destination', Folder, required()]
});

// $ lemon demo.js --quality=90
// → Argument error: “--source” and “--destination” are required

Rough edges: smoothed off!

New

Improvements

  • Change default shebang to include runtime version
    • Version header is deprecated
  • Change require header format from #require to // tl:require:
    • Supports multiple packages per line
  • Improve command-line argument parsing
    • Named arguments can be specified with a = separator
    • Negative numbers and standalone dashes are fully supported
    • -- delimiter can be used to pass anything as a positional argument
  • cli.tell() now formats its output just like console.log() does

Fixes

  • Item.moveTo() can move items across volumes
  • runtime error messages are output to stderr instead of stdout

Documentation updates

  • Small improvements to the readme and the API docs
  • API reference has a dark mode
  • Update logo to be more yellow (yeah)
    • Readme logo now has a homely white outline, for readability when in dark color scheme

Dev environment updates

  • Tweak ESLint config
  • Tests: Test cli, ScriptParser