Mach v1.1.0
Changelog
Full Changelog: v1.0.3...v1.1.0
General
-
Improved logging for invalid configuration files, with information on which fields are missing or malformed. -
Removed
eslint
as a dev dependency, which may have caused issues for some users with their own eslint configurations. Mach is now using Biome for linting and formatting. -
The exported
machBuild
andmachWatch
functions previously had logging calls and calls toprocess.exit
, which rendered them unusable when used directly. This logic has now been moved to the CLI, leaving the two exported functions suitable for use in other projects.
Configuration
-
Allowed passthrough of esbuild configuration options through the
esbuild
field on the configuration object. Please note thatentryPoints
,outfile
,format
,metafile
, andbundle
may not be overridden. -
Removedplugins
fields from both instrument and configuration object root. To provide plugins for all instrument, please setesbuild.plugins
instead. The ability to provide plugins per-instrument has been removed as it was not actively used and added unnecessary complexity to the newesbuild
field.
Environment Variables
-
Environment variables declared withprocess.env.NAME
but not defined in the current environment will now emit a warning and be replaced withnull
rather than be left as-is. This should prevent any runtime crashes due to references toprocess
making their way into the bundle. -
Expanded type coercion in environment variable replacement to leave numbers as values rather than strings. This was already the case for booleans. -
The "built-in"process.env.MODULE
variable has been renamed toprocess.env.__MACH_IS_MODULE
to avoid colliding with potential external variables.
Simulator Package
-
React instrument bundles are no longer inserted directly into theirBaseInstrument
harnesses, but rather included with the simulator-providedInclude.addScript
function in order to enable the Coherent debugger to correctly load source map definitions. The React bundle will now reside in the file namedinstrument.js
and the harness ininstrument.index.js
(just as before, iffileName
is configured, then that name is used instead ofinstrument
). -
Auto-generatedBaseInstrument
harness classes for React instruments are now named_MachInstrument_{{ templateId }}
instead ofInstrumentLogic
.