Skip to content

Mach v1.1.0

Compare
Choose a tag to compare
@MikeRomaa MikeRomaa released this 23 Jan 04:48
· 7 commits to main since this release

Changelog

Full Changelog: v1.0.3...v1.1.0

General

  • image
    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 and machWatch functions previously had logging calls and calls to process.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 that entryPoints, outfile, format, metafile, and bundle may not be overridden.


  • Removed plugins fields from both instrument and configuration object root. To provide plugins for all instrument, please set esbuild.plugins instead. The ability to provide plugins per-instrument has been removed as it was not actively used and added unnecessary complexity to the new esbuild field.

Environment Variables

  • image
    Environment variables declared with process.env.NAME but not defined in the current environment will now emit a warning and be replaced with null rather than be left as-is. This should prevent any runtime crashes due to references to process 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 to process.env.__MACH_IS_MODULE to avoid colliding with potential external variables.

Simulator Package


  • React instrument bundles are no longer inserted directly into their BaseInstrument harnesses, but rather included with the simulator-provided Include.addScript function in order to enable the Coherent debugger to correctly load source map definitions. The React bundle will now reside in the file named instrument.js and the harness in instrument.index.js (just as before, if fileName is configured, then that name is used instead of instrument).


  • Auto-generated BaseInstrument harness classes for React instruments are now named _MachInstrument_{{ templateId }} instead of InstrumentLogic.