GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support transforming `import source` for wasm by nicolo-ribaudo · Pull Request #15870 · babel/babel

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Aug 16, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? Yes
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This proposal is stage 3, and (at least for Wasm modules) we can compile it to WebAssembly.compileStreaming + fetch in the browser and WebAssembly.compile + readFile in Node.js. Wasm are the only modules for which there is currently a source import, so this is a safe limitation.

While working on this PR I learned that Node.js does not support fetching from file:// URLs, and that increases the complexity of the transform, based on the targets:

  • for browsers and Deno we use await WebAssembly.compileStreaming(fetch(...))
  • for Node.js in import statements we use new WebAssembly.Module(fs.readFileSync(...)) (which does not introduce TLA in the module, so it's more compliant to the spec)
  • for Node.js in dynamic import we use await WebAssembly.compile(await fs.promises.readFile(...))

In addition to that, we should use import.meta.resolve but we need a fallback for old environments where it's not supported.

This plugin does not work everywhere, for example when bundling to webpack you need to transform import source x from "x" to import raw from "!!raw-loader!./x.wasm";; const x = WebAssembly.compile(raw);. However, other cases can be handled by community plugins.

cc @lucacasonato @guybedford

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nicolo-ribaudo nicolo-ribaudo added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Aug 16, 2023
@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Aug 16, 2023
Import-related updates for 7.23.0 #15830
Merged
8 tasks done
@babel-bot

babel-bot commented Aug 16, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo
nicolo-ribaudo force-pushed the feat-7.23.0/imports branch from 578a350 to bc5b525 Compare August 16, 2023 14:44
@nicolo-ribaudo
nicolo-ribaudo force-pushed the wasm-source-to-wasm branch from 3a6e81e to 8409749 Compare August 16, 2023 14:46
@guybedford

guybedford commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

Node.js branching is a common problem here, I would recommend handling it fully if possible? See for example https://github.com/bytecodealliance/jco/blob/main/crates/js-component-bindgen/src/intrinsics.rs#L123.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo

nicolo-ribaudo commented Aug 17, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@guybedford I was thinking that maybe for Node.js we would want it to be synchronous, so that it can be compiled to CommonJS. Something like a @babel/plugin-proposal-import-source-to-node that transforms

import source x from "./x";

to

import { readFileSync } from "fs";
const x = WebAssembly.compile(readFileSync(import.meta.resolve("./x")));
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo

nicolo-ribaudo commented Aug 17, 2023

Copy link
Copy Markdown
Member Author

Actually, maybe it would be better to keep this plugin outside of the Babel org since it's Wasm/fetch-specific and not just based on ECMAScript 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@liuxingbaoyu

liuxingbaoyu commented Aug 17, 2023

Copy link
Copy Markdown
Member

Actually, maybe it would be better to keep this plugin outside of the Babel org since it's Wasm/fetch-specific and not just based on ECMAScript 🤔

Technically I agree with this, but actually I think it would be nice to have it in the main repo too. (Shared test/release process, and more convenient modification and compatibility)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo

nicolo-ribaudo commented Aug 21, 2023

Copy link
Copy Markdown
Member Author

I have been thinking about this more, and there are 4 possible transforms for import source x from "./x.wasm" depending on the target:

  • ESM + browsers
    const url = import.meta.resolve("./x.wasm", import.meta.url);
    const x = await WebAssembly.compileStreaming(fetch(url));
  • ESM + Node.js (this could also be asynchronous, but it's less spec compliant)
    import { createRequire } from "module";
    import fs from "fs";
    const path = createRequire(import.meta.url).resolve("./x.wasm");
    const x = WebAssembly.compile(fs.readFileSync(path));
  • CJS + Node.js
    const fs = require("fs");
    const path = require.resolve("./x.wasm");
    const x = WebAssembly.compile(fs.readFileSync(path));
  • Webpack
    import raw from "!!raw-loader!./x.wasm";
    const x = WebAssembly.compile(raw);
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@guybedford

guybedford commented Aug 31, 2023

Copy link
Copy Markdown
Contributor

For the ESM case, it can be useful to have a hybrid Node.js / browser output like I provided when eg creating a library on npm that supports both Node.js and browsers.

nicolo-ribaudo reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo
nicolo-ribaudo force-pushed the feat-7.23.0/imports branch from bc5b525 to 90e9c58 Compare September 5, 2023 12:38
@nicolo-ribaudo
nicolo-ribaudo force-pushed the feat-7.23.0/imports branch from 90e9c58 to c5badb5 Compare September 14, 2023 11:04
@nicolo-ribaudo
nicolo-ribaudo force-pushed the wasm-source-to-wasm branch from 8fce167 to 7efa361 Compare September 14, 2023 15:39
@nicolo-ribaudo nicolo-ribaudo changed the title Support tranforming import source for wasm to fetch Support tranforming import source for wasm for browsers&node Sep 14, 2023
@nicolo-ribaudo nicolo-ribaudo changed the title Support tranforming import source for wasm for browsers&node Support tranforming import source for wasm Sep 14, 2023
@nicolo-ribaudo

nicolo-ribaudo commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

@guybedford I added support for Node.js (we now have Web, Node, or Web+Node output). Could you review the generated code? 🙏

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nicolo-ribaudo
nicolo-ribaudo commented Sep 14, 2023
View reviewed changes
Comment thread packages/babel-plugin-proposal-import-wasm-source/src/index.ts
},
};

