-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix TaggedTemplateLiteral evaluation
#15224
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
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53737/ |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test in packages/babel-traverse/test/evaluation.js, to show the bug that this PR fixes?
The primary reason for this fix is that it’s a type error. However I’ll see if I can add/update a test. |
This line of code causes a type error since `TaggedTemplateLiteral`s do not have a property called "expressions".
This change does what is probably expected. However, to maintain the existing behaviour, the line should instead be:
```js
const exprs: Array<undefined | NodePath<t.Node>> = path.isTemplateLiteral()
? path.get('expressions')
: []
```
126264c to
02bea04
Compare
| expect( | ||
| getPath("String.raw`a\\n${1}\\u`;").get("body.0.expression").evaluate() | ||
| .value, | ||
| ).toBe("a\\n1\\u"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing on main, returning a\\n\\u.
TaggedTemplateLiteral evaluation
<h3>Snyk has created this PR to upgrade @babel/core from 7.20.7 to 7.20.12.</h3> :information_source: 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. <hr/> - The recommended version is **1 version** ahead of your current version. - The recommended version was released **21 days ago**, on 2023-01-04. The recommended version fixes: Severity | Issue | PriorityScore (*) | Exploit Maturity | :-------------------------:|:-------------------------|-------------------------|:------------------------- <img src="https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png" width="20" height="20" title="medium severity"/> | Prototype Pollution<br/> [SNYK-JS-JSON5-3182856](https://snyk.io/vuln/SNYK-JS-JSON5-3182856) | **427/1000** <br/> **Why?** Proof of Concept exploit, CVSS 6.4 | Proof of Concept (*) Note that the real score may have changed since the PR was raised. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@babel/core</b></summary> <ul> <li> <b>7.20.12</b> - <a href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.20.12">2023-01-04</a></br><h2>v7.20.12 (2023-01-04)</h2> <p>Thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cross19xx/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://snyk.io/redirect/github/cross19xx">@ cross19xx</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JBYoshi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://snyk.io/redirect/github/JBYoshi">@ JBYoshi</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nmn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://snyk.io/redirect/github/nmn">@ nmn</a> for your first PRs!</p> <h4><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug Fix</h4> <ul> <li><code>babel-traverse</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15224" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15224/hovercard">#15224</a> Fix <code>TaggedTemplateLiteral</code> evaluation (<a href="https://snyk.io/redirect/github/nmn">@ nmn</a>)</li> </ul> </li> <li><code>babel-helper-create-class-features-plugin</code>, <code>babel-plugin-proposal-class-properties</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15312" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15312/hovercard">#15312</a> fix: <code>delete this</code> in static class properties initialization (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> </ul> </li> </ul> <h4><g-emoji class="g-emoji" alias="nail_care" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f485.png">💅</g-emoji> Polish</h4> <ul> <li><code>babel-traverse</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15313" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15313/hovercard">#15313</a> Implement support for evaluating computed properties. (<a href="https://snyk.io/redirect/github/JBYoshi">@ JBYoshi</a>)</li> </ul> </li> </ul> <h4>Committers: 5</h4> <ul> <li>Jonathan Browne (<a href="https://snyk.io/redirect/github/JBYoshi">@ JBYoshi</a>)</li> <li>Kenneth Kwakye-Gyamfi (<a href="https://snyk.io/redirect/github/cross19xx">@ cross19xx</a>)</li> <li>Naman Goel (<a href="https://snyk.io/redirect/github/nmn">@ nmn</a>)</li> <li>Nicolò Ribaudo (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> <li>Tianlan Zhou (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> </ul> </li> <li> <b>7.20.7</b> - <a href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.20.7">2022-12-22</a></br><h2>v7.20.7 (2022-12-22)</h2> <p>Thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wsypower/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://snyk.io/redirect/github/wsypower">@ wsypower</a> for your first PR!</p> <h4><g-emoji class="g-emoji" alias="eyeglasses" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f453.png">👓</g-emoji> Spec Compliance</h4> <ul> <li><code>babel-helper-member-expression-to-functions</code>, <code>babel-helper-replace-supers</code>, <code>babel-plugin-proposal-class-properties</code>, <code>babel-plugin-transform-classes</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15223" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15223/hovercard">#15223</a> fix: Deleting super property should throw (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> </ul> </li> <li><code>babel-helpers</code>, <code>babel-plugin-proposal-class-properties</code>, <code>babel-plugin-transform-classes</code>, <code>babel-plugin-transform-object-super</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15241" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15241/hovercard">#15241</a> fix: Throw correct error types from sed ant class TDZ helpers (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> </ul> </li> </ul> <h4><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug Fix</h4> <ul> <li><code>babel-parser</code>, <code>babel-plugin-transform-typescript</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15209" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15209/hovercard">#15209</a> fix: Support auto accessors with TypeScript annotations (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> <li><code>babel-traverse</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15287" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15287/hovercard">#15287</a> Fix <code>.parentPath</code> after rename in <code>SwitchCase</code> (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> </ul> </li> <li><code>babel-plugin-transform-typescript</code>, <code>babel-traverse</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15284" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15284/hovercard">#15284</a> fix: Ts import type and func with duplicate name (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> <li><code>babel-plugin-transform-block-scoping</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15278" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15278/hovercard">#15278</a> Fix tdz analysis for reassigned captured for bindings (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> </ul> </li> <li><code>babel-plugin-proposal-async-generator-functions</code>, <code>babel-preset-env</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15235" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15235/hovercard">#15235</a> fix: Transform <code>for await</code> with shadowed variables (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> <li><code>babel-generator</code>, <code>babel-plugin-proposal-optional-chaining</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15258" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15258/hovercard">#15258</a> fix: Correctly generate <code>(a ?? b) as T</code> (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> <li><code>babel-plugin-transform-react-jsx</code>, <code>babel-types</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15233" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15233/hovercard">#15233</a> fix: Emit correct sourcemap ranges for <code>JSXText</code> (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> <li><code>babel-core</code>, <code>babel-helpers</code>, <code>babel-plugin-transform-computed-properties</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15232" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15232/hovercard">#15232</a> fix: Computed properties should keep original definition order (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> </ul> </li> <li><code>babel-helper-member-expression-to-functions</code>, <code>babel-helper-replace-supers</code>, <code>babel-plugin-proposal-class-properties</code>, <code>babel-plugin-transform-classes</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15223" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15223/hovercard">#15223</a> fix: Deleting super property should throw (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> </ul> </li> <li><code>babel-generator</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15216" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15216/hovercard">#15216</a> fix: Print newlines for leading Comments of <code>TSEnumMember</code> (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> </ul> <h4><g-emoji class="g-emoji" alias="nail_care" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f485.png">💅</g-emoji> Polish</h4> <ul> <li><code>babel-plugin-transform-block-scoping</code>, <code>babel-traverse</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15275" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15275/hovercard">#15275</a> Improve relative execution tracking in fn exprs (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> </ul> </li> </ul> <h4><g-emoji class="g-emoji" alias="house" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3e0.png">🏠</g-emoji> Internal</h4> <ul> <li><code>babel-helper-define-map</code>, <code>babel-plugin-transform-property-mutators</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15274" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15274/hovercard">#15274</a> Inline & simplify <code>@ babel/helper-define-map</code> (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> </ul> </li> <li><code>babel-core</code>, <code>babel-plugin-proposal-class-properties</code>, <code>babel-plugin-transform-block-scoping</code>, <code>babel-plugin-transform-classes</code>, <code>babel-plugin-transform-destructuring</code>, <code>babel-plugin-transform-parameters</code>, <code>babel-plugin-transform-regenerator</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>, <code>babel-traverse</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15200" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15200/hovercard">#15200</a> Rewrite <code>transform-block-scoping</code> plugin (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> </ul> </li> </ul> <h4><g-emoji class="g-emoji" alias="running_woman" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3c3-2640.png">🏃♀️</g-emoji> Performance</h4> <ul> <li><code>babel-helper-compilation-targets</code> <ul> <li><a href="https://snyk.io/redirect/github/babel/babel/pull/15228" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/15228/hovercard">#15228</a> perf: Speed up <code>getTargets</code> (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a>)</li> </ul> </li> </ul> <h4>Committers: 6</h4> <ul> <li>Babel Bot (<a href="https://snyk.io/redirect/github/babel-bot">@ babel-bot</a>)</li> <li>Huáng Jùnliàng (<a href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li> <li>Nicolò Ribaudo (<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@ nicolo-ribaudo</a>)</li> <li>Tianlan Zhou (<a href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>)</li> <li><a href="https://snyk.io/redirect/github/liuxingbaoyu">@ liuxingbaoyu</a></li> <li>魏 (<a href="https://snyk.io/redirect/github/wsypower">@ wsypower</a>)</li> </ul> </li> </ul> from <a href="https://snyk.io/redirect/github/babel/babel/releases">@babel/core GitHub release notes</a> </details> </details> <hr/> **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: <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIxYjVhZTY0Yi1lYjQxLTRmOTgtYmRkMC1hOTE2ZTM5NDFkMDQiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjFiNWFlNjRiLWViNDEtNGY5OC1iZGQwLWE5MTZlMzk0MWQwNCJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55?utm_source=github&utm_medium=referral&page=upgrade-pr) 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55/settings/integration?pkg=@babel/core&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) <!--- (snyk:metadata:{"prId":"1b5ae64b-eb41-4f98-bdd0-a916e3941d04","prPublicId":"1b5ae64b-eb41-4f98-bdd0-a916e3941d04","dependencies":[{"name":"@babel/core","from":"7.20.7","to":"7.20.12"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"852e6e4f-be96-45c8-b370-1060f5ebee55","env":"prod","prType":"upgrade","vulns":["SNYK-JS-JSON5-3182856"],"issuesToFix":[{"issueId":"SNYK-JS-JSON5-3182856","severity":"medium","title":"Prototype Pollution","exploitMaturity":"proof-of-concept","priorityScore":427,"priorityScoreFactors":[{"type":"exploit","label":"Proof of Concept","score":107},{"type":"cvssScore","label":"6.4","score":320}]}],"upgrade":["SNYK-JS-JSON5-3182856"],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2023-01-04T16:02:21.147Z"},"templateVariants":["priorityScore"],"hasFixes":true,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[427]}) ---> --------- Co-authored-by: snyk-bot <[email protected]>
<h3>Snyk has created this PR to upgrade @babel/core from 7.20.12 to
7.21.0.</h3>
:information_source: 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.
<hr/>
- The recommended version is **1 version** ahead of your current
version.
- The recommended version was released **24 days ago**, on 2023-02-20.
<details>
<summary><b>Release notes</b></summary>
<br/>
<details>
<summary>Package name: <b>@babel/core</b></summary>
<ul>
<li>
<b>7.21.0</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.21.0">2023-02-20</a></br><h2>v7.21.0
(2023-02-20)</h2>
<p>Thanks <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/azizghuloum/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/azizghuloum">@ azizghuloum</a>, <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/ehoogeveen-medweb/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/ehoogeveen-medweb">@
ehoogeveen-medweb</a>, <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/fwienber/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/fwienber">@ fwienber</a>, and <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/Lioness100/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/Lioness100">@ Lioness100</a> for
your first PRs!</p>
<h4><g-emoji class="g-emoji" alias="rocket"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji>
New Feature</h4>
<ul>
<li><code>babel-core</code>,
<code>babel-helper-create-class-features-plugin</code>,
<code>babel-plugin-proposal-class-properties</code>,
<code>babel-plugin-proposal-private-methods</code>,
<code>babel-plugin-proposal-private-property-in-object</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15435"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15435/hovercard">#15435</a> feat:
Implement <code>privateFieldsAsSymbols</code> assumption for classes (<a
href="https://snyk.io/redirect/github/fwienber">@ fwienber</a>)</li>
</ul>
</li>
<li><code>babel-helper-create-regexp-features-plugin</code>,
<code>babel-plugin-proposal-regexp-modifiers</code>,
<code>babel-standalone</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15226"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15226/hovercard">#15226</a> feat:
Support regexp modifiers proposal (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-cli</code>, <code>babel-core</code>,
<code>babel-generator</code>,
<code>babel-plugin-transform-destructuring</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-react-jsx</code>,
<code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15022"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15022/hovercard">#15022</a> feat:
Generate sourcemaps of friendly call frames (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-parser</code>, <code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15384"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15384/hovercard">#15384</a> [ts]
Support <code>const</code> modifier in type parameters (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-helpers</code>,
<code>babel-parser</code>,
<code>babel-plugin-proposal-decorators</code>,
<code>babel-plugin-syntax-decorators</code>,
<code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>,
<code>babel-runtime</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15405"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15405/hovercard">#15405</a>
Implement decorators as presented at <code>2023-01</code> TC39 meeting
(<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15114"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15114/hovercard">#15114</a> Parser
option to allow <code>new.target</code> outside functions (<a
href="https://snyk.io/redirect/github/overlookmotel">@
overlookmotel</a>)</li>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15320"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15320/hovercard">#15320</a> Add
<code>annexb: false</code> parser option to disable Annex B (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-core</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15283"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15283/hovercard">#15283</a> feat:
Support <code>.cts</code> as configuration file (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>,
<code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15381"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15381/hovercard">#15381</a> [ts]
Support <code>export type * from</code> (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4><g-emoji class="g-emoji" alias="bug"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji>
Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15379"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15379/hovercard">#15379</a>
[ts5.0] Better inlining of constants in enums (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-core</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15366"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15366/hovercard">#15366</a>
handling circular/shared structures in deep-clone (<a
href="https://snyk.io/redirect/github/azizghuloum">@
azizghuloum</a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>,
<code>babel-plugin-proposal-class-properties</code>,
<code>babel-plugin-proposal-class-static-block</code>,
<code>babel-plugin-proposal-private-methods</code>,
<code>babel-plugin-transform-classes</code>,
<code>babel-plugin-transform-new-target</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15406"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15406/hovercard">#15406</a>
Preserve class elements comments in class transform (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-parser</code>,
<code>babel-plugin-transform-flow-comments</code>,
<code>babel-plugin-transform-flow-strip-types</code>,
<code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15414"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15414/hovercard">#15414</a> [ts]
Fix restrictions for optional parameters (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4><g-emoji class="g-emoji" alias="nail_care"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f485.png">💅</g-emoji>
Polish</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15400"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15400/hovercard">#15400</a>
polish: improve "<code>await</code> as identifier" error in modules (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
</ul>
<h4><g-emoji class="g-emoji" alias="house"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3e0.png">🏠</g-emoji>
Internal</h4>
<ul>
<li><code>babel-core</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15137"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15137/hovercard">#15137</a>
Improve CJS compat with ESM-based <code>@ babel/core</code> (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4><g-emoji class="g-emoji" alias="microscope"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f52c.png">🔬</g-emoji>
Output optimization</h4>
<ul>
<li><code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15418"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15418/hovercard">#15418</a> [ts]
Handle exponentiation operator in constant folding (<a
href="https://snyk.io/redirect/github/ehoogeveen-medweb">@
ehoogeveen-medweb</a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 11</h4>
<ul>
<li>Abdulaziz Ghuloum (<a
href="https://snyk.io/redirect/github/azizghuloum">@
azizghuloum</a>)</li>
<li>Babel Bot (<a href="https://snyk.io/redirect/github/babel-bot">@
babel-bot</a>)</li>
<li>Emanuel Hoogeveen (<a
href="https://snyk.io/redirect/github/ehoogeveen-medweb">@
ehoogeveen-medweb</a>)</li>
<li>Frank Wienberg (<a href="https://snyk.io/redirect/github/fwienber">@
fwienber</a>)</li>
<li>Huáng Jùnliàng (<a href="https://snyk.io/redirect/github/JLHwung">@
JLHwung</a>)</li>
<li>Mateusz Burzyński (<a
href="https://snyk.io/redirect/github/Andarist">@ Andarist</a>)</li>
<li>Nicolò Ribaudo (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
<li><a href="https://snyk.io/redirect/github/Lioness100">@
Lioness100</a></li>
<li><a href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a></li>
<li><a href="https://snyk.io/redirect/github/overlookmotel">@
overlookmotel</a></li>
<li>fisker Cheung (<a href="https://snyk.io/redirect/github/fisker">@
fisker</a>)</li>
</ul>
</li>
<li>
<b>7.20.12</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.20.12">2023-01-04</a></br><h2>v7.20.12
(2023-01-04)</h2>
<p>Thanks <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/cross19xx/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/cross19xx">@ cross19xx</a>, <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/JBYoshi/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/JBYoshi">@ JBYoshi</a> and <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/nmn/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/nmn">@ nmn</a> for your first
PRs!</p>
<h4><g-emoji class="g-emoji" alias="bug"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji>
Bug Fix</h4>
<ul>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15224"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15224/hovercard">#15224</a> Fix
<code>TaggedTemplateLiteral</code> evaluation (<a
href="https://snyk.io/redirect/github/nmn">@ nmn</a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>,
<code>babel-plugin-proposal-class-properties</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15312"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15312/hovercard">#15312</a> fix:
<code>delete this</code> in static class properties initialization (<a
href="https://snyk.io/redirect/github/SuperSodaSea">@
SuperSodaSea</a>)</li>
</ul>
</li>
</ul>
<h4><g-emoji class="g-emoji" alias="nail_care"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f485.png">💅</g-emoji>
Polish</h4>
<ul>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15313"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15313/hovercard">#15313</a>
Implement support for evaluating computed properties. (<a
href="https://snyk.io/redirect/github/JBYoshi">@ JBYoshi</a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 5</h4>
<ul>
<li>Jonathan Browne (<a href="https://snyk.io/redirect/github/JBYoshi">@
JBYoshi</a>)</li>
<li>Kenneth Kwakye-Gyamfi (<a
href="https://snyk.io/redirect/github/cross19xx">@ cross19xx</a>)</li>
<li>Naman Goel (<a href="https://snyk.io/redirect/github/nmn">@
nmn</a>)</li>
<li>Nicolò Ribaudo (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
<li>Tianlan Zhou (<a
href="https://snyk.io/redirect/github/SuperSodaSea">@
SuperSodaSea</a>)</li>
</ul>
</li>
</ul>
from <a
href="https://snyk.io/redirect/github/babel/babel/releases">@babel/core
GitHub release notes</a>
</details>
</details>
<hr/>
**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: <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIxMjFlNDk2Mi01NjQ2LTRjNzEtYmY1My02ZTg1MWE1YzNiMTciLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjEyMWU0OTYyLTU2NDYtNGM3MS1iZjUzLTZlODUxYTVjM2IxNyJ9fQ=="
width="0" height="0"/>
🧐 [View latest project
report](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55?utm_source=github&utm_medium=referral&page=upgrade-pr)
🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr)
🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55/settings/integration?pkg=@babel/core&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades)
<!---
(snyk:metadata:{"prId":"121e4962-5646-4c71-bf53-6e851a5c3b17","prPublicId":"121e4962-5646-4c71-bf53-6e851a5c3b17","dependencies":[{"name":"@babel/core","from":"7.20.12","to":"7.21.0"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"852e6e4f-be96-45c8-b370-1060f5ebee55","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2023-02-20T15:31:22.823Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]})
--->
---------
Co-authored-by: snyk-bot <[email protected]>
This line of code causes a type error since
TaggedTemplateLiterals do not have a property called "expressions".This change does what is probably expected. However, to maintain the existing behaviour, the line should instead be: