Open
Conversation
Snyk has created this PR to upgrade esbuild from 0.17.19 to 0.18.8. See this package in npm: https://www.npmjs.com/package/esbuild See this project in Snyk: https://app.snyk.io/org/8808.huuu/project/aa510f16-582e-4f13-82c2-b0dbf1d970ea?utm_source=github&utm_medium=referral&page=upgrade-pr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade esbuild from 0.17.19 to 0.18.8.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: esbuild
-
0.18.8 - 2023-06-25
-
// Original code
-
0.18.7 - 2023-06-24
-
Symbol.dispose {
Symbol.asyncDispose {
-
-
0.18.6 - 2023-06-20
-
0.18.5 - 2023-06-20
-
0.18.4 - 2023-06-16
-
0.18.3 - 2023-06-15
-
-
0.18.2 - 2023-06-13
-
0.18.1 - 2023-06-12
-
0.18.0 - 2023-06-09
-
0.17.19 - 2023-05-13
from esbuild GitHub release notesImplement transforming
asyncgenerator functions (#2780)With this release, esbuild will now transform
asyncgenerator functions into normal generator functions when the configured target environment doesn't support them. These functions behave similar to normal generator functions except that they use theSymbol.asyncIteratorinterface instead of theSymbol.iteratorinterface and the iteration methods return promises. Here's an example (helper functions are omitted):async function foo() {
yield Promise.resolve(1)
await new Promise(r => setTimeout(r, 100))
yield [Promise.resolve(2)]
}
async function bar() {
for await (const x of foo()) {
console.log(x)
}
}
bar()
// New output (with --target=es6)
function foo() {
return __asyncGenerator(this, null, function () {
yield Promise.resolve(1);
yield new __await(new Promise((r) => setTimeout(r, 100)));
yield __yieldStar([Promise.resolve(2)]);
});
}
function bar() {
return __async(this, null, function* () {
try {
for (var iter = __forAwait(foo()), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
const x = temp.value;
console.log(x);
}
} catch (temp) {
error = [temp];
} finally {
try {
more && (temp = iter.return) && (yield temp.call(iter));
} finally {
if (error)
throw error[0];
}
}
});
}
bar();
This is an older feature that was added to JavaScript in ES2018 but I didn't implement the transformation then because it's a rarely-used feature. Note that esbuild already added support for transforming
for awaitloops (the other part of the asynchronous iteration proposal) a year ago, so support for asynchronous iteration should now be complete.I have never used this feature myself and code that uses this feature is hard to come by, so this transformation has not yet been tested on real-world code. If you do write code that uses this feature, please let me know if esbuild's
asyncgenerator transformation doesn't work with your code.Add support for
usingdeclarations in TypeScript 5.2+ (#3191)TypeScript 5.2 (due to be released in August of 2023) will introduce
usingdeclarations, which will allow you to automatically dispose of the declared resources when leaving the current scope. You can read the TypeScript PR for this feature for more information. This release of esbuild adds support for transforming this syntax to target environments without support forusingdeclarations (which is currently all targets other thanesnext). Here's an example (helper functions are omitted):console.log("cleanup");
}
};
var foo = __using(stack, new Foo());
foo.bar();
} catch () {
var _error = _, _hasError = true;
} finally {
__callDispose(_stack, _error, _hasError);
}">
The injected helper functions ensure that the method named
Symbol.disposeis called onnew Foowhen control exits the scope. Note that as with all new JavaScript APIs, you'll need to polyfillSymbol.disposeif it's not present before you use it. This is not something that esbuild does for you because esbuild only handles syntax, not APIs. Polyfilling it can be done with something like this:This feature also introduces
await usingdeclarations which are likeusingdeclarations but they callawaiton the disposal method (not on the initializer). Here's an example (helper functions are omitted):await new Promise((done) => {
setTimeout(done, 1e3);
});
console.log("cleanup");
}
};
var foo = __using(stack, new Foo(), true);
foo.bar();
} catch () {
var _error = _, _hasError = true;
} finally {
var _promise = __callDispose(_stack, _error, _hasError);
_promise && await _promise;
}">
The injected helper functions ensure that the method named
Symbol.asyncDisposeis called onnew Foowhen control exits the scope, and that the returned promise is awaited. Similarly toSymbol.dispose, you'll also need to polyfillSymbol.asyncDisposebefore you use it.Add a
--line-limit=flag to limit line length (#3170)Long lines are common in minified code. However, many tools and text editors can't handle long lines. This release introduces the
--line-limit=flag to tell esbuild to wrap lines longer than the provided number of bytes. For example,--line-limit=80tells esbuild to insert a newline soon after a given line reaches 80 bytes in length. This setting applies to both JavaScript and CSS, and works even when minification is disabled. Note that turning this setting on will make your files bigger, as the extra newlines take up additional space in the file (even after gzip compression).Read more
Read more
Read more
Fix a panic due to empty static class blocks (#3161)
This release fixes a bug where an internal invariant that was introduced in the previous release was sometimes violated, which then caused a panic. It happened when bundling code containing an empty static class block with both minification and bundling enabled.
Read more
Read more
Read more
Read more
Commit messages
Package name: esbuild
servetodevvitejs/vite#3125: bug with constant inlining and closuresCompare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs