chore(deps): update dependency esbuild to v0.17.1 #2963

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2023-01-16 19:21:35 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.17.0 -> 0.17.1

Release Notes

evanw/esbuild

v0.17.1

Compare Source

  • Make it possible to cancel a build (#​2725)

    The context object introduced in version 0.17.0 has a new cancel() method. You can use it to cancel a long-running build so that you can start a new one without needing to wait for the previous one to finish. When this happens, the previous build should always have at least one error and have no output files (i.e. it will be a failed build).

    Using it might look something like this:

    • JS:

      let ctx = await esbuild.context({
        // ...
      })
      
      let rebuildWithTimeLimit = timeLimit => {
        let timeout = setTimeout(() => ctx.cancel(), timeLimit)
        return ctx.rebuild().finally(() => clearTimeout(timeout))
      }
      
      let build = await rebuildWithTimeLimit(500)
      
    • Go:

      ctx, err := api.Context(api.BuildOptions{
        // ...
      })
      if err != nil {
        return
      }
      
      rebuildWithTimeLimit := func(timeLimit time.Duration) api.BuildResult {
        t := time.NewTimer(timeLimit)
        go func() {
          <-t.C
          ctx.Cancel()
        }()
        result := ctx.Rebuild()
        t.Stop()
        return result
      }
      
      build := rebuildWithTimeLimit(500 * time.Millisecond)
      

    This API is a quick implementation and isn't maximally efficient, so the build may continue to do some work for a little bit before stopping. For example, I have added stop points between each top-level phase of the bundler and in the main module graph traversal loop, but I haven't added fine-grained stop points within the internals of the linker. How quickly esbuild stops can be improved in future releases. This means you'll want to wait for cancel() and/or the previous rebuild() to finish (i.e. await the returned promise in JavaScript) before starting a new build, otherwise rebuild() will give you the just-canceled build that still hasn't ended yet. Note that onEnd callbacks will still be run regardless of whether or not the build was canceled.

  • Fix server-sent events without servedir (#​2827)

    The server-sent events for live reload were incorrectly using servedir to calculate the path to modified output files. This means events couldn't be sent when servedir wasn't specified. This release uses the internal output directory (which is always present) instead of servedir (which might be omitted), so live reload should now work when servedir is not specified.

  • Custom entry point output paths now work with the copy loader (#​2828)

    Entry points can optionally provide custom output paths to change the path of the generated output file. For example, esbuild foo=abc.js bar=xyz.js --outdir=out generates the files out/foo.js and out/bar.js. However, this previously didn't work when using the copy loader due to an oversight. This bug has been fixed. For example, you can now do esbuild foo=abc.html bar=xyz.html --outdir=out --loader:.html=copy to generate the files out/foo.html and out/bar.html.

  • The JS API can now take an array of objects (#​2828)

    Previously it was not possible to specify two entry points with the same custom output path using the JS API, although it was possible to do this with the Go API and the CLI. This will not cause a collision if both entry points use different extensions (e.g. if one uses .js and the other uses .css). You can now pass the JS API an array of objects to work around this API limitation:

    // The previous API didn't let you specify duplicate output paths
    let result = await esbuild.build({
      entryPoints: {
        // This object literal contains a duplicate key, so one is ignored
        'dist': 'foo.js',
        'dist': 'bar.css',
      },
    })
    
    // You can now specify duplicate output paths as an array of objects
    let result = await esbuild.build({
      entryPoints: [
        { in: 'foo.js', out: 'dist' },
        { in: 'bar.css', out: 'dist' },
      ],
    })
    

Configuration

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

🚦 Automerge: Enabled.

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, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [esbuild](https://github.com/evanw/esbuild) | devDependencies | patch | [`0.17.0` -> `0.17.1`](https://renovatebot.com/diffs/npm/esbuild/0.17.0/0.17.1) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.17.1`](https://github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#&#8203;0171) [Compare Source](https://github.com/evanw/esbuild/compare/v0.17.0...v0.17.1) - Make it possible to cancel a build ([#&#8203;2725](https://github.com/evanw/esbuild/issues/2725)) The context object introduced in version 0.17.0 has a new `cancel()` method. You can use it to cancel a long-running build so that you can start a new one without needing to wait for the previous one to finish. When this happens, the previous build should always have at least one error and have no output files (i.e. it will be a failed build). Using it might look something like this: - JS: ```js let ctx = await esbuild.context({ // ... }) let rebuildWithTimeLimit = timeLimit => { let timeout = setTimeout(() => ctx.cancel(), timeLimit) return ctx.rebuild().finally(() => clearTimeout(timeout)) } let build = await rebuildWithTimeLimit(500) ``` - Go: ```go ctx, err := api.Context(api.BuildOptions{ // ... }) if err != nil { return } rebuildWithTimeLimit := func(timeLimit time.Duration) api.BuildResult { t := time.NewTimer(timeLimit) go func() { <-t.C ctx.Cancel() }() result := ctx.Rebuild() t.Stop() return result } build := rebuildWithTimeLimit(500 * time.Millisecond) ``` This API is a quick implementation and isn't maximally efficient, so the build may continue to do some work for a little bit before stopping. For example, I have added stop points between each top-level phase of the bundler and in the main module graph traversal loop, but I haven't added fine-grained stop points within the internals of the linker. How quickly esbuild stops can be improved in future releases. This means you'll want to wait for `cancel()` and/or the previous `rebuild()` to finish (i.e. await the returned promise in JavaScript) before starting a new build, otherwise `rebuild()` will give you the just-canceled build that still hasn't ended yet. Note that `onEnd` callbacks will still be run regardless of whether or not the build was canceled. - Fix server-sent events without `servedir` ([#&#8203;2827](https://github.com/evanw/esbuild/issues/2827)) The server-sent events for live reload were incorrectly using `servedir` to calculate the path to modified output files. This means events couldn't be sent when `servedir` wasn't specified. This release uses the internal output directory (which is always present) instead of `servedir` (which might be omitted), so live reload should now work when `servedir` is not specified. - Custom entry point output paths now work with the `copy` loader ([#&#8203;2828](https://github.com/evanw/esbuild/issues/2828)) Entry points can optionally provide custom output paths to change the path of the generated output file. For example, `esbuild foo=abc.js bar=xyz.js --outdir=out` generates the files `out/foo.js` and `out/bar.js`. However, this previously didn't work when using the `copy` loader due to an oversight. This bug has been fixed. For example, you can now do `esbuild foo=abc.html bar=xyz.html --outdir=out --loader:.html=copy` to generate the files `out/foo.html` and `out/bar.html`. - The JS API can now take an array of objects ([#&#8203;2828](https://github.com/evanw/esbuild/issues/2828)) Previously it was not possible to specify two entry points with the same custom output path using the JS API, although it was possible to do this with the Go API and the CLI. This will not cause a collision if both entry points use different extensions (e.g. if one uses `.js` and the other uses `.css`). You can now pass the JS API an array of objects to work around this API limitation: ```js // The previous API didn't let you specify duplicate output paths let result = await esbuild.build({ entryPoints: { // This object literal contains a duplicate key, so one is ignored 'dist': 'foo.js', 'dist': 'bar.css', }, }) // You can now specify duplicate output paths as an array of objects let result = await esbuild.build({ entryPoints: [ { in: 'foo.js', out: 'dist' }, { in: 'bar.css', out: 'dist' }, ], }) ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDAuMiIsInVwZGF0ZWRJblZlciI6IjMyLjI0MC4yIn0=-->
renovate added the
dependencies
label 2023-01-16 19:04:10 +00:00
renovate added 1 commit 2023-01-16 19:04:10 +00:00
continuous-integration/drone/pr Build is passing Details
81838d876e
chore(deps): update dependency esbuild to v0.17.1
Member

Hi renovate!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2963-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi renovate! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2963-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad merged commit 84b1b61af4 into main 2023-01-16 19:21:35 +00:00
konrad deleted branch renovate/esbuild-0.x 2023-01-16 19:21:35 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.