Bump esbuild and nitropack
Bumps esbuild to 0.28.1 and updates ancestor dependency nitropack. These dependencies need to be updated together.
Updates esbuild from 0.20.2 to 0.28.1
Release notes
Sourced from esbuild's releases.
v0.28.1
Disallow
\in local development server HTTP requests (GHSA-g7r4-m6w7-qqqr)This release fixes a security issue where HTTP requests to esbuild's local development server could traverse outside of the serve directory on Windows using a
\backslash character. It happened due to the use of Go'spath.Clean()function, which only handles Unix-style/characters. HTTP requests with paths containing\are no longer allowed.Thanks to
@dellaliberafor reporting this issue.Add integrity checks to the Deno API (GHSA-gv7w-rqvm-qjhr)
The previous release of esbuild added integrity checks to esbuild's npm install script. This release also adds integrity checks to esbuild's Deno install script. Now esbuild's Deno API will also fail with an error if the downloaded esbuild binary contains something other than the expected content.
Note that esbuild's Deno API installs from
registry.npmjs.orgby default, but allows theNPM_CONFIG_REGISTRYenvironment variable to override this with a custom package registry. This change means that the esbuild executable served byNPM_CONFIG_REGISTRYmust now match the expected content.Thanks to
@sondt99for reporting this issue.Avoid inlining
usingandawait usingdeclarations (#4482)Previously esbuild's minifier sometimes incorrectly inlined
usingandawait usingdeclarations into subsequent uses of that declaration, which then fails to dispose of the resource correctly. This bug happened because inlining was done forletandconstdeclarations by avoiding doing it forvardeclarations, which no longer worked when more declaration types were added. Here's an example:// Original code { using x = new Resource() x.activate() }// Old output (with --minify)
new Resource().activate();
// New output (with --minify)
{using e=new Resource;e.activate()}
Fix module evaluation when an error is thrown (#4461, #4467)
If an error is thrown during module evaluation, esbuild previously didn't preserve the state of the module for subsequent module references. This was observable if
import()orrequire()is used to import a module multiple times. The thrown error is supposed to be thrown by every call toimport()orrequire(), not just the first. With this release, esbuild will now throw the same error every time you callimport()orrequire()on a module that throws during its evaluation.Fix some edge cases around the
newoperator (#4477)Previously esbuild incorrectly printed certain edge cases involving complex expressions inside the target of a
newexpression (specifically an optional chain and/or a tagged template literal). The generated code for thenewtarget was not correctly wrapped with parentheses, and either contained a syntax error or had different semantics. These edge cases have been fixed so that they now correctly wrap thenewtarget in parentheses. Here is an example of some affected code:// Original code new (foo()`bar`)() new (foo()?.bar)()// Old output
new foo()bar();
new (foo())?.bar();
... (truncated)
Changelog
Sourced from esbuild's changelog.
Changelog: 2024
This changelog documents all esbuild versions published in the year 2024 (versions 0.19.12 through 0.24.2).
0.24.2
Fix regression with
--defineandimport.meta(#4010, #4012, #4013)The previous change in version 0.24.1 to use a more expression-like parser for
definevalues to allow quoted property names introduced a regression that removed the ability to use--define:import.meta=.... Even thoughimportis normally a keyword that can't be used as an identifier, ES modules special-case theimport.metaexpression to behave like an identifier anyway. This change fixes the regression.This fix was contributed by
@sapphi-red.0.24.1
Allow
es2024as a target intsconfig.json(#4004)TypeScript recently added
es2024as a compilation target, so esbuild now supports this in thetargetfield oftsconfig.jsonfiles, 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/setThis 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
--defineand--pure(#4008)The
defineandpureAPI 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--defineand--pureconsistent with--global-name, which already supported quoted property names. For example, the following is now possible:
... (truncated)
Commits
bb9db84publish 0.28.1 to npm9ff053esecurity: add integrity checks to the Deno API0a9bf21enforce non-negative size in gzip parsere2a1a71security: forbid\\in local dev server requests83a2cbffix #4482: don't inlineusingdeclarations308ad74fix #4471: renaming of nestedvardeclarationsf013f5ffix some typosaafd6e4chore: fix some minor issues in comments (#4462)15300c3follow up: cjs evaluation fixes1bda0c3fix #4461, fix #4467: esm evaluation fixes- Additional commits viewable in compare view
Maintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for esbuild since your current version.
Updates nitropack from 2.9.7 to 2.13.4
Release notes
Sourced from nitropack's releases.
v2.13.4
[!IMPORTANT] This release patches two medium-severity vulnerabilities in
proxyandredirectroute rules. Users relying on either are strongly encouraged to upgrade. See GHSA-5w89-w975-hf9q and GHSA-9phm-9p8f-hw5m for details.🚀 Enhancements
- Add version meta (#4194)
🩹 Fixes
- route-rules: Reject out-of-scope requests (#4223)
- route-rules: Prevent open redirect via protocol-relative url bypass (8d6bfb0b)
🏡 Chore
❤️ Contributors
- Pooya Parsa (
@pi0)- Rihan Arfan (
@RihanArfan)v2.13.3
📦 Dependency Updates
Package From To httpxy^0.3.1 ^0.5.0 h3^1.15.9 ^1.15.10 esbuild^0.27.4 ^0.27.5 rollup^4.59.0 ^4.60.1 @vercel/nft^1.4.0 ^1.5.0 c12^3.3.3 ^3.3.4 citty^0.2.1 ^0.2.2 defu^6.1.4 ^6.1.6 globby^16.1.1 ^16.2.0 listhen^1.9.0 ^1.9.1 unstorage^1.17.4 ^1.17.5 cookie-es^2.0.0 ^2.0.1 youch^4.1.0 ^4.1.1 v2.13.2
[!NOTE] This release upgrades h3 to latest
1.15.9which contains security fixes.🩹 Fixes
... (truncated)
Commits
f92e684chore: apply automated updates112e215chore: basic dist-diff script932f628chore: ignore vite7 from pnpm outdated705069fchore: update depsbc1dd9dfix(route-rules): prevent open redirect via protocol-relative url bypass (#4236)6edbf84chore(deps): update all non-major dependencies (#4227)feebdc1refactor: use built-in escapeRegExp util (#4109)f8cf6ccfeat(tracing): enable tracing channels for unstorage (#4226)0bbbb79docs: improve jsdocs (#4199)d0d8d91types(vite): makeexperimental.viteoptional (#4225)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.
Summary by cubic
Upgrade esbuild to 0.28.1 and nitropack to 2.13.4 to apply recent security fixes and keep the build toolchain compatible. These packages are coupled and need to be updated together.
- Dependencies
esbuild: 0.20.2 → 0.28.1 — fixes dev server path traversal, improves module evaluation, adds integrity checks.nitropack: 2.9.7 → 2.13.4 — patches proxy/redirect route-rule vulnerabilities and updates deps (includingh3security fixes).