Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js] Update dependency esbuild to v0.24.2 #14948

Merged
merged 2 commits into from
Dec 28, 2024
Merged

[js] Update dependency esbuild to v0.24.2 #14948

merged 2 commits into from
Dec 28, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 27, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild 0.24.0 -> 0.24.2 age adoption passing confidence

Release Notes

evanw/esbuild (esbuild)

v0.24.2

Compare Source

  • Fix regression with --define and import.meta (#​4010, #​4012, #​4013)

    The previous change in version 0.24.1 to use a more expression-like parser for define values to allow quoted property names introduced a regression that removed the ability to use --define:import.meta=.... Even though import is normally a keyword that can't be used as an identifier, ES modules special-case the import.meta expression to behave like an identifier anyway. This change fixes the regression.

    This fix was contributed by @​sapphi-red.

v0.24.1

Compare Source

  • Allow es2024 as a target in tsconfig.json (#​4004)

    TypeScript recently added es2024 as a compilation target, so esbuild now supports this in the target field of tsconfig.json files, such as in the following configuration file:

    {
      "compilerOptions": {
        "target": "ES2024"
      }
    }

    As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in the documentation.

    This fix was contributed by @​billyjanitsch.

  • Allow automatic semicolon insertion after get/set

    This change fixes a grammar bug in the parser that incorrectly treated the following code as a syntax error:

    class Foo {
      get
      *x() {}
      set
      *y() {}
    }

    The above code will be considered valid starting with this release. This change to esbuild follows a similar change to TypeScript which will allow this syntax starting with TypeScript 5.7.

  • Allow quoted property names in --define and --pure (#​4008)

    The define and pure API options now accept identifier expressions containing quoted property names. Previously all identifiers in the identifier expression had to be bare identifiers. This change now makes --define and --pure consistent with --global-name, which already supported quoted property names. For example, the following is now possible:

    // The following code now transforms to "return true;\n"
    console.log(esbuild.transformSync(
      `return process.env['SOME-TEST-VAR']`,
      { define: { 'process.env["SOME-TEST-VAR"]': 'true' } },
    ))

    Note that if you're passing values like this on the command line using esbuild's --define flag, then you'll need to know how to escape quote characters for your shell. You may find esbuild's JavaScript API more ergonomic and portable than writing shell code.

  • Minify empty try/catch/finally blocks (#​4003)

    With this release, esbuild will now attempt to minify empty try blocks:

    // Original code
    try {} catch { foo() } finally { bar() }
    
    // Old output (with --minify)
    try{}catch{foo()}finally{bar()}
    
    // New output (with --minify)
    bar();

    This can sometimes expose additional minification opportunities.

  • Include entryPoint metadata for the copy loader (#​3985)

    Almost all entry points already include a entryPoint field in the outputs map in esbuild's build metadata. However, this wasn't the case for the copy loader as that loader is a special-case that doesn't behave like other loaders. This release adds the entryPoint field in this case.

  • Source mappings may now contain null entries (#​3310, #​3878)

    With this change, sources that result in an empty source map may now emit a null source mapping (i.e. one with a generated position but without a source index or original position). This change improves source map accuracy by fixing a problem where minified code from a source without any source mappings could potentially still be associated with a mapping from another source file earlier in the generated output on the same minified line. It manifests as nonsensical files in source mapped stack traces. Now the null mapping "resets" the source map so that any lookups into the minified code without any mappings resolves to null (which appears as the output file in stack traces) instead of the incorrect source file.

    This change shouldn't affect anything in most situations. I'm only mentioning it in the release notes in case it introduces a bug with source mapping. It's part of a work-in-progress future feature that will let you omit certain unimportant files from the generated source map to reduce source map size.

  • Avoid using the parent directory name for determinism (#​3998)

    To make generated code more readable, esbuild includes the name of the source file when generating certain variable names within the file. Specifically bundling a CommonJS file generates a variable to store the lazily-evaluated module initializer. However, if a file is named index.js (or with a different extension), esbuild will use the name of the parent directory instead for a better name (since many packages have files all named index.js but have unique directory names).

    This is problematic when the bundle entry point is named index.js and the parent directory name is non-deterministic (e.g. a temporary directory created by a build script). To avoid non-determinism in esbuild's output, esbuild will now use index instead of the parent directory in this case. Specifically this will happen if the parent directory is equal to esbuild's outbase API option, which defaults to the lowest common ancestor of all user-specified entry point paths.

  • Experimental support for esbuild on NetBSD (#​3974)

    With this release, esbuild now has a published binary executable for NetBSD in the @esbuild/netbsd-arm64 npm package, and esbuild's installer has been modified to attempt to use it when on NetBSD. Hopefully this makes installing esbuild via npm work on NetBSD. This change was contributed by @​bsiegert.

    ⚠️ Note: NetBSD is not one of Node's supported platforms, so installing esbuild may or may not work on NetBSD depending on how Node has been patched. This is not a problem with esbuild. ⚠️


Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

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


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added C-nodejs dependencies Pull requests that update a dependency file labels Dec 27, 2024
Copy link
Contributor

qodo-merge-pro bot commented Dec 27, 2024

CI Failure Feedback 🧐

(Checks updated until commit 083e205)

Action: Check format / Check format script run

Failed stage: Run Bazel [❌]

Failure summary:

The action failed because the pnpm-lock.yaml file was updated during the build process, which
requires a rebuild:

  • The error occurred during the fetch of repository 'aspect_rules_js~~npm~npm'
  • The build system detected that pnpm-lock.yaml was modified
  • As per the error message, the build needs to be run again after the lock file update
  • This is a known issue referenced at: [Bug]: update_pnpm_lock fails under Bzlmod, retry fixes it aspect-build/rules_js#1445

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    961:  Package 'php-symfony-debug-bundle' is not installed, so not removed
    962:  Package 'php-symfony-dependency-injection' is not installed, so not removed
    963:  Package 'php-symfony-deprecation-contracts' is not installed, so not removed
    964:  Package 'php-symfony-discord-notifier' is not installed, so not removed
    965:  Package 'php-symfony-doctrine-bridge' is not installed, so not removed
    966:  Package 'php-symfony-doctrine-messenger' is not installed, so not removed
    967:  Package 'php-symfony-dom-crawler' is not installed, so not removed
    968:  Package 'php-symfony-dotenv' is not installed, so not removed
    969:  Package 'php-symfony-error-handler' is not installed, so not removed
    ...
    
    1857:  �[32mLoading:�[0m 0 packages loaded
    1858:  currently loading: 
    1859:  �[32mLoading:�[0m 0 packages loaded
    1860:  currently loading: 
    1861:  �[32mINFO: �[0mRepository aspect_rules_js~~npm~npm instantiated at:
    1862:  <builtin>: in <toplevel>
    1863:  Repository rule npm_translate_lock_rule defined at:
    1864:  /home/runner/.bazel/external/aspect_rules_js~/npm/private/npm_translate_lock.bzl:146:42: in <toplevel>
    1865:  �[31m�[1mERROR: �[0mAn error occurred during the fetch of repository 'aspect_rules_js~~npm~npm':
    1866:  Traceback (most recent call last):
    1867:  File "/home/runner/.bazel/external/aspect_rules_js~/npm/private/npm_translate_lock.bzl", line 112, column 21, in _npm_translate_lock_impl
    1868:  fail(msg)
    1869:  Error in fail: 
    1870:  INFO: pnpm-lock.yaml file updated. Please run your build again.
    1871:  See https://github.com/aspect-build/rules_js/issues/1445
    1872:  �[32mLoading:�[0m 0 packages loaded
    1873:  currently loading: 
    1874:  �[35mWARNING: �[0mTarget pattern parsing failed.
    1875:  �[31m�[1mERROR: �[0mSkipping '//:buildifier': no such package '@@aspect_rules_js~~npm~npm//': 
    1876:  INFO: pnpm-lock.yaml file updated. Please run your build again.
    1877:  See https://github.com/aspect-build/rules_js/issues/1445
    1878:  �[31m�[1mERROR: �[0mno such package '@@aspect_rules_js~~npm~npm//': 
    1879:  INFO: pnpm-lock.yaml file updated. Please run your build again.
    1880:  See https://github.com/aspect-build/rules_js/issues/1445
    1881:  �[32mINFO: �[0mElapsed time: 21.450s
    1882:  �[32mINFO: �[0m0 processes.
    1883:  �[31m�[1mERROR: �[0mBuild did NOT complete successfully
    1884:  �[31m�[1mERROR: �[0mBuild failed. Not running target
    1885:  �[0m
    1886:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @renovate renovate bot force-pushed the renovate/esbuild-0.x branch from 083e205 to 8e9328b Compare December 28, 2024 11:10
    @diemol diemol merged commit 7062b65 into trunk Dec 28, 2024
    1 check passed
    @diemol diemol deleted the renovate/esbuild-0.x branch December 28, 2024 11:13
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    C-nodejs dependencies Pull requests that update a dependency file
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants