Releases: Cykelero/tasklemon
0.5.2
New
- Add
--version
- Allow using
required()
anddefaultsTo()
on a rest argument
Improvements
- Accept values for
--inspect
and--inspect-brk
arguments, to set custom port- Needed for some IDE debuggers
- Much better npm error handling
- Print all importing and requiring errors that occur
- Also print the path to
preparePackageCacheBundle.errors.log
, for install errors - Don't silence package-specific install errors
- Improve package preparation speed in some circumstances
Fixes
- Support lockfile v3 in
--pin-pkg
(needed when using npm v9 and up)
0.5.1
0.5.0: The ESM Update
Finally in Tasklemon: ESM package support!
More and more Node packages are not only adding support for ESM imports, but also removing their CommonJS support—this meant you couldn't use them with Tasklemon anymore.
With Tasklemon 0.5.0, you can now use ESM packages, exactly as you'd use CommonJS packages:
cli.tell(npm.chalk.yellow("lemons") + ", please!");
A package's default export is exposed directly (for instance, as npm.camelcase
), and named exports are exposed as nested properties (for instance, npm.uuid.validate
). And the same syntax falls back to CommonJS when appropriate.
In the majority of cases, this is all you need! For more in-depth info, see the npm
documentation.
New
- Add ESM support to
npm
- Access both default exports and named exports
- Transparently fall back to CommonJS exports
- Still no need to
await
module loading
- Add
--no-msg
Tasklemon argument for muting info messages (loading indicators, deprecation warnings)
Improvements
- Package preparation process now outputs some errors to
preparePackageCacheBundle.errors.log
, in the Tasklemon installation folder
Breaking changes
Simply updating Tasklemon through npm does not change the behavior of your scripts. When running a script, its runtime header determines the behavior of the Tasklemon runtime, to ensure consistency across Tasklemon versions.
- When a package uses both ESM and CommonJS, Tasklemon now favors ESM exports. This can affect the behavior of existing scripts, if a package behaves differently depending on how you import its functionality.
0.4.2
0.4.1
0.4.0: The Shipshape Update
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 [email protected]
- #require [email protected]
+ #!/usr/bin/env tasklemon-v0.2
+ // tl:require: [email protected], [email protected]
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
- Add
required()
anddefaultsTo()
- For making a script argument mandatory, or setting a fallback value
- Add
File()
,Folder()
andItem()
globals, for absolute paths
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
- Named arguments can be specified with a
cli.tell()
now formats its output just likeconsole.log()
does
Fixes
Item.moveTo()
can move items across volumes- runtime error messages are output to
stderr
instead ofstdout
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
0.3.0
This release marks the very first time that code was contributed to Tasklemon. Exciting! Many thanks to divido for his quality additions :)
Improvements
- Scoped npm packages are now supported (thank you divido!)
- Use the complete package name, e.g.
npm['@octokit/core']
- Nested exports are now available using a colon separator, e.g.
npm['uuid:v4']
- Use the complete package name, e.g.
Fixes
- Support newer versions of Node when preparing cache bundles
- Package preparation no longer fails on very fast connections
Dev environment updates
- Many checks are now warnings instead of errors
- Tests: Test npm support (thank you divido!)
0.2.3
New
- Add
File.getContentAsJSON()
- Windows: Add support for drive identifiers in paths
Improvements
- Don't accept absolute paths when getting an item from a non-root
Folder
- Make npm support more reliable still
Documentation updates
- Many small improvements to the readme and the API docs
- Add debugging instructions to the readme
- Add absolute path example to the readme
- Mention using
instanceof
to identifyItem
type in docs
Dev environment updates
- Add ESLint
- Add .editorconfig
- Add a header comment to all source files
- Reorganize injected module files
- Tests: Test module injection and error surfacing
- Tests: Many fixes and improvements for Linux and Windows