function buildHelper(toCommonJS: boolean) {

@nicolo-ribaudo nicolo-ribaudo Sep 14, 2023

Copy link
Copy Markdown
Member Author

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.

The nodes generated by this function are not in @babel/helpers because they are highly dynamic (there are 13 possible cases), and they use import.meta which is module-dependent.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo nicolo-ribaudo Sep 21, 2023

Copy link
Copy Markdown
Member Author

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.

Given that it's very likely that files would include just one .wasm import (I have never seen even whole packages with two .wasm entry points :) ), in the general case this would just make the code slightly bigger.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

liuxingbaoyu reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@nicolo-ribaudo nicolo-ribaudo Sep 21, 2023

Copy link
Copy Markdown
Member Author

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.

Btw, I would expect the community to come up with their own bundler-specific plugins, such as the webpack output I showed above. It makes it possible to have much more bundler-integrated support!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

liuxingbaoyu reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
guybedford
guybedford approved these changes Sep 14, 2023
View reviewed changes

@guybedford guybedford left a comment

Copy link
Copy Markdown
Contributor

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.

Seems good to me! Nice to get proper integration with the env targets. Are the version checks for import.meta.resolve reliable?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nicolo-ribaudo

nicolo-ribaudo commented Sep 15, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@guybedford Are the version checks for import.meta.resolve reliable?

Hopefully :) It's data from MDN. If it's wrong, its a bug similar to how if compat data for any other plugin was wrong.

@liuxingbaoyu Technically I agree with this, but actually I think it would be nice to have it in the main repo too. (Shared test/release process, and more convenient modification and compatibility)

Now that the plugin is more complete, I'm ok with including it in this repository :)
Also, this is the only syntactic Stage 3 proposal that we do not currently support.

guybedford reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo
nicolo-ribaudo force-pushed the feat-7.23.0/imports branch from c5badb5 to 65a6e85 Compare September 18, 2023 13:44
@nicolo-ribaudo
nicolo-ribaudo force-pushed the wasm-source-to-wasm branch from 4f70bd7 to 923e4b6 Compare September 18, 2023 13:46
@nicolo-ribaudo
nicolo-ribaudo requested a review from JLHwung September 18, 2023 17:27
liuxingbaoyu
liuxingbaoyu approved these changes Sep 21, 2023
View reviewed changes
Comment thread packages/babel-plugin-proposal-import-wasm-source/package.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...sal-import-wasm-source/test/fixtures/node-esm/import-expression-dynamic-specifier/output.mjs
@@ -0,0 +1,2 @@
import { promises as _promises } from "fs";

@liuxingbaoyu liuxingbaoyu Sep 21, 2023

Copy link
Copy Markdown
Member

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.

Would import fs from "fs"; be better?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@nicolo-ribaudo nicolo-ribaudo Sep 21, 2023

Copy link
Copy Markdown
Member Author

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.

Maybe? Given that this is the node-specific output both would be ok.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Jabriilmohame Jabriilmohame Dec 20, 2023

Copy link
Copy Markdown

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.

1000

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...osal-import-wasm-source/test/fixtures/node-cjs/import-expression-dynamic-specifier/output.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/babel-plugin-proposal-import-wasm-source/src/index.ts
},
};

