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

Improve array destructuring spec compliance #15183

Merged
merged 15 commits into from Nov 25, 2022

Conversation

SuperSodaSea
Copy link
Contributor

@SuperSodaSea SuperSodaSea commented Nov 10, 2022

Q                       A
Fixed Issues? Fixes #15154, Fixes #15168
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Spec compliance

  • Empty array destructuring is transformed into slicedToArray(arr, 0) instead of toArray(arr)
  • Empty array destructuring should check the iterator (result of [Symbol.iterator]()) is an object
  • Empty array destructuring should not call the next() on the iterator
  • Empty array destructuring should call the return() on the iterator, and check if it returns an object
  • Iterator's next should be evaluated once and only once, even if the next() is not called

Tests

  • babel-plugin-transform-destructuring/test/fixtures/destructuring/check-iterator-return
  • babel-plugin-transform-destructuring/test/fixtures/destructuring/empty-array-pattern
  • babel-plugin-transform-destructuring/test/fixtures/destructuring/next-eval-once
  • babel-plugin-transform-destructuring/test/fixtures/regression/15154
  • babel-plugin-transform-destructuring/test/fixtures/regression/15168

@liuxingbaoyu liuxingbaoyu added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Nov 10, 2022
@babel-bot
Copy link
Collaborator

babel-bot commented Nov 10, 2022

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53508/

Copy link
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SuperSodaSea
Copy link
Contributor Author

Oh, I missed i.return, let me fix it...

_n = false;
return _arr;
}
for (; !(_n = (_s = _i.next()).done); _n = true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm from mobile so this code might be completely wrong, but does it work?

for (_i = _i.call(arr); i < _arr.length && !(_n = (_s = _i.next()).done); _n = true) {
  _arr.push(_s.value);
}

We should try keeping these helpers as small as possible :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I change it to this:

try {
  for (_i = _i.call(arr); _arr.length < i && !(_n = (_s = _i.next()).done); _n = true) {
    _arr.push(_s.value);
  }
  if (i === 0) {
    if (Object(_i) !== _i) return;
    _n = false;
  }
} // ...

Does this looks good?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that seems to be not working since the order of _n = true is changed... I'll revert the change.

try {
  _i = _i.call(arr);
  if (i === 0) {
    if (Object(_i) !== _i) return;
    _n = false;
  } else {
    for (; !(_n = (_s = _i.next()).done); _n = true) {
      _arr.push(_s.value);
      if(_arr.length === i) break;
    }
  }
} // ...

for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_i = _i.call(arr);
if (i === 0) {
if (typeof _i !== "object" && typeof _i !== "function") return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Object(_i) !== _i, which checks for both functions and objects but it excludes null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@liuxingbaoyu
Copy link
Member

@SuperSodaSea
Copy link
Contributor Author

@liuxingbaoyu Sure, I'll add tests for #15154 and #15168 later.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Nov 11, 2022

I found another related bug:

let gets = 0;
let it = {
  [Symbol.iterator]: () => ({
    nextDone: false,
    get next() {
      gets++;
      return () => {
        if (this.nextDone) return { done: true, value: 2 };
        this.nextDone = true;
        return { done: false, value: 0 }
      };
    }
  }),
}

let [a, b] = it;
expect(gets).toBe(1);

gets = 0;
let [] = it;
expect(gets).toBe(1);

gets is currently first 2 and then 0.

I think we can solve it by pre-reading .next:

    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e, _x;
    try {
      for (_x = (_i = _i.call(arr)).next; _arr.length < i && && !(_n = (_s = _x.call(i)).done); _n = true) {
        _arr.push(_s.value);
      }
    }

by doing so we also get "is _i an object?" check automatically when reading _i.next.

for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
_arr.push(_step.value);
_i = _i.call(arr);
if (i === 0) {
if (Object(_i) !== _i) return;
return _arr;
}
for (var _s; !(_s = _i.next()).done;) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the loose helper does not need to be 100% spec compliant, is this enough to avoid infinite loops?

for (_i = _i.call(arr), _step; arr.length < i && !(_step = _i.next()).done;) {
  _arr.push(_step.value);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable declaration of _step seems to be missing in the original implementation (put it in the first expression of for seems to be useless?), so I think the correct code should be this:

var _s;
for (_i = _i.call(arr); arr.length < i && !(_s = _i.next()).done; ) {
  _arr.push(_s.value);
}

Committed in 4f951f3.

@nicolo-ribaudo
Copy link
Member

This PR is fixing a lot of test262 failures!

# 0 new failures, 226 new successes

https://github.com/babel/babel/actions/runs/3441979778/jobs/5742297076#step:14:459

@SuperSodaSea
Copy link
Contributor Author

@nicolo-ribaudo I think we still need the "is an object" check, for example 'foo'.next is undefined instead of throwing TypeError.

By the way, is there a place that shows the overall test262 result of Babel?

@SuperSodaSea
Copy link
Contributor Author

@liuxingbaoyu Tests for #15154 and #15168 are added!


Also I found another bug, we should check whether the return() returns an object:

expect(() => {
  var [] = {
    [Symbol.iterator]: () => {
      return {
        // Should throw TypeError when `return()` returns undefined
        return: () => {},
      };
    },
  };
}).toThrow(TypeError);

expect(() => {
  var [] = {
    [Symbol.iterator]: () => {
      return {
        // Should not throw when `return()` returns an object
        return: () => ({}),
      };
    },
  };
}).not.toThrow();
- if (!_n && _i["return"] != null) _i["return"]();
+ if (!_n && _i["return"] != null) {
+   _r = _i["return"]();
+   if (Object(_r) !== _r) return;
+ }

And we got 226 -> 254 new successes in test262 now!

@SuperSodaSea SuperSodaSea changed the title fix: Empty array destructuring shouldn't call next() fix: Array destructuring spec compliance Nov 11, 2022
@liuxingbaoyu
Copy link
Member

By the way, is there a place that shows the overall test262 result of Babel?

You can download the artifact in .tap format, or see how many successes and failures there are in CI, there is no visualization yet.
https://github.com/babel/babel/actions/runs/3445535140

@SuperSodaSea
Copy link
Contributor Author

@nicolo-ribaudo The next is only evaluated only once now :) The code now looks like this:

try {
_x = (_i = _i.call(arr)).next;
if (i === 0) {
if (Object(_i) !== _i) return;
_n = false;
} else {
for (; !(_n = (_s = _x.call(_i)).done); _n = true) {
_arr.push(_s.value);
if(_arr.length === i) break;
}
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) {
_r = _i["return"]();
if (Object(_r) !== _r) return;
}
} finally {
if (_d) throw _e;
}
}

Noticing that when break the _n should be false, so _arr.length < i can't be put in the for condition.

@SuperSodaSea
Copy link
Contributor Author

Are there any further changes needed for this PR?

Copy link
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the great work you put into this!

@liuxingbaoyu
Copy link
Member

@SuperSodaSea Let's wait, Nicolò is sick, so it might be a while before he can review this.🙂

@SuperSodaSea
Copy link
Contributor Author

Oh, I'm sorry to hear that. Hope he can make a full recovery soon🙏

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! :)

@nicolo-ribaudo
Copy link
Member

# 0 new failures, 254 new successes

@nicolo-ribaudo nicolo-ribaudo changed the title fix: Array destructuring spec compliance Improve array destructuring spec compliance Nov 25, 2022
@nicolo-ribaudo nicolo-ribaudo merged commit f8b47f9 into babel:main Nov 25, 2022
54 checks passed
@nicolo-ribaudo nicolo-ribaudo added PR: Spec Compliance 👓 A type of pull request used for our changelog categories and removed PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Nov 25, 2022
@SuperSodaSea SuperSodaSea deleted the fix/15168 branch November 25, 2022 08:17
cbush pushed a commit to mongodb/docs-realm that referenced this pull request Jan 13, 2023
<h3>Snyk has created this PR to upgrade @babel/core from 7.20.5 to
7.20.7.</h3>

ℹ️ 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 **22 days ago**, on 2022-12-22.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@babel/core</b></summary>
    <ul>
      <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
&amp; 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>
      <li>
<b>7.20.5</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.20.5">2022-11-28</a></br><h2>v7.20.5
(2022-11-28)</h2>
<p>Thanks <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/davydof/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/davydof">@ davydof</a> and <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/SuperSodaSea/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/SuperSodaSea">@ SuperSodaSea</a>
for your first PRs!</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-helpers</code>,
<code>babel-plugin-transform-destructuring</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-preset-env</code>, <code>babel-runtime-corejs2</code>,
<code>babel-runtime-corejs3</code>, <code>babel-runtime</code>,
<code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15183"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15183/hovercard">#15183</a>
Improve array destructuring spec compliance (<a
href="https://snyk.io/redirect/github/SuperSodaSea">@
SuperSodaSea</a>)</li>
</ul>
</li>
<li><code>babel-cli</code>, <code>babel-helpers</code>,
<code>babel-plugin-proposal-class-properties</code>,
<code>babel-plugin-proposal-class-static-block</code>,
<code>babel-plugin-transform-classes</code>,
<code>babel-plugin-transform-runtime</code>,
<code>babel-preset-env</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15182"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15182/hovercard">#15182</a> fix:
apply toPropertyKey when defining class members (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>,
<code>babel-helpers</code>,
<code>babel-plugin-proposal-decorators</code>,
<code>babel-plugin-proposal-private-property-in-object</code>,
<code>babel-preset-env</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/15133"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15133/hovercard">#15133</a> fix:
validate rhs of <code>in</code> when transpiling <code>#p in C</code>
(<a href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</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>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15225"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15225/hovercard">#15225</a> Parse
<code>using[foo]</code> as computed member expression (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15207"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15207/hovercard">#15207</a> Export
<code>ParseResult</code> type (<a
href="https://snyk.io/redirect/github/davydof">@ davydof</a>)</li>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15198"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15198/hovercard">#15198</a> fix:
parse <code>import module, ...</code> (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-helper-wrap-function</code>,
<code>babel-preset-env</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15181"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15181/hovercard">#15181</a> fix:
Edge cases for async functions and <code>noNewArrow</code> assumption
(<a href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-arrow-functions</code>,
<code>babel-plugin-transform-parameters</code>,
<code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15163"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15163/hovercard">#15163</a> fix:
Throw error when compiling <code>super()</code> in arrow functions with
default / rest parameters (<a
href="https://snyk.io/redirect/github/SuperSodaSea">@
SuperSodaSea</a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-node</code>,
<code>babel-plugin-proposal-async-generator-functions</code>,
<code>babel-plugin-transform-regenerator</code>,
<code>babel-preset-env</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/15194"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15194/hovercard">#15194</a> fix:
Bump <code>regenerator</code> and add tests (<a
href="https://snyk.io/redirect/github/SuperSodaSea">@
SuperSodaSea</a>)</li>
</ul>
</li>
<li><code>babel-helper-create-regexp-features-plugin</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15192"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15192/hovercard">#15192</a> fix:
Update <code>regjsparser</code> for <code>@ babel/standalone</code> (<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/15109"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15109/hovercard">#15109</a> fix:
Babel 8 types (<a href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15143"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15143/hovercard">#15143</a> Don't
print inner comments as leading when wrapping in <code>(``)</code> (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-block-scoping</code>,
<code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15167"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15167/hovercard">#15167</a>
Register <code>switch</code>'s <code>discriminant</code> in the outer
scope (<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-generator</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15173"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15173/hovercard">#15173</a>
Improve generator behavior when <code>comments:false</code> (<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/15164"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15164/hovercard">#15164</a> Only
extract IDs for TDZ checks in assign when necessary (<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-core</code>, <code>babel-parser</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15202"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15202/hovercard">#15202</a> Bump
typescript to 4.9.3 (<a href="https://snyk.io/redirect/github/JLHwung">@
JLHwung</a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 6</h4>
<ul>
<li>Alexander Davydov (<a
href="https://snyk.io/redirect/github/davydof">@ davydof</a>)</li>
<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>
</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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJiMmQyZGFlZi1hOTc4LTRkMTMtOWVlNS05ZjQ4MjA3ZDRlNDkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImIyZDJkYWVmLWE5NzgtNGQxMy05ZWU1LTlmNDgyMDdkNGU0OSJ9fQ=="
width="0" height="0"/>

🧐 [View latest project
report](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/sandbox-2ba/project/852e6e4f-be96-45c8-b370-1060f5ebee55/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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&#x3D;@babel/core&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

<!---
(snyk:metadata:{"prId":"b2d2daef-a978-4d13-9ee5-9f48207d4e49","prPublicId":"b2d2daef-a978-4d13-9ee5-9f48207d4e49","dependencies":[{"name":"@babel/core","from":"7.20.5","to":"7.20.7"}],"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":"2022-12-22T09:45:37.638Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]})
--->

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Spec Compliance 👓 A type of pull request used for our changelog categories
Projects
None yet
4 participants