Releases: stylemistake/juke-build
v0.9.0
This release is planned to be reverted, because changes to
Juke.exec
have made build scripts randomly stall on Windows. Additionally, stdio passthrough also makes impossible to prefix the output with the target name (which is something we want to add).
Changed
Juke.exec
now spawns processes with inherited stdio by default.- This means that stdout/stderr will not be available in the return value by default, but can be changed via
captureOutput: true
. - This API might be changed in the future.
- This means that stdout/stderr will not be available in the return value by default, but can be changed via
v0.8.1
v0.8.0
Added
new Juke.Target()
andnew Juke.Parameter()
constructors, which work the same way asJuke.createTarget()
andJuke.createParameter()
respectively. Constructors are more direct than creator functions, so using them is preferred.Juke.chdir()
was added as an easy way to change directories relative toimport.meta.url
.Juke.glob()
is now generally available for unix-style pathname pattern expansion.Juke.rm()
was added as a common file removal tool. It has a subset of Node 16 API but is compatible with Node 12, and has an built-in support for globs.Juke.setup()
accepts asingleTarget
mode setting, which reconfigures CLI to only accept one target and treat all the remaining arguments (not only flags) as this target's arguments.
Changed
- Compiled bundle was changed back to
index.js
fromindex.cjs
, because the latter was not compatible with the default Node.js resolver and TypeScript could not import type definitions properly.
v0.7.0
Added
- Added args to execution context, which basically passes through all the flags following the target.
Changed
- Juke.setup now returns a promise with exit code, same as before
v0.6.3
Fixed
- Replaced
??
syntax with a more compatible one for Node 12.
v0.6.2
BREAKING CHANGES
Juke Build now supports ES modules as build scripts, but this also means that the whole thing was redesigned to support named exports. When target/parameter is exported, you may omit the name
property completely, and it will be automatically picked up from the name of the exported variable.
Targets are no longer automatically registered, and you must export them via export
keyword in ES modules, or module.exports
in CommonJS.
You must now call Juke.setup()
to point the executor to the build script that you want to parse/run.
// ES modules variant
Juke.setup({ file: import.meta.url });
// CommonJS variant
Juke.setup({ file: __filename });
Other setup options were removed. Default target is specified by export default
syntax.
v0.5.1
v0.5.0 was skipped because it was built on an out-of-date base.
Added
Juke.exec
now returns useful data on completion, likecode
,stdout
,stderr
andcombined
(which isstdout
+stderr
).Juke.exec
accepts two new options as the last argument:silent
- Iftrue
, disables piping of its output tostdout
andstderr
.throw
- Iffalse
, it won't throw an exception on a non-zero exit code. Useful if you want to analyze the exit code via it'scode
variable it returns.
Juke.ExitCode
constructor is exposed in case if you want to throw a custom exit code in theexecutes
function and fail the target.- It is thrown like this:
throw new Juke.ExitCode(1)
- It is thrown like this:
Changed
With the help of dts-bundle-generator, Juke build is now only two files:
dist/index.js
dist/index.d.ts
v0.4.0
Added
dependsOn
,inputs
,outputs
, andonlyWhen
fields now all accept a function with an execution context (a function of format({ get }) => ...
), and all of them can be async. This means that you can easily parametrize every part of the build via CLI parameters.- Async
dependsOn
will block initialization of the task runner due to the way dependency resolution is currently implemented. Prefer sync functions over async, otherwise use carefully.
Removed
- Removed the ability to pass arrays of functions to
executes
andonlyWhen
, because nobody will realistically use it, and it increases Juke's code complexity.