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

fix(deps): update esbuild to 0.19.5 #209

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

ogkevin-robot[bot]
Copy link

@ogkevin-robot ogkevin-robot bot commented Oct 31, 2023

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.19.2 -> 0.19.5

Release Notes

evanw/esbuild (esbuild)

v0.19.5

Compare Source

  • Fix a regression in 0.19.0 regarding paths in tsconfig.json (#​3354)

    The fix in esbuild version 0.19.0 to process tsconfig.json aliases before the --packages=external setting unintentionally broke an edge case in esbuild's handling of certain tsconfig.json aliases where there are multiple files with the same name in different directories. This release adjusts esbuild's behavior for this edge case so that it passes while still processing aliases before --packages=external. Please read the linked issue for more details.

  • Fix a CSS font property minification bug (#​3452)

    This release fixes a bug where esbuild's CSS minifier didn't insert a space between the font size and the font family in the font CSS shorthand property in the edge case where the original source code didn't already have a space and the leading string token was shortened to an identifier:

    /* Original code */
    .foo { font: 16px"Menlo"; }
    
    /* Old output (with --minify) */
    .foo{font:16pxMenlo}
    
    /* New output (with --minify) */
    .foo{font:16px Menlo}
  • Fix bundling CSS with asset names containing spaces (#​3410)

    Assets referenced via CSS url() tokens may cause esbuild to generate invalid output when bundling if the file name contains spaces (e.g. url(image 2.png)). With this release, esbuild will now quote all bundled asset references in url() tokens to avoid this problem. This only affects assets loaded using the file and copy loaders.

  • Fix invalid CSS url() tokens in @import rules (#​3426)

    In the future, CSS url() tokens may contain additional stuff after the URL. This is irrelevant today as no CSS specification does this. But esbuild previously had a bug where using these tokens in an @import rule resulted in malformed output. This bug has been fixed.

  • Fix browser + false + type: module in package.json (#​3367)

    The browser field in package.json allows you to map a file to false to have it be treated as an empty file when bundling for the browser. However, if package.json contains "type": "module" then all .js files will be considered ESM, not CommonJS. Importing a named import from an empty CommonJS file gives you undefined, but importing a named export from an empty ESM file is a build error. This release changes esbuild's interpretation of these files mapped to false in this situation from ESM to CommonJS to avoid generating build errors for named imports.

  • Fix a bug in top-level await error reporting (#​3400)

    Using require() on a file that contains top-level await is not allowed because require() must return synchronously and top-level await makes that impossible. You will get a build error if you try to bundle code that does this with esbuild. This release fixes a bug in esbuild's error reporting code for complex cases of this situation involving multiple levels of imports to get to the module containing the top-level await.

  • Update to Unicode 15.1.0

    The character tables that determine which characters form valid JavaScript identifiers have been updated from Unicode version 15.0.0 to the newly-released Unicode version 15.1.0. I'm not putting an example in the release notes because all of the new characters will likely just show up as little squares since fonts haven't been updated yet. But you can read https://www.unicode.org/versions/Unicode15.1.0/#Summary for more information about the changes.

    This upgrade was contributed by @​JLHwung.

v0.19.4

Compare Source

  • Fix printing of JavaScript decorators in tricky cases (#​3396)

    This release fixes some bugs where esbuild's pretty-printing of JavaScript decorators could incorrectly produced code with a syntax error. The problem happened because esbuild sometimes substitutes identifiers for other expressions in the pretty-printer itself, but the decision about whether to wrap the expression or not didn't account for this. Here are some examples:

    // Original code
    import { constant } from './constants.js'
    import { imported } from 'external'
    import { undef } from './empty.js'
    class Foo {
      @​constant()
      @​imported()
      @​undef()
      foo
    }
    
    // Old output (with --bundle --format=cjs --packages=external --minify-syntax)
    var import_external = require("external");
    var Foo = class {
      @​123()
      @​(0, import_external.imported)()
      @​(void 0)()
      foo;
    };
    
    // New output (with --bundle --format=cjs --packages=external --minify-syntax)
    var import_external = require("external");
    var Foo = class {
      @​(123())
      @​((0, import_external.imported)())
      @​((void 0)())
      foo;
    };
  • Allow pre-release versions to be passed to target (#​3388)

    People want to be able to pass version numbers for unreleased versions of node (which have extra stuff after the version numbers) to esbuild's target setting and have esbuild do something reasonable with them. These version strings are of course not present in esbuild's internal feature compatibility table because an unreleased version has not been released yet (by definition). With this release, esbuild will now attempt to accept these version strings passed to target and do something reasonable with them.

v0.19.3

Compare Source

  • Fix list-style-type with the local-css loader (#​3325)

    The local-css loader incorrectly treated all identifiers provided to list-style-type as a custom local identifier. That included identifiers such as none which have special meaning in CSS, and which should not be treated as custom local identifiers. This release fixes this bug:

    /* Original code */
    ul { list-style-type: none }
    
    /* Old output (with --loader=local-css) */
    ul {
      list-style-type: stdin_none;
    }
    
    /* New output (with --loader=local-css) */
    ul {
      list-style-type: none;
    }

    Note that this bug only affected code using the local-css loader. It did not affect code using the css loader.

  • Avoid inserting temporary variables before use strict (#​3322)

    This release fixes a bug where esbuild could incorrectly insert automatically-generated temporary variables before use strict directives:

    // Original code
    function foo() {
      'use strict'
      a.b?.c()
    }
    
    // Old output (with --target=es6)
    function foo() {
      var _a;
      "use strict";
      (_a = a.b) == null ? void 0 : _a.c();
    }
    
    // New output (with --target=es6)
    function foo() {
      "use strict";
      var _a;
      (_a = a.b) == null ? void 0 : _a.c();
    }
  • Adjust TypeScript enum output to better approximate tsc (#​3329)

    TypeScript enum values can be either number literals or string literals. Numbers create a bidirectional mapping between the name and the value but strings only create a unidirectional mapping from the name to the value. When the enum value is neither a number literal nor a string literal, TypeScript and esbuild both default to treating it as a number:

    // Original TypeScript code
    declare const foo: any
    enum Foo {
      NUMBER = 1,
      STRING = 'a',
      OTHER = foo,
    }
    
    // Compiled JavaScript code (from "tsc")
    var Foo;
    (function (Foo) {
      Foo[Foo["NUMBER"] = 1] = "NUMBER";
      Foo["STRING"] = "a";
      Foo[Foo["OTHER"] = foo] = "OTHER";
    })(Foo || (Foo = {}));

    However, TypeScript does constant folding slightly differently than esbuild. For example, it may consider template literals to be string literals in some cases:

    // Original TypeScript code
    declare const foo = 'foo'
    enum Foo {
      PRESENT = `${foo}`,
      MISSING = `${bar}`,
    }
    
    // Compiled JavaScript code (from "tsc")
    var Foo;
    (function (Foo) {
      Foo["PRESENT"] = "foo";
      Foo[Foo["MISSING"] = `${bar}`] = "MISSING";
    })(Foo || (Foo = {}));

    The template literal initializer for PRESENT is treated as a string while the template literal initializer for MISSING is treated as a number. Previously esbuild treated both of these cases as a number but starting with this release, esbuild will now treat both of these cases as a string. This doesn't exactly match the behavior of tsc but in the case where the behavior diverges tsc reports a compile error, so this seems like acceptible behavior for esbuild. Note that handling these cases completely correctly would require esbuild to parse type declarations (see the declare keyword), which esbuild deliberately doesn't do.

  • Ignore case in CSS in more places (#​3316)

    This release makes esbuild's CSS support more case-agnostic, which better matches how browsers work. For example:

    /* Original code */
    @​KeyFrames Foo { From { OpaCity: 0 } To { OpaCity: 1 } }
    body { CoLoR: YeLLoW }
    
    /* Old output (with --minify) */
    @​KeyFrames Foo{From {OpaCity: 0} To {OpaCity: 1}}body{CoLoR:YeLLoW}
    
    /* New output (with --minify) */
    @​KeyFrames Foo{0%{OpaCity:0}To{OpaCity:1}}body{CoLoR:#ff0}

    Please never actually write code like this.

  • Improve the error message for null entries in exports (#​3377)

    Package authors can disable package export paths with the exports map in package.json. With this release, esbuild now has a clearer error message that points to the null token in package.json itself instead of to the surrounding context. Here is an example of the new error message:

    ✘ [ERROR] Could not resolve "msw/browser"
    
        lib/msw-config.ts:2:28:
          2 │ import { setupWorker } from 'msw/browser';
            ╵                             ~~~~~~~~~~~~~
    
      The path "./browser" cannot be imported from package "msw" because it was explicitly disabled by
      the package author here:
    
        node_modules/msw/package.json:17:14:
          17 │       "node": null,
             ╵               ~~~~
    
      You can mark the path "msw/browser" as external to exclude it from the bundle, which will remove
      this error and leave the unresolved path in the bundle.
    
  • Parse and print the with keyword in import statements

    JavaScript was going to have a feature called "import assertions" that adds an assert keyword to import statements. It looked like this:

    import stuff from './stuff.json' assert { type: 'json' }

    The feature provided a way to assert that the imported file is of a certain type (but was not allowed to affect how the import is interpreted, even though that's how everyone expected it to behave). The feature was fully specified and then actually implemented and shipped in Chrome before the people behind the feature realized that they should allow it to affect how the import is interpreted after all. So import assertions are no longer going to be added to the language.

    Instead, the current proposal is to add a feature called "import attributes" instead that adds a with keyword to import statements. It looks like this:

    import stuff from './stuff.json' with { type: 'json' }

    This feature provides a way to affect how the import is interpreted. With this release, esbuild now has preliminary support for parsing and printing this new with keyword. The with keyword is not yet interpreted by esbuild, however, so bundling code with it will generate a build error. All this release does is allow you to use esbuild to process code containing it (such as removing types from TypeScript code). Note that this syntax is not yet a part of JavaScript and may be removed or altered in the future if the specification changes (which it already has once, as described above). If that happens, esbuild reserves the right to remove or alter its support for this syntax too.


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, check this box

This PR has been generated by Renovate Bot.

| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | esbuild | 0.19.2 | 0.19.5 |
@ogkevin-robot ogkevin-robot bot enabled auto-merge (squash) October 31, 2023 06:09
@OGKevin
Copy link
Owner

OGKevin commented Oct 31, 2023

/lgtm

@ogkevin-robot ogkevin-robot bot merged commit cb80a79 into master Oct 31, 2023
2 checks passed
@ogkevin-robot ogkevin-robot bot deleted the renovate/esbuild-0.19.x-lockfile branch October 31, 2023 06:10
ogkevin-robot bot added a commit that referenced this pull request Dec 5, 2023
🤖 I have created a release *beep* *boop*
---


## [1.5.4](1.5.3...1.5.4) (2023-12-05)


### ⚠ BREAKING CHANGES

* **docker-image:** Update mcr.microsoft.com/vscode/devcontainers/javascript-node Docker tag to v20 ([#182](#182))
* **docker-image:** Update Node.js to v20 ([#181](#181))
* **github-action:** Update actions/setup-node action ([#202](#202))
* **github-action:** Update actions/checkout action to v4 ([#185](#185))

### Features

* add release-please pipeline ([#211](#211)) ([4afe002](4afe002))
* **deps:** update @types/node to 18.17.6 ([#162](#162)) ([2b88d99](2b88d99))
* **deps:** update @types/node to 18.18.7 ([#201](#201)) ([e68eff3](e68eff3))
* **deps:** update @types/node to 18.19.0 ([#236](#236)) ([07225a9](07225a9))
* **deps:** update esbuild to 0.19.2 ([#163](#163)) ([67eb2d7](67eb2d7))
* **deps:** update eslint to 8.47.0 ([#164](#164)) ([bd2e6e3](bd2e6e3))
* **deps:** update eslint to 8.48.0 ([#176](#176)) ([321cb97](321cb97))
* **deps:** update eslint to 8.52.0 ([#190](#190)) ([20c4a89](20c4a89))
* **deps:** update eslint to 8.53.0 ([#215](#215)) ([abd7a62](abd7a62))
* **deps:** update eslint to 8.55.0 ([#237](#237)) ([c8a57e9](c8a57e9))
* **deps:** update obsidian to 1.4.0 ([#165](#165)) ([611d7f9](611d7f9))
* **deps:** update typescript to 5.2.2 ([#173](#173)) ([218733c](218733c))
* **deps:** update typescript to 5.3.2 ([#225](#225)) ([9e59d81](9e59d81))
* **deps:** update typescript-eslint monorepo to 6.1.0 ([#16](#16)) ([09cd839](09cd839))
* **deps:** update typescript-eslint monorepo to 6.10.0 (minor) ([#219](#219)) ([3d557ce](3d557ce))
* **deps:** update typescript-eslint monorepo to 6.12.0 (minor) ([#226](#226)) ([83bdfa4](83bdfa4))
* **deps:** update typescript-eslint monorepo to 6.13.0 (minor) ([#233](#233)) ([86da960](86da960))
* **deps:** update typescript-eslint monorepo to 6.4.0 ([#166](#166)) ([ceb86f4](ceb86f4))
* **deps:** update typescript-eslint monorepo to 6.5.0 (minor) ([#183](#183)) ([732c188](732c188))
* **deps:** update typescript-eslint monorepo to 6.9.1 ([#188](#188)) ([c19b615](c19b615))
* **docker-image:** Update mcr.microsoft.com/vscode/devcontainers/javascript-node Docker tag to v20 ([#182](#182)) ([4e0603d](4e0603d))
* **docker-image:** Update Node.js to v20 ([#181](#181)) ([49f5272](49f5272))


### Bug Fixes

* **deps:** update @types/better-sqlite3 to 7.6.4 ([#180](#180)) ([a649b2e](a649b2e))
* **deps:** update @types/better-sqlite3 to 7.6.6 ([#192](#192)) ([48ff8ca](48ff8ca))
* **deps:** update @types/better-sqlite3 to 7.6.7 ([#218](#218)) ([8ad1c4c](8ad1c4c))
* **deps:** update @types/better-sqlite3 to 7.6.8 ([#228](#228)) ([66d1928](66d1928))
* **deps:** update @types/chai to 4.3.10 ([#220](#220)) ([2a4c145](2a4c145))
* **deps:** update @types/chai to 4.3.11 ([#229](#229)) ([7aa68da](7aa68da))
* **deps:** update @types/mocha to 10.0.3 ([#199](#199)) ([eb4cbbe](eb4cbbe))
* **deps:** update @types/mocha to 10.0.4 ([#221](#221)) ([02f5ca0](02f5ca0))
* **deps:** update @types/mocha to 10.0.6 ([#230](#230)) ([4e8ef1a](4e8ef1a))
* **deps:** update @types/node to 18.17.12 ([2f96491](2f96491))
* **deps:** update @types/node to 18.17.14 ([#184](#184)) ([ff47913](ff47913))
* **deps:** update @types/node to 18.17.8 ([#169](#169)) ([07345b2](07345b2))
* **deps:** update @types/node to 18.17.9 ([#170](#170)) ([f57cf8f](f57cf8f))
* **deps:** update @types/node to 18.18.13 ([#223](#223)) ([1a3e313](1a3e313))
* **deps:** update @types/node to 18.18.8 ([#212](#212)) ([148489f](148489f))
* **deps:** update @types/node to 18.18.9 ([#222](#222)) ([d87a214](d87a214))
* **deps:** update @types/sql.js to 1.4.9 ([#200](#200)) ([66b2dd6](66b2dd6))
* **deps:** update chai to 4.3.10 ([#187](#187)) ([30a3137](30a3137))
* **deps:** update chai to 4.3.10 ([#208](#208)) ([ecb850d](ecb850d))
* **deps:** update chai to 4.3.8 ([#172](#172)) ([7efe545](7efe545))
* **deps:** update esbuild to 0.18.15 ([#17](#17)) ([14bc1b9](14bc1b9))
* **deps:** update esbuild to 0.19.5 ([#193](#193)) ([07f27cb](07f27cb))
* **deps:** update esbuild to 0.19.5 ([#209](#209)) ([cb80a79](cb80a79))
* **deps:** update esbuild to 0.19.8 ([#224](#224)) ([63d00f6](63d00f6))
* **deps:** update obsidian to 1.4.11 ([#191](#191)) ([f87e675](f87e675))
* **deps:** update obsidian to 1.4.4 ([#171](#171)) ([7d6b4bb](7d6b4bb))
* **deps:** update tslib to 2.6.2 ([#160](#160)) ([8e2e83e](8e2e83e))
* **deps:** update typescript-eslint monorepo to 6.13.2 ([#244](#244)) ([db5765f](db5765f))
* **deps:** update typescript-eslint monorepo to 6.4.1 ([#168](#168)) ([1f62800](1f62800))
* don't crash when there are no highlights ([#159](#159)) ([27d5c3d](27d5c3d))
* renovate pipeline ([#204](#204)) ([1b63f90](1b63f90))
* renovate pipeline for npm ([#206](#206)) ([db4293d](db4293d))
* typo for template on settings screen ([de6b7c3](de6b7c3))


### Continuous Integration

* **github-action:** Update actions/checkout action to v4 ([#185](#185)) ([e26bdb0](e26bdb0))
* **github-action:** Update actions/setup-node action ([#202](#202)) ([b7b5bc9](b7b5bc9))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant