Skip to content

Commit

Permalink
Support tranforming import source for wasm (#15870)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Sep 25, 2023
1 parent 35c0651 commit 9d9ec58
Show file tree
Hide file tree
Showing 77 changed files with 675 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Makefile.source.mjs
Expand Up @@ -450,14 +450,14 @@ target["bootstrap-flow"] = function () {

target["new-version-checklist"] = function () {
// eslint-disable-next-line no-constant-condition
if (0) {
if (1) {
console.log(
`
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!! !!!!!!
!!!!!! Write any important message here, and change the !!!!!!
!!!!!! if (0) above to if (1) !!!!!!
!!!!!! Set the minimum required core version in the !!!!!!
!!!!!! import source transform to the new minor. !!!!!!
!!!!!! !!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down
3 changes: 3 additions & 0 deletions packages/babel-plugin-proposal-import-wasm-source/.npmignore
@@ -0,0 +1,3 @@
src
test
*.log
19 changes: 19 additions & 0 deletions packages/babel-plugin-proposal-import-wasm-source/README.md
@@ -0,0 +1,19 @@
# @babel/plugin-proposal-import-wasm-source

> Transform source phase imports (`import source ... from '...'`) to work in browsers and Node.js, assuming that the imported source is a WebAssembly module.
See our website [@babel/plugin-proposal-import-wasm-source](https://babeljs.io/docs/babel-plugin-proposal-import-wasm-source) for more information.

## Install

Using npm:

```sh
npm install --save-dev @babel/plugin-proposal-import-wasm-source
```

or using yarn:

```sh
yarn add @babel/plugin-proposal-import-wasm-source --dev
```
65 changes: 65 additions & 0 deletions packages/babel-plugin-proposal-import-wasm-source/package.json
@@ -0,0 +1,65 @@
{
"name": "@babel/plugin-proposal-import-wasm-source",
"version": "7.22.5",
"description": "Transform source phase imports (`import source ... from '...'`) to work in browsers and Node.js, assuming that the imported source is a WebAssembly module.",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-proposal-import-wasm-source"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-import-wasm-source",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
},
"keywords": [
"babel-plugin",
"import",
"source",
"phase",
"wasm",
"WebAssembly",
"assertions",
"proposal",
"stage-3"
],
"dependencies": {
"@babel/helper-compilation-targets": "workspace:^",
"@babel/helper-module-imports": "workspace:^",
"@babel/helper-plugin-utils": "workspace:^",
"@babel/plugin-syntax-import-source": "workspace:^"
},
"peerDependencies": {
"@babel/core": "^7.22.0"
},
"devDependencies": {
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs",
"conditions": {
"USE_ESM": [
{
"type": "module"
},
null
],
"BABEL_8_BREAKING": [
{
"engines": {
"node": "^16.20.0 || ^18.16.0 || >=20.0.0"
}
},
{}
]
}
}

0 comments on commit 9d9ec58

Please sign in to comment.