node-serialport-bindings-cpp/package.json
renovate[bot] a37f9f1409
chore(deps): update dependency esbuild to v0.27.1 (#221)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [esbuild](https://redirect.github.com/evanw/esbuild) | [`0.25.5` ->
`0.27.1`](https://renovatebot.com/diffs/npm/esbuild/0.25.5/0.27.1) |
![age](https://developer.mend.io/api/mc/badges/age/npm/esbuild/0.27.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/esbuild/0.25.5/0.27.1?slim=true)
|

---

### Release Notes

<details>
<summary>evanw/esbuild (esbuild)</summary>

###
[`v0.27.1`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0271)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.0...v0.27.1)

- Fix bundler bug with `var` nested inside `if`
([#&#8203;4348](https://redirect.github.com/evanw/esbuild/issues/4348))

This release fixes a bug with the bundler that happens when importing an
ES module using `require` (which causes it to be wrapped) and there's a
top-level `var` inside an `if` statement without being wrapped in a `{
... }` block (and a few other conditions). The bundling transform needed
to hoist these `var` declarations outside of the lazy ES module wrapper
for correctness. See the issue for details.

- Fix minifier bug with `for` inside `try` inside label
([#&#8203;4351](https://redirect.github.com/evanw/esbuild/issues/4351))

This fixes an old regression from [version
v0.21.4](https://redirect.github.com/evanw/esbuild/releases/v0.21.4).
Some code was introduced to move the label inside the `try` statement to
address a problem with transforming labeled `for await` loops to avoid
the `await` (the transformation involves converting the `for await` loop
into a `for` loop and wrapping it in a `try` statement). However, it
introduces problems for cross-compiled JVM code that uses all three of
these features heavily. This release restricts this transform to only
apply to `for` loops that esbuild itself generates internally as part of
the `for await` transform. Here is an example of some affected code:

  ```js
  // Original code
  d: {
    e: {
      try {
        while (1) { break d }
      } catch { break e; }
    }
  }

  // Old output (with --minify)
  a:try{e:for(;;)break a}catch{break e}

  // New output (with --minify)
  a:e:try{for(;;)break a}catch{break e}
  ```

- Inline IIFEs containing a single expression
([#&#8203;4354](https://redirect.github.com/evanw/esbuild/issues/4354))

Previously inlining of IIFEs (immediately-invoked function expressions)
only worked if the body contained a single `return` statement. Now it
should also work if the body contains a single expression statement
instead:

  ```js
  // Original code
  const foo = () => {
    const cb = () => {
      console.log(x())
    }
    return cb()
  }

  // Old output (with --minify)
  const foo=()=>(()=>{console.log(x())})();

  // New output (with --minify)
  const foo=()=>{console.log(x())};
  ```

- The minifier now strips empty `finally` clauses
([#&#8203;4353](https://redirect.github.com/evanw/esbuild/issues/4353))

This improvement means that `finally` clauses containing dead code can
potentially cause the associated `try` statement to be removed from the
output entirely in minified builds:

  ```js
  // Original code
  function foo(callback) {
    if (DEBUG) stack.push(callback.name);
    try {
      callback();
    } finally {
      if (DEBUG) stack.pop();
    }
  }

  // Old output (with --minify --define:DEBUG=false)
  function foo(a){try{a()}finally{}}

  // New output (with --minify --define:DEBUG=false)
  function foo(a){a()}
  ```

- Allow tree-shaking of the `Symbol` constructor

With this release, calling `Symbol` is now considered to be side-effect
free when the argument is known to be a primitive value. This means
esbuild can now tree-shake module-level symbol variables:

  ```js
  // Original code
  const a = Symbol('foo')
  const b = Symbol(bar)

  // Old output (with --tree-shaking=true)
  const a = Symbol("foo");
  const b = Symbol(bar);

  // New output (with --tree-shaking=true)
  const b = Symbol(bar);
  ```

###
[`v0.27.0`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0270)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.26.0...v0.27.0)

**This release deliberately contains backwards-incompatible changes.**
To avoid automatically picking up releases like this, you should either
be pinning the exact version of `esbuild` in your `package.json` file
(recommended) or be using a version range syntax that only accepts patch
upgrades such as `^0.26.0` or `~0.26.0`. See npm's documentation about
[semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more
information.

- Use `Uint8Array.fromBase64` if available
([#&#8203;4286](https://redirect.github.com/evanw/esbuild/issues/4286))

With this release, esbuild's `binary` loader will now use the new
[`Uint8Array.fromBase64`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64)
function unless it's unavailable in the configured target environment.
If it's unavailable, esbuild's previous code for this will be used as a
fallback. Note that this means you may now need to specify `target` when
using this feature with Node (for example `--target=node22`) unless
you're using Node v25+.

- Update the Go compiler from v1.23.12 to v1.25.4
([#&#8203;4208](https://redirect.github.com/evanw/esbuild/issues/4208),
[#&#8203;4311](https://redirect.github.com/evanw/esbuild/pull/4311))

  This raises the operating system requirements for running esbuild:

  - Linux: now requires a kernel version of 3.2 or later
  - macOS: now requires macOS 12 (Monterey) or later

###
[`v0.26.0`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0260)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.12...v0.26.0)

- Enable trusted publishing
([#&#8203;4281](https://redirect.github.com/evanw/esbuild/issues/4281))

GitHub and npm are recommending that maintainers for packages such as
esbuild switch to [trusted
publishing](https://docs.npmjs.com/trusted-publishers). With this
release, a VM on GitHub will now build and publish all of esbuild's
packages to npm instead of me. In theory.

Unfortunately there isn't really a way to test that this works other
than to do it live. So this release is that live test. Hopefully this
release is uneventful and is exactly the same as the previous one (well,
except for the green provenance attestation checkmark on npm that
happens with trusted publishing).

###
[`v0.25.12`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#02512)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.11...v0.25.12)

- Fix a minification regression with CSS media queries
([#&#8203;4315](https://redirect.github.com/evanw/esbuild/issues/4315))

The previous release introduced support for parsing media queries which
unintentionally introduced a regression with the removal of duplicate
media rules during minification. Specifically the grammar for `@media
<media-type> and <media-condition-without-or> { ... }` was missing an
equality check for the `<media-condition-without-or>` part, so rules
with different suffix clauses in this position would incorrectly compare
equal and be deduplicated. This release fixes the regression.

- Update the list of known JavaScript globals
([#&#8203;4310](https://redirect.github.com/evanw/esbuild/issues/4310))

This release updates esbuild's internal list of known JavaScript
globals. These are globals that are known to not have side-effects when
the property is accessed. For example, accessing the global `Array`
property is considered to be side-effect free but accessing the global
`scrollY` property can trigger a layout, which is a side-effect. This is
used by esbuild's tree-shaking to safely remove unused code that is
known to be side-effect free. This update adds the following global
properties:

  From [ES2017](https://tc39.es/ecma262/2017/):

  - `Atomics`
  - `SharedArrayBuffer`

  From [ES2020](https://tc39.es/ecma262/2020/):

  - `BigInt64Array`
  - `BigUint64Array`

  From [ES2021](https://tc39.es/ecma262/2021/):

  - `FinalizationRegistry`
  - `WeakRef`

  From [ES2025](https://tc39.es/ecma262/2025/):

  - `Float16Array`
  - `Iterator`

Note that this does not indicate that constructing any of these objects
is side-effect free, just that accessing the identifier is side-effect
free. For example, this now allows esbuild to tree-shake classes that
extend from `Iterator`:

  ```js
  // This can now be tree-shaken by esbuild:
  class ExampleIterator extends Iterator {}
  ```

- Add support for the new `@view-transition` CSS rule
([#&#8203;4313](https://redirect.github.com/evanw/esbuild/pull/4313))

With this release, esbuild now has improved support for pretty-printing
and minifying the new `@view-transition` rule (which esbuild was
previously unaware of):

  ```css
  /* Original code */
  @&#8203;view-transition {
    navigation: auto;
    types: check;
  }

  /* Old output */
  @&#8203;view-transition { navigation: auto; types: check; }

  /* New output */
  @&#8203;view-transition {
    navigation: auto;
    types: check;
  }
  ```

The new view transition feature provides a mechanism for creating
animated transitions between documents in a multi-page app. You can read
more about view transition rules
[here](https://developer.mozilla.org/en-US/docs/Web/CSS/@&#8203;view-transition).

This change was contributed by
[@&#8203;yisibl](https://redirect.github.com/yisibl).

- Trim CSS rules that will never match

The CSS minifier will now remove rules whose selectors contain `:is()`
and `:where()` as those selectors will never match. These selectors can
currently be automatically generated by esbuild when you give esbuild
nonsensical input such as the following:

  ```css
  /* Original code */
  div:before {
    color: green;
    &.foo {
      color: red;
    }
  }

  /* Old output (with --supported:nesting=false --minify) */
  div:before{color:green}:is().foo{color:red}

  /* New output (with --supported:nesting=false --minify) */
  div:before{color:green}
  ```

This input is nonsensical because CSS nesting is (unfortunately) not
supported inside of pseudo-elements such as `:before`. Currently esbuild
generates a rule containing `:is()` in this case when you tell esbuild
to transform nested CSS into non-nested CSS. I think it's reasonable to
do that as it sort of helps explain what's going on (or at least
indicates that something is wrong in the output). It shouldn't be
present in minified code, however, so this release now strips it out.

###
[`v0.25.11`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#02511)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.10...v0.25.11)

- Add support for `with { type: 'bytes' }` imports
([#&#8203;4292](https://redirect.github.com/evanw/esbuild/issues/4292))

The [import
bytes](https://redirect.github.com/tc39/proposal-import-bytes) proposal
has reached stage 2.7 in the TC39 process, which means that although it
isn't quite recommended for implementation, it's generally approved and
ready for validation. Furthermore it has already been implemented by
[Deno](https://docs.deno.com/examples/importing_bytes/) and
[Webpack](https://redirect.github.com/webpack/webpack/pull/19928). So
with this release, esbuild will also add support for this. It behaves
exactly the same as esbuild's existing [`binary`
loader](https://esbuild.github.io/content-types/#binary). Here's an
example:

  ```js
  import data from './image.png' with { type: 'bytes' }
  const view = new DataView(data.buffer, 0, 24)
  const width = view.getInt32(16)
  const height = view.getInt32(20)
  console.log('size:', width + '\xD7' + height)
  ```

- Lower CSS media query range syntax
([#&#8203;3748](https://redirect.github.com/evanw/esbuild/issues/3748),
[#&#8203;4293](https://redirect.github.com/evanw/esbuild/issues/4293))

With this release, esbuild will now transform CSS media query range
syntax into equivalent syntax using `min-`/`max-` prefixes for older
browsers. For example, the following CSS:

  ```css
  @&#8203;media (640px <= width <= 960px) {
    main {
      display: flex;
    }
  }
  ```

will be transformed like this with a target such as `--target=chrome100`
(or more specifically with `--supported:media-range=false` if desired):

  ```css
  @&#8203;media (min-width: 640px) and (max-width: 960px) {
    main {
      display: flex;
    }
  }
  ```

###
[`v0.25.10`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#02510)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.9...v0.25.10)

- Fix a panic in a minification edge case
([#&#8203;4287](https://redirect.github.com/evanw/esbuild/issues/4287))

This release fixes a panic due to a null pointer that could happen when
esbuild inlines a doubly-nested identity function and the final result
is empty. It was fixed by emitting the value `undefined` in this case,
which avoids the panic. This case must be rare since it hasn't come up
until now. Here is an example of code that previously triggered the
panic (which only happened when minifying):

  ```js
  function identity(x) { return x }
  identity({ y: identity(123) })
  ```

- Fix `@supports` nested inside pseudo-element
([#&#8203;4265](https://redirect.github.com/evanw/esbuild/issues/4265))

When transforming nested CSS to non-nested CSS, esbuild is supposed to
filter out pseudo-elements such as `::placeholder` for correctness. The
[CSS nesting specification](https://www.w3.org/TR/css-nesting-1/) says
the following:

> The nesting selector cannot represent pseudo-elements (identical to
the behavior of the ':is()' pseudo-class). We’d like to relax this
restriction, but need to do so simultaneously for both ':is()' and '&',
since they’re intentionally built on the same underlying mechanisms.

However, it seems like this behavior is different for nested at-rules
such as `@supports`, which do work with pseudo-elements. So this release
modifies esbuild's behavior to now take that into account:

  ```css
  /* Original code */
  ::placeholder {
    color: red;
    body & { color: green }
    @&#8203;supports (color: blue) { color: blue }
  }

  /* Old output (with --supported:nesting=false) */
  ::placeholder {
    color: red;
  }
  body :is() {
    color: green;
  }
  @&#8203;supports (color: blue) {
     {
      color: blue;
    }
  }

  /* New output (with --supported:nesting=false) */
  ::placeholder {
    color: red;
  }
  body :is() {
    color: green;
  }
  @&#8203;supports (color: blue) {
    ::placeholder {
      color: blue;
    }
  }
  ```

###
[`v0.25.9`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0259)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.8...v0.25.9)

- Better support building projects that use Yarn on Windows
([#&#8203;3131](https://redirect.github.com/evanw/esbuild/issues/3131),
[#&#8203;3663](https://redirect.github.com/evanw/esbuild/issues/3663))

With this release, you can now use esbuild to bundle projects that use
Yarn Plug'n'Play on Windows on drives other than the `C:` drive. The
problem was as follows:

1. Yarn in Plug'n'Play mode on Windows stores its global module cache on
the `C:` drive
  2. Some developers put their projects on the `D:` drive
3. Yarn generates relative paths that use `../..` to get from the
project directory to the cache directory
4. Windows-style paths don't support directory traversal between drives
via `..` (so `D:\..` is just `D:`)
5. I didn't have access to a Windows machine for testing this edge case

Yarn works around this edge case by pretending Windows-style paths
beginning with `C:\` are actually Unix-style paths beginning with
`/C:/`, so the `../..` path segments are able to navigate across drives
inside Yarn's implementation. This was broken for a long time in esbuild
but I finally got access to a Windows machine and was able to debug and
fix this edge case. So you should now be able to bundle these projects
with esbuild.

- Preserve parentheses around function expressions
([#&#8203;4252](https://redirect.github.com/evanw/esbuild/issues/4252))

The V8 JavaScript VM uses parentheses around function expressions as an
optimization hint to immediately compile the function. Otherwise the
function would be lazily-compiled, which has additional overhead if that
function is always called immediately as lazy compilation involves
parsing the function twice. You can read [V8's blog post about
this](https://v8.dev/blog/preparser) for more details.

Previously esbuild did not represent parentheses around functions in the
AST so they were lost during compilation. With this change, esbuild will
now preserve parentheses around function expressions when they are
present in the original source code. This means these optimization hints
will not be lost when bundling with esbuild. In addition, esbuild will
now automatically add this optimization hint to immediately-invoked
function expressions. Here's an example:

  ```js
  // Original code
  const fn0 = () => 0
  const fn1 = (() => 1)
  console.log(fn0, function() { return fn1() }())

  // Old output
  const fn0 = () => 0;
  const fn1 = () => 1;
  console.log(fn0, function() {
    return fn1();
  }());

  // New output
  const fn0 = () => 0;
  const fn1 = (() => 1);
  console.log(fn0, (function() {
    return fn1();
  })());
  ```

Note that you do not want to wrap all function expressions in
parentheses. This optimization hint should only be used for functions
that are called on initial load. Using this hint for functions that are
not called on initial load will unnecessarily delay the initial load.
Again, see V8's blog post linked above for details.

- Update Go from 1.23.10 to 1.23.12
([#&#8203;4257](https://redirect.github.com/evanw/esbuild/issues/4257),
[#&#8203;4258](https://redirect.github.com/evanw/esbuild/pull/4258))

This should have no effect on existing code as this version change does
not change Go's operating system support. It may remove certain false
positive reports (specifically CVE-2025-4674 and CVE-2025-47907) from
vulnerability scanners that only detect which version of the Go compiler
esbuild uses.

###
[`v0.25.8`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0258)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.7...v0.25.8)

- Fix another TypeScript parsing edge case
([#&#8203;4248](https://redirect.github.com/evanw/esbuild/issues/4248))

This fixes a regression with a change in the previous release that tries
to more accurately parse TypeScript arrow functions inside the `?:`
operator. The regression specifically involves parsing an arrow function
containing a `#private` identifier inside the middle of a `?:` ternary
operator inside a class body. This was fixed by propagating private
identifier state into the parser clone used to speculatively parse the
arrow function body. Here is an example of some affected code:

  ```ts
  class CachedDict {
    #has = (a: string) => dict.has(a);
    has = window
      ? (word: string): boolean => this.#has(word)
      : this.#has;
  }
  ```

- Fix a regression with the parsing of source phase imports

The change in the previous release to parse [source phase
imports](https://redirect.github.com/tc39/proposal-source-phase-imports)
failed to properly handle the following cases:

  ```ts
  import source from 'bar'
  import source from from 'bar'
  import source type foo from 'bar'
  ```

Parsing for these cases should now be fixed. The first case was
incorrectly treated as a syntax error because esbuild was expecting the
second case. And the last case was previously allowed but is now
forbidden. TypeScript hasn't added this feature yet so it remains to be
seen whether the last case will be allowed, but it's safer to disallow
it for now. At least Babel doesn't allow the last case when parsing
TypeScript, and Babel was involved with the source phase import
specification.

###
[`v0.25.7`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0257)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.6...v0.25.7)

- Parse and print JavaScript imports with an explicit phase
([#&#8203;4238](https://redirect.github.com/evanw/esbuild/issues/4238))

This release adds basic syntax support for the `defer` and `source`
import phases in JavaScript:

  - `defer`

This is a [stage 3
proposal](https://redirect.github.com/tc39/proposal-defer-import-eval)
for an upcoming JavaScript feature that will provide one way to eagerly
load but lazily initialize imported modules. The imported module is
automatically initialized on first use. Support for this syntax will
also be part of the upcoming release of [TypeScript
5.9](https://devblogs.microsoft.com/typescript/announcing-typescript-5-9-beta/#support-for-import-defer).
The syntax looks like this:

    ```js
    import defer * as foo from "<specifier>";
    const bar = await import.defer("<specifier>");
    ```

Note that this feature deliberately cannot be used with the syntax
`import defer foo from "<specifier>"` or `import defer { foo } from
"<specifier>"`.

  - `source`

This is a [stage 3
proposal](https://redirect.github.com/tc39/proposal-source-phase-imports)
for an upcoming JavaScript feature that will provide another way to
eagerly load but lazily initialize imported modules. The imported module
is returned in an uninitialized state. Support for this syntax may or
may not be a part of TypeScript 5.9 (see [this
issue](https://redirect.github.com/microsoft/TypeScript/issues/61216)
for details). The syntax looks like this:

    ```js
    import source foo from "<specifier>";
    const bar = await import.source("<specifier>");
    ```

Note that this feature deliberately cannot be used with the syntax
`import defer * as foo from "<specifier>"` or `import defer { foo } from
"<specifier>"`.

This change only adds support for this syntax. These imports cannot
currently be bundled by esbuild. To use these new features with
esbuild's bundler, the imported paths must be external to the bundle and
the output format must be set to `esm`.

- Support optionally emitting absolute paths instead of relative paths
([#&#8203;338](https://redirect.github.com/evanw/esbuild/issues/338),
[#&#8203;2082](https://redirect.github.com/evanw/esbuild/issues/2082),
[#&#8203;3023](https://redirect.github.com/evanw/esbuild/issues/3023))

This release introduces the `--abs-paths=` feature which takes a
comma-separated list of situations where esbuild should use absolute
paths instead of relative paths. There are currently three supported
situations: `code` (comments and string literals), `log` (log message
text and location info), and `metafile` (the JSON build metadata).

Using absolute paths instead of relative paths is not the default
behavior because it means that the build results are no longer
machine-independent (which means builds are no longer reproducible).
Absolute paths can be useful when used with certain terminal emulators
that allow you to click on absolute paths in the terminal text and/or
when esbuild is being automatically invoked from several different
directories within the same script.

- Fix a TypeScript parsing edge case
([#&#8203;4241](https://redirect.github.com/evanw/esbuild/issues/4241))

This release fixes an edge case with parsing an arrow function in
TypeScript with a return type that's in the middle of a `?:` ternary
operator. For example:

  ```ts
  x = a ? (b) : c => d;
  y = a ? (b) : c => d : e;
  ```

The `:` token in the value assigned to `x` pairs with the `?` token, so
it's not the start of a return type annotation. However, the first `:`
token in the value assigned to `y` is the start of a return type
annotation because after parsing the arrow function body, it turns out
there's another `:` token that can be used to pair with the `?` token.
This case is notable as it's the first TypeScript edge case that esbuild
has needed a backtracking parser to parse. It has been addressed by a
quick hack (cloning the whole parser) as it's a rare edge case and
esbuild doesn't otherwise need a backtracking parser. Hopefully this is
sufficient and doesn't cause any issues.

- Inline small constant strings when minifying

Previously esbuild's minifier didn't inline string constants because
strings can be arbitrarily long, and this isn't necessarily a size win
if the string is used more than once. Starting with this release,
esbuild will now inline string constants when the length of the string
is three code units or less. For example:

  ```js
  // Original code
  const foo = 'foo'
  console.log({ [foo]: true })

  // Old output (with --minify --bundle --format=esm)
  var o="foo";console.log({[o]:!0});

  // New output (with --minify --bundle --format=esm)
  console.log({foo:!0});
  ```

Note that esbuild's constant inlining only happens in very restrictive
scenarios to avoid issues with TDZ handling. This change doesn't change
when esbuild's constant inlining happens. It only expands the scope of
it to include certain string literals in addition to numeric and boolean
literals.

###
[`v0.25.6`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0256)

[Compare
Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.5...v0.25.6)

- Fix a memory leak when `cancel()` is used on a build context
([#&#8203;4231](https://redirect.github.com/evanw/esbuild/issues/4231))

Calling `rebuild()` followed by `cancel()` in rapid succession could
previously leak memory. The bundler uses a producer/consumer model
internally, and the resource leak was caused by the consumer being
termianted while there were still remaining unreceived results from a
producer. To avoid the leak, the consumer now waits for all producers to
finish before terminating.

- Support empty `:is()` and `:where()` syntax in CSS
([#&#8203;4232](https://redirect.github.com/evanw/esbuild/issues/4232))

Previously using these selectors with esbuild would generate a warning.
That warning has been removed in this release for these cases.

- Improve tree-shaking of `try` statements in dead code
([#&#8203;4224](https://redirect.github.com/evanw/esbuild/issues/4224))

With this release, esbuild will now remove certain `try` statements if
esbuild considers them to be within dead code (i.e. code that is known
to not ever be evaluated). For example:

  ```js
  // Original code
  return 'foo'
  try { return 'bar' } catch {}

  // Old output (with --minify)
  return"foo";try{return"bar"}catch{}

  // New output (with --minify)
  return"foo";
  ```

- Consider negated bigints to have no side effects

While esbuild currently considers `1`, `-1`, and `1n` to all have no
side effects, it didn't previously consider `-1n` to have no side
effects. This is because esbuild does constant folding with numbers but
not bigints. However, it meant that unused negative bigint constants
were not tree-shaken. With this release, esbuild will now consider these
expressions to also be side-effect free:

  ```js
  // Original code
  let a = 1, b = -1, c = 1n, d = -1n

  // Old output (with --bundle --minify)
  (()=>{var n=-1n;})();

  // New output (with --bundle --minify)
  (()=>{})();
  ```

- Support a configurable delay in watch mode before rebuilding
([#&#8203;3476](https://redirect.github.com/evanw/esbuild/issues/3476),
[#&#8203;4178](https://redirect.github.com/evanw/esbuild/issues/4178))

The `watch()` API now takes a `delay` option that lets you add a delay
(in milliseconds) before rebuilding when a change is detected in watch
mode. If you use a tool that regenerates multiple source files very
slowly, this should make it more likely that esbuild's watch mode won't
generate a broken intermediate build before the successful final build.
This option is also available via the CLI using the `--watch-delay=`
flag.

This should also help avoid confusion about the `watch()` API's options
argument. It was previously empty to allow for future API expansion,
which caused some people to think that the documentation was missing.
It's no longer empty now that the `watch()` API has an option.

- Allow mixed array for `entryPoints` API option
([#&#8203;4223](https://redirect.github.com/evanw/esbuild/issues/4223))

The TypeScript type definitions now allow you to pass a mixed array of
both string literals and object literals to the `entryPoints` API
option, such as `['foo.js', { out: 'lib', in: 'bar.js' }]`. This was
always possible to do in JavaScript but the TypeScript type definitions
were previously too restrictive.

- Update Go from 1.23.8 to 1.23.10
([#&#8203;4204](https://redirect.github.com/evanw/esbuild/issues/4204),
[#&#8203;4207](https://redirect.github.com/evanw/esbuild/pull/4207))

This should have no effect on existing code as this version change does
not change Go's operating system support. It may remove certain false
positive reports (specifically CVE-2025-4673 and CVE-2025-22874) from
vulnerability scanners that only detect which version of the Go compiler
esbuild uses.

- Experimental support for esbuild on OpenHarmony
([#&#8203;4212](https://redirect.github.com/evanw/esbuild/pull/4212))

With this release, esbuild now publishes the
[`@esbuild/openharmony-arm64`](https://www.npmjs.com/package/@&#8203;esbuild/openharmony-arm64)
npm package for
[OpenHarmony](https://en.wikipedia.org/wiki/OpenHarmony). It contains a
WebAssembly binary instead of a native binary because Go doesn't
currently support OpenHarmony. Node does support it, however, so in
theory esbuild should now work on OpenHarmony through WebAssembly.

This change was contributed by
[@&#8203;hqzing](https://redirect.github.com/hqzing).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/serialport/bindings-cpp).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDIuMzIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-04 03:47:29 +00:00

113 lines
2.8 KiB
JSON

{
"name": "@serialport/bindings-cpp",
"description": "SerialPort Hardware bindings for node serialport written in c++",
"version": "0.0.0-development",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"keywords": [
"serialport-binding",
"COM",
"com port",
"hardware",
"iot",
"modem",
"serial port",
"serial",
"serialport",
"tty",
"UART"
],
"dependencies": {
"@serialport/bindings-interface": "1.2.2",
"@serialport/parser-readline": "13.0.0",
"debug": "4.4.0",
"node-addon-api": "8.3.0",
"node-gyp-build": "4.8.4"
},
"devDependencies": {
"@semantic-release/exec": "6.0.3",
"@serialport/binding-mock": "10.2.2",
"@types/chai": "5.0.1",
"@types/chai-subset": "1.3.6",
"@types/debug": "4.1.12",
"@types/mocha": "10.0.10",
"@types/node": "22.13.8",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"cc": "3.0.1",
"chai": "5.2.0",
"chai-subset": "1.6.0",
"esbuild": "0.27.1",
"esbuild-register": "3.6.0",
"eslint": "8.57.1",
"mocha": "11.7.0",
"node-abi": "3.71.0",
"node-gyp": "11.0.0",
"nyc": "17.1.0",
"prebuildify": "6.0.1",
"prebuildify-cross": "5.1.1",
"semantic-release": "24.2.0",
"shx": "0.3.4",
"sinon": "21.0.0",
"typescript": "5.7.2"
},
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"build": "rm -rf dist && tsc -p tsconfig-build.json",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --target 20.0.0 --force --strip --verbose",
"prebuildify-cross": "prebuildify-cross --napi --target 20.0.0 --force --strip --verbose",
"rebuild": "node-gyp rebuild",
"format": "eslint lib test bin --fix",
"lint": "eslint lib test bin && cc --verbose",
"test": "nyc --reporter lcov --reporter text mocha",
"test:arduino": "TEST_PORT=$(./bin/find-arduino.ts) npm test",
"test:watch": "mocha -w",
"semantic-release": "semantic-release",
"typecheck": "tsc"
},
"publishConfig": {
"access": "public"
},
"license": "MIT",
"gypfile": true,
"cc": {
"filter": [
"legal/copyright",
"build/include"
],
"files": [
"src/*.cpp",
"src/*.h"
],
"linelength": "120"
},
"binary": {
"napi_versions": [
8
]
},
"repository": {
"type": "git",
"url": "https://github.com/serialport/bindings-cpp.git"
},
"funding": "https://opencollective.com/serialport/donate",
"changelog": {
"labels": {
"breaking": ":boom: BREAKING CHANGES :boom:",
"feature-request": "Features",
"bug": "Bug Fixes",
"docs": "Documentation",
"internal": "Chores"
}
},
"mocha": {
"bail": true,
"require": [
"esbuild-register"
],
"spec": "lib/**/*.test.*"
}
}