Releases: rsms/estrella
v1.4.1
Improvements:
- adds support for source on stdin (both in script mode and CLI mode; see
test/stdin
) #26 - improves watch incremental build performance (by utilizing esbuild's incremental option)
- upgrades esbuild dependency to 0.11.x which brings many improvements and expands
BuildConfig.entry
and.entryPoints
to accept a record mapping output files to input files. #36 - removes the noisy postinstall message #34
Changes in behavior:
- when
run
ning a program after building it, any user-providedonEnd
callback is now invoked & awaited before starting the sub process. In Estrella <=1.4.0 onEnd was called concurrently with starting the subprocess. #38
Bug fixes:
config.entry
would in some cases not be set in the config object passed toonStart
andonEnd
callbacks.
Install this version:
npm i -D [email protected]
v1.4.0
- Improved file rename and move tracking; Estrella now tracks and handles rename of
entryPoint
files during-watch
mode (only verified on macOS). #29 - Breaking API change to the
watch
function (see details below) - Makes detection of CLI mode more robust. #31
- Fixes a bug specific to Microsoft Windows where in some cases the default "projectID" would interfere with file system rules. #15
- An internal change to how
define
entries inBuildConfig
are handled might cause some build scripts to behave differently. See below for details. #23 - Improved source maps. You can now embed the source code into the source map by setting
sourcesContent:true
in your build config. #28 - Fixes a minor bug where a
BuildProcess
promise would resolve toundefined
, when in watch mode and the user callscancel()
on the promise. This would effectively look like the build failed while in practice cancelling the build should not signal failure. - Fixes an issue where custom watchers (from the
watch
function) would react to self-originating file modifications.
Breaking API change to WatchCallback
WatchCallback
used with the watch
function now receives a list of objects describing file changes in more detail. In Estrella <=1.3x this function received a list of strings.
If you use watch
here's an example of how to quickly update your code to work with Estrella >=1.4:
Before: (for Estrella <=1.3x)
watch(".", watchOptions, filenames => {
doSomethingWithFilenames(filenames)
})
After: (for Estrella >=1.4.0)
watch(".", watchOptions, changes => {
doSomethingWithFilenames(changes.map(c => c.name))
})
Note: This does not affect the onStart
callback which continues to receive a plain list of filenames.
Change in behavior of BuildConfig.define
An internal change to how define
entries in BuildConfig
are handled might cause some build scripts to behave differently.
Prior to Estrella 1.4.0, values assigned to define
would be implicitly JSON encoded. For example, {define:{foo:"window"}}
would be equivalent to const foo = "window"
in the compiled output. With Estrella 1.4.0 the same define
config is equivalent to const foo = window
(notice that window
is a name here, not a string.)
Here's how you can fix up a build script making use of define
:
Before: (for Estrella <=1.3x)
const version = "1.2.3"
build({
define: { VERSION: version }
})
After: (for Estrella >=1.4.0)
const version = "1.2.3"
build({
define: { VERSION: JSON.stringify(version) }
})
The rationale here is that sometimes you want to define a name with a variable value from the environment. For example, you could do this now to load a JSON file at runtime: define:{ somedata: "require('somedata.json')" }
(which in prior versions of Estrella would end up just naming the string "require('somedata.json')"
.)
v1.3.3
v1.3.1
v1.3.0
npm install -D [email protected]
- Fixes a bug where Estrella would crash after esbuild failed to build, while in watch mode. #22
- Adds the ability to output to stdout when using the API:
build({ outfile:"-" })
#17 - Adds the ability to output straight to the API's
onEnd
function instead of writing to file. Simply omitoutfile
andoutdir
from your call tobuild({ ... })
; results are provided via theonEnd
's second argument (results
). #17 #18 - Adds a
-silent
option which completely silences output logging - Relaxes esbuild compatibility — you can now specialize the exact esbuild version you want by adding an entry to your own project's
"dependencies"
(or similar) entry ofpackage.json
. #19 - Improvements to watching files and running output on Windows #12