release notes
release notes
Published 8/12/2021
PatchSafe upgradeAvoid the sequence </style in CSS output (#1509)
The CSS code generator now avoids generating the character sequence </style in case you want to embed the CSS output in a <style>...</style> tag inside HTML:
/* Original code */
a:after {
content: "</style>";
}
/* Old output */
a:after {
content: "</style>";
}
/* New output */
a:after {
content: "<\/style>";
}
This mirrors how the JS code generator similarly avoids the character sequence </script.
In addition, the check that escapes </style and </script is now case-insensitive to match how the browser's HTML parser behaves. So </STYLE and </SCRIPT are now escaped as well.
Fix a TypeScript parsing edge case with ASI (Automatic Semicolon Insertion) (#1512)
This fixes a parsing bug where TypeScript types consisting of multiple identifiers joined together with a . could incorrectly extend onto the next line if the next line started with <. This problem was due to ASI; esbuild should be automatically inserting a semicolon at the end of the line:
let x: {
<A extends B>(): c.d /* A semicolon should be automatically inserted here */
<E extends F>(): g.h
}
Previously the above code was incorrectly considered a syntax error since esbuild attempted to parse the parameterized type c.d<E extends F ? ...>. With this release, this code is now parsed correctly.
release notes
Published 8/12/2021
PatchSafe upgradeAvoid the sequence </style in CSS output (#1509)
The CSS code generator now avoids generating the character sequence </style in case you want to embed the CSS output in a <style>...</style> tag inside HTML:
/* Original code */
a:after {
content: "</style>";
}
/* Old output */
a:after {
content: "</style>";
}
/* New output */
a:after {
content: "<\/style>";
}
This mirrors how the JS code generator similarly avoids the character sequence </script.
In addition, the check that escapes </style and </script is now case-insensitive to match how the browser's HTML parser behaves. So </STYLE and </SCRIPT are now escaped as well.
Fix a TypeScript parsing edge case with ASI (Automatic Semicolon Insertion) (#1512)
This fixes a parsing bug where TypeScript types consisting of multiple identifiers joined together with a . could incorrectly extend onto the next line if the next line started with <. This problem was due to ASI; esbuild should be automatically inserting a semicolon at the end of the line:
let x: {
<A extends B>(): c.d /* A semicolon should be automatically inserted here */
<E extends F>(): g.h
}
Previously the above code was incorrectly considered a syntax error since esbuild attempted to parse the parameterized type c.d<E extends F ? ...>. With this release, this code is now parsed correctly.
An extremely fast bundler for the web