function buildHelper(toCommonJS: boolean) {

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

liuxingbaoyu
liuxingbaoyu reviewed Sep 21, 2023
View reviewed changes
Comment thread ...ource/test/fixtures/browser-and-node-esm/import-meta-resolve-fallback-for-browser/output.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo

nicolo-ribaudo commented Sep 21, 2023

Copy link
Copy Markdown
Member Author

@liuxingbaoyu I still replaced process.versions.node with process.versions?.node, in case somebody has a bundler that replaces process with an object without the versions property, or that replaces process.versions with undefined.

liuxingbaoyu and Jabriilmohame reacted with thumbs up emoji liuxingbaoyu and Jabriilmohame reacted with heart emoji
All reactions
  • 👍 2 reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo nicolo-ribaudo added this to the v7.23.0 milestone Sep 21, 2023
JLHwung
JLHwung approved these changes Sep 21, 2023
View reviewed changes
Comment thread packages/babel-plugin-proposal-import-wasm-source/src/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@JLHwung JLHwung added PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release PR: Needs Docs labels Sep 21, 2023
nicolo-ribaudo and others added 9 commits September 23, 2023 16:54
@nicolo-ribaudo
Support tranforming import source for wasm to fetch
d0a843f
@nicolo-ribaudo
Do not memoize, since only one is executed
b30ea1d
@nicolo-ribaudo
Browsers & node
6755691
@nicolo-ribaudo
Fix yarn constraints
e5a4755
@nicolo-ribaudo
Update readme
bd0f31e
@nicolo-ribaudo
Fix test
4d53cc1
@nicolo-ribaudo
Update package.json
c0dc422
@nicolo-ribaudo
Stringify specifier synchronously in case of dynamic specifier
91f5fed
@nicolo-ribaudo
process.versions?.node
28b8e8e
@nicolo-ribaudo
nicolo-ribaudo force-pushed the wasm-source-to-wasm branch from 6b1db92 to 28b8e8e Compare September 23, 2023 07:54
nicolo-ribaudo added 2 commits September 23, 2023 17:47
@nicolo-ribaudo
Update fixtures
be09b57
@nicolo-ribaudo
Rename syntax plugin for consistency with import defer
1ae288e
@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Sep 23, 2023
Add docs for new 7.23.0 plugins babel/website#2828
Merged
@nicolo-ribaudo nicolo-ribaudo removed the PR: Needs Docs label Sep 25, 2023
@nicolo-ribaudo
Update tsconfig.json
ab31c22
@nicolo-ribaudo
nicolo-ribaudo merged commit 9d9ec58 into babel:feat-7.23.0/imports Sep 25, 2023
@nicolo-ribaudo
nicolo-ribaudo deleted the wasm-source-to-wasm branch September 25, 2023 06:19
nicolo-ribaudo added a commit that referenced this pull request Sep 25, 2023
@nicolo-ribaudo
Support transforming import source for wasm (#15870)
611c9e5
@nicolo-ribaudo nicolo-ribaudo changed the title Support tranforming import source for wasm Support transforming import source for wasm Sep 25, 2023
nicolo-ribaudo added a commit that referenced this pull request Sep 25, 2023
@nicolo-ribaudo
Support transforming import source for wasm (#15870)
310b201
nicolo-ribaudo added a commit that referenced this pull request Sep 25, 2023
@nicolo-ribaudo
Support transforming import source for wasm (#15870)
a38e0fd
@Omrisnyk Omrisnyk mentioned this pull request Oct 16, 2023
[Snyk] Security upgrade @babel/traverse from 7.0.0 to 7.23.2 Omrisnyk/npm-lockfiles#121
Open
Woodpile37 added a commit to Woodpile37/ethers.js that referenced this pull request Oct 17, 2023
@Woodpile37
[Snyk] Upgrade: @babel/parser, @babel/types (#99)
d44c28b
<p>This PR was automatically created by Snyk using the credentials of a
real user.</p><br /><h3>Snyk has created this PR to upgrade multiple
dependencies.</h3>
👯‍♂ The following dependencies are linked and will therefore be updated
together.
</br></br>
: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.
</br></br>

 Name         | Versions     | Released on
:-------------|:-------------|:-------------
**@babel/parser**</br>from 7.22.16 to 7.23.0 | **1 version** ahead of
your current version | **22 days ago**</br>on 2023-09-25
**@babel/types**</br>from 7.22.19 to 7.23.0 | **1 version** ahead of
your current version | **22 days ago**</br>on 2023-09-25



<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@babel/parser</b></summary>
    <ul>
      <li>
<b>7.23.0</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.23.0">2023-09-25</a></br><h2>v7.23.0
(2023-09-25)</h2>
<p>Thanks <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/lorenzoferre/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/lorenzoferre">@ lorenzoferre</a>
and <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/RajShukla1/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/RajShukla1">@ RajShukla1</a> for
your first PRs!</p>
<h4>🚀 New Feature</h4>
<ul>
<li><code>babel-plugin-proposal-import-wasm-source</code>,
<code>babel-plugin-syntax-import-source</code>,
<code>babel-plugin-transform-dynamic-import</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15870"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15870/hovercard">#15870</a>
Support transforming <code>import source</code> for wasm (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-helper-module-transforms</code>,
<code>babel-helpers</code>,
<code>babel-plugin-proposal-import-defer</code>,
<code>babel-plugin-syntax-import-defer</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>,
<code>babel-runtime</code>, <code>babel-standalone</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15878"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15878/hovercard">#15878</a>
Implement <code>import defer</code> proposal transform support (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>,
<code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15845"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15845/hovercard">#15845</a>
Implement <code>import defer</code> parsing support (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15829"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15829/hovercard">#15829</a> Add
parsing support for the "source phase imports" proposal (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>,
<code>babel-helper-module-transforms</code>, <code>babel-parser</code>,
<code>babel-plugin-transform-dynamic-import</code>,
<code>babel-plugin-transform-modules-amd</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-modules-systemjs</code>,
<code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15682"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15682/hovercard">#15682</a> Add
<code>createImportExpressions</code> parser option (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-standalone</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15671"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15671/hovercard">#15671</a> Pass
through nonce to the transformed script element (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-helper-function-name</code>,
<code>babel-helper-member-expression-to-functions</code>,
<code>babel-helpers</code>, <code>babel-parser</code>,
<code>babel-plugin-proposal-destructuring-private</code>,
<code>babel-plugin-proposal-optional-chaining-assign</code>,
<code>babel-plugin-syntax-optional-chaining-assign</code>,
<code>babel-plugin-transform-destructuring</code>,
<code>babel-plugin-transform-optional-chaining</code>,
<code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>,
<code>babel-runtime</code>, <code>babel-standalone</code>,
<code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15751"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15751/hovercard">#15751</a> Add
support for optional chain in assignments (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>,
<code>babel-plugin-proposal-decorators</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15895"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15895/hovercard">#15895</a>
Implement the "decorator metadata" proposal (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15893"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15893/hovercard">#15893</a> Add
<code>t.buildUndefinedNode</code> (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-preset-typescript</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15913"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15913/hovercard">#15913</a> Add
<code>rewriteImportExtensions</code> option to TS preset (<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/15896"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15896/hovercard">#15896</a> Allow
TS tuples to have both labeled and unlabeled elements (<a
href="https://snyk.io/redirect/github/yukukotani">@ yukukotani</a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-block-scoping</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15962"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15962/hovercard">#15962</a> fix:
<code>transform-block-scoping</code> captures the variables of the
method in the loop (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15797"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15797/hovercard">#15797</a> Expand
evaluation of global built-ins in <code>@ babel/traverse</code> (<a
href="https://snyk.io/redirect/github/lorenzoferre">@
lorenzoferre</a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-explicit-resource-management</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15985"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15985/hovercard">#15985</a>
Improve source maps for blocks with <code>using</code> declarations (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4>🔬 Output optimization</h4>
<ul>
<li><code>babel-core</code>,
<code>babel-helper-module-transforms</code>,
<code>babel-plugin-transform-async-to-generator</code>,
<code>babel-plugin-transform-classes</code>,
<code>babel-plugin-transform-dynamic-import</code>,
<code>babel-plugin-transform-function-name</code>,
<code>babel-plugin-transform-modules-amd</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-modules-umd</code>,
<code>babel-plugin-transform-parameters</code>,
<code>babel-plugin-transform-react-constant-elements</code>,
<code>babel-plugin-transform-react-inline-elements</code>,
<code>babel-plugin-transform-runtime</code>,
<code>babel-plugin-transform-typescript</code>,
<code>babel-preset-env</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15984"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15984/hovercard">#15984</a> Inline
<code>exports.XXX =</code> update in simple variable declarations (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 7</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>Lorenzo Ferretti (<a
href="https://snyk.io/redirect/github/lorenzoferre">@
lorenzoferre</a>)</li>
<li>Nicolò Ribaudo (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
<li>Raj Pawan Shukla (<a
href="https://snyk.io/redirect/github/RajShukla1">@ RajShukla1</a>)</li>
<li>Yuku Kotani (<a href="https://snyk.io/redirect/github/yukukotani">@
yukukotani</a>)</li>
<li><a href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a></li>
</ul>
      </li>
      <li>
<b>7.22.16</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.22.16">2023-09-06</a></br><h2>v7.22.16
(2023-09-06)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15935"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15935/hovercard">#15935</a> fix:
<code>__esModule</code> is missing from published <code>@
babel/parser</code> (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15936"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15936/hovercard">#15936</a> Skip
deprecation warning tests when in a folder named <code>@ babel</code>
(<a href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 3</h4>
<ul>
<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><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/parser
GitHub release notes</a>
  </details>
  <details>
    <summary>Package name: <b>@babel/types</b></summary>
    <ul>
      <li>
<b>7.23.0</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.23.0">2023-09-25</a></br><h2>v7.23.0
(2023-09-25)</h2>
<p>Thanks <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/lorenzoferre/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/lorenzoferre">@ lorenzoferre</a>
and <a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/RajShukla1/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/RajShukla1">@ RajShukla1</a> for
your first PRs!</p>
<h4>🚀 New Feature</h4>
<ul>
<li><code>babel-plugin-proposal-import-wasm-source</code>,
<code>babel-plugin-syntax-import-source</code>,
<code>babel-plugin-transform-dynamic-import</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15870"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15870/hovercard">#15870</a>
Support transforming <code>import source</code> for wasm (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-helper-module-transforms</code>,
<code>babel-helpers</code>,
<code>babel-plugin-proposal-import-defer</code>,
<code>babel-plugin-syntax-import-defer</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>,
<code>babel-runtime</code>, <code>babel-standalone</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15878"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15878/hovercard">#15878</a>
Implement <code>import defer</code> proposal transform support (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>,
<code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15845"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15845/hovercard">#15845</a>
Implement <code>import defer</code> parsing support (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15829"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15829/hovercard">#15829</a> Add
parsing support for the "source phase imports" proposal (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-generator</code>,
<code>babel-helper-module-transforms</code>, <code>babel-parser</code>,
<code>babel-plugin-transform-dynamic-import</code>,
<code>babel-plugin-transform-modules-amd</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-modules-systemjs</code>,
<code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15682"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15682/hovercard">#15682</a> Add
<code>createImportExpressions</code> parser option (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-standalone</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15671"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15671/hovercard">#15671</a> Pass
through nonce to the transformed script element (<a
href="https://snyk.io/redirect/github/JLHwung">@ JLHwung</a>)</li>
</ul>
</li>
<li><code>babel-helper-function-name</code>,
<code>babel-helper-member-expression-to-functions</code>,
<code>babel-helpers</code>, <code>babel-parser</code>,
<code>babel-plugin-proposal-destructuring-private</code>,
<code>babel-plugin-proposal-optional-chaining-assign</code>,
<code>babel-plugin-syntax-optional-chaining-assign</code>,
<code>babel-plugin-transform-destructuring</code>,
<code>babel-plugin-transform-optional-chaining</code>,
<code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>,
<code>babel-runtime</code>, <code>babel-standalone</code>,
<code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15751"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15751/hovercard">#15751</a> Add
support for optional chain in assignments (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>,
<code>babel-plugin-proposal-decorators</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15895"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15895/hovercard">#15895</a>
Implement the "decorator metadata" proposal (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15893"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15893/hovercard">#15893</a> Add
<code>t.buildUndefinedNode</code> (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
<li><code>babel-preset-typescript</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15913"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15913/hovercard">#15913</a> Add
<code>rewriteImportExtensions</code> option to TS preset (<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/15896"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15896/hovercard">#15896</a> Allow
TS tuples to have both labeled and unlabeled elements (<a
href="https://snyk.io/redirect/github/yukukotani">@ yukukotani</a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-block-scoping</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15962"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15962/hovercard">#15962</a> fix:
<code>transform-block-scoping</code> captures the variables of the
method in the loop (<a
href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15797"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15797/hovercard">#15797</a> Expand
evaluation of global built-ins in <code>@ babel/traverse</code> (<a
href="https://snyk.io/redirect/github/lorenzoferre">@
lorenzoferre</a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-explicit-resource-management</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15985"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15985/hovercard">#15985</a>
Improve source maps for blocks with <code>using</code> declarations (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4>🔬 Output optimization</h4>
<ul>
<li><code>babel-core</code>,
<code>babel-helper-module-transforms</code>,
<code>babel-plugin-transform-async-to-generator</code>,
<code>babel-plugin-transform-classes</code>,
<code>babel-plugin-transform-dynamic-import</code>,
<code>babel-plugin-transform-function-name</code>,
<code>babel-plugin-transform-modules-amd</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-modules-umd</code>,
<code>babel-plugin-transform-parameters</code>,
<code>babel-plugin-transform-react-constant-elements</code>,
<code>babel-plugin-transform-react-inline-elements</code>,
<code>babel-plugin-transform-runtime</code>,
<code>babel-plugin-transform-typescript</code>,
<code>babel-preset-env</code>
<ul>
<li><a href="https://snyk.io/redirect/github/babel/babel/pull/15984"
data-hovercard-type="pull_request"
data-hovercard-url="/babel/babel/pull/15984/hovercard">#15984</a> Inline
<code>exports.XXX =</code> update in simple variable declarations (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 7</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>Lorenzo Ferretti (<a
href="https://snyk.io/redirect/github/lorenzoferre">@
lorenzoferre</a>)</li>
<li>Nicolò Ribaudo (<a
href="https://snyk.io/redirect/github/nicolo-ribaudo">@
nicolo-ribaudo</a>)</li>
<li>Raj Pawan Shukla (<a
href="https://snyk.io/redirect/github/RajShukla1">@ RajShukla1</a>)</li>
<li>Yuku Kotani (<a href="https://snyk.io/redirect/github/yukukotani">@
yukukotani</a>)</li>
<li><a href="https://snyk.io/redirect/github/liuxingbaoyu">@
liuxingbaoyu</a></li>
</ul>
      </li>
      <li>
<b>7.22.19</b> - <a
href="https://snyk.io/redirect/github/babel/babel/releases/tag/v7.22.19">2023-09-14</a></br><h2>v7.22.19
(2023-09-14)</h2>
<p>Re-published 7.22.18, due to a releasing error.</p>
      </li>
    </ul>
from <a
href="https://snyk.io/redirect/github/babel/babel/releases">@babel/types
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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJkYTdkYzgwNS0xMDczLTQxMWEtYWM1OC1mYTZjMTcyNTJjNzgiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImRhN2RjODA1LTEwNzMtNDExYS1hYzU4LWZhNmMxNzI1MmM3OCJ9fQ=="
width="0" height="0"/>

🧐 [View latest project
report](https://app.snyk.io/org/woodpile37/project/e5e31077-489f-44c1-b24d-4af9a1a8d603?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/woodpile37/project/e5e31077-489f-44c1-b24d-4af9a1a8d603/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/woodpile37/project/e5e31077-489f-44c1-b24d-4af9a1a8d603/settings/integration?pkg&#x3D;@babel/parser&amp;pkg&#x3D;@babel/types&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

<!---
(snyk:metadata:{"prId":"da7dc805-1073-411a-ac58-fa6c17252c78","prPublicId":"da7dc805-1073-411a-ac58-fa6c17252c78","dependencies":[{"name":"@babel/parser","from":"7.22.16","to":"7.23.0"},{"name":"@babel/types","from":"7.22.19","to":"7.23.0"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/woodpile37/project/e5e31077-489f-44c1-b24d-4af9a1a8d603?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"e5e31077-489f-44c1-b24d-4af9a1a8d603","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2023-09-25T08:10:31.822Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]})
--->
@Jabriilmohame

This comment has been minimized.

Sign in to view
@Jabriilmohame

This comment has been minimized.

Sign in to view
@Jabriilmohame

This comment has been minimized.

Sign in to view
@Jabriilmohame

This comment has been minimized.

Sign in to view
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 20, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@liuxingbaoyu liuxingbaoyu liuxingbaoyu approved these changes
@JLHwung JLHwung JLHwung approved these changes
+2 more reviewers
@Jabriilmohame Jabriilmohame Jabriilmohame left review comments
@guybedford guybedford guybedford approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release

Projects

None yet

Milestone

v7.23.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@nicolo-ribaudo @babel-bot @guybedford @liuxingbaoyu @Jabriilmohame @JLHwung
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.