@jsenv/plugin-transpilation 1.6.5 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/plugin-transpilation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TODO",
|
|
6
6
|
"repository": {
|
|
@@ -10,50 +10,46 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
13
|
+
"node": "^22.18.0 || >=24.11.0"
|
|
14
14
|
},
|
|
15
15
|
"main": "./src/main.js",
|
|
16
16
|
"files": [
|
|
17
17
|
"/src/"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@babel/plugin-
|
|
21
|
-
"@babel/plugin-
|
|
22
|
-
"@babel/plugin-
|
|
23
|
-
"@babel/plugin-transform-
|
|
24
|
-
"@babel/plugin-transform-
|
|
25
|
-
"@babel/plugin-transform-
|
|
26
|
-
"@babel/plugin-transform-
|
|
27
|
-
"@babel/plugin-transform-
|
|
28
|
-
"@babel/plugin-transform-
|
|
29
|
-
"@babel/plugin-transform-
|
|
30
|
-
"@babel/plugin-transform-
|
|
31
|
-
"@babel/plugin-transform-
|
|
32
|
-
"@babel/plugin-transform-
|
|
33
|
-
"@babel/plugin-transform-
|
|
34
|
-
"@babel/plugin-transform-
|
|
35
|
-
"@babel/plugin-transform-
|
|
36
|
-
"@babel/plugin-transform-
|
|
37
|
-
"@babel/plugin-transform-
|
|
38
|
-
"@babel/plugin-transform-
|
|
39
|
-
"@babel/plugin-transform-
|
|
40
|
-
"@babel/plugin-transform-
|
|
41
|
-
"@babel/plugin-transform-
|
|
42
|
-
"@babel/plugin-transform-
|
|
43
|
-
"@babel/plugin-transform-
|
|
44
|
-
"@babel/plugin-transform-
|
|
45
|
-
"@babel/plugin-transform-
|
|
46
|
-
"@babel/plugin-transform-
|
|
47
|
-
"@babel/plugin-transform-
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@babel/plugin-transform-unicode-regex": "7.29.7",
|
|
51
|
-
"@jsenv/ast": "6.9.3",
|
|
52
|
-
"@jsenv/js-module-fallback": "1.5.3",
|
|
20
|
+
"@babel/plugin-transform-arrow-functions": "8.0.1",
|
|
21
|
+
"@babel/plugin-transform-block-scoped-functions": "8.0.1",
|
|
22
|
+
"@babel/plugin-transform-block-scoping": "8.0.1",
|
|
23
|
+
"@babel/plugin-transform-classes": "8.0.1",
|
|
24
|
+
"@babel/plugin-transform-computed-properties": "8.0.1",
|
|
25
|
+
"@babel/plugin-transform-destructuring": "8.0.1",
|
|
26
|
+
"@babel/plugin-transform-dotall-regex": "8.0.1",
|
|
27
|
+
"@babel/plugin-transform-duplicate-keys": "8.0.1",
|
|
28
|
+
"@babel/plugin-transform-exponentiation-operator": "8.0.1",
|
|
29
|
+
"@babel/plugin-transform-for-of": "8.0.1",
|
|
30
|
+
"@babel/plugin-transform-function-name": "8.0.1",
|
|
31
|
+
"@babel/plugin-transform-json-strings": "8.0.1",
|
|
32
|
+
"@babel/plugin-transform-literals": "8.0.1",
|
|
33
|
+
"@babel/plugin-transform-new-target": "8.0.1",
|
|
34
|
+
"@babel/plugin-transform-numeric-separator": "8.0.1",
|
|
35
|
+
"@babel/plugin-transform-object-rest-spread": "8.0.1",
|
|
36
|
+
"@babel/plugin-transform-object-super": "8.0.1",
|
|
37
|
+
"@babel/plugin-transform-optional-catch-binding": "8.0.1",
|
|
38
|
+
"@babel/plugin-transform-optional-chaining": "8.0.1",
|
|
39
|
+
"@babel/plugin-transform-parameters": "8.0.1",
|
|
40
|
+
"@babel/plugin-transform-regenerator": "8.0.2",
|
|
41
|
+
"@babel/plugin-transform-shorthand-properties": "8.0.1",
|
|
42
|
+
"@babel/plugin-transform-spread": "8.0.1",
|
|
43
|
+
"@babel/plugin-transform-sticky-regex": "8.0.1",
|
|
44
|
+
"@babel/plugin-transform-template-literals": "8.0.1",
|
|
45
|
+
"@babel/plugin-transform-typeof-symbol": "8.0.1",
|
|
46
|
+
"@babel/plugin-transform-unicode-property-regex": "8.0.1",
|
|
47
|
+
"@babel/plugin-transform-unicode-regex": "8.0.1",
|
|
48
|
+
"@jsenv/ast": "6.10.0",
|
|
49
|
+
"@jsenv/js-module-fallback": "1.6.1",
|
|
53
50
|
"@jsenv/sourcemap": "1.4.3",
|
|
54
51
|
"@jsenv/urls": "2.9.10",
|
|
55
52
|
"@jsenv/utils": "2.3.1",
|
|
56
|
-
"babel-plugin-transform-async-to-promises": "0.8.18",
|
|
57
53
|
"construct-style-sheets-polyfill": "3.1.0",
|
|
58
54
|
"lightningcss": "1.33.0"
|
|
59
55
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { babelPluginAsyncToPromises } from "@jsenv/ast";
|
|
1
2
|
import { createRequire } from "node:module";
|
|
2
3
|
|
|
3
4
|
import { getBabelHelperFileUrl } from "./babel_helper_directory/babel_helper_directory.js";
|
|
@@ -49,7 +50,7 @@ export const getBaseBabelPluginStructure = ({
|
|
|
49
50
|
// }
|
|
50
51
|
if (isBabelPluginNeeded("transform-async-to-promises")) {
|
|
51
52
|
babelPluginStructure["transform-async-to-promises"] = [
|
|
52
|
-
|
|
53
|
+
babelPluginAsyncToPromises,
|
|
53
54
|
{
|
|
54
55
|
topLevelAwait: "ignore", // will be handled by "jsenv:top_level_await" plugin
|
|
55
56
|
externalHelpers: false,
|
|
@@ -18,7 +18,7 @@ export const injectSideEffectFileIntoBabelAst = ({
|
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
const sidEffectFileContent = readFileSync(new URL(sideEffectFileUrl), "utf8");
|
|
21
|
-
const sideEffectFileContentAst = babel.
|
|
21
|
+
const sideEffectFileContentAst = babel.parseSync(sidEffectFileContent);
|
|
22
22
|
if (isJsModule) {
|
|
23
23
|
injectAstAfterImport(programPath, sideEffectFileContentAst);
|
|
24
24
|
return;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { applyBabelPlugins } from "@jsenv/ast";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
|
|
4
|
-
const require = createRequire(import.meta.url);
|
|
1
|
+
import { applyBabelPlugins, babelPluginAsyncToPromises } from "@jsenv/ast";
|
|
5
2
|
|
|
6
3
|
export const jsenvPluginTopLevelAwait = ({ needJsModuleFallback }) => {
|
|
7
4
|
return {
|
|
@@ -26,7 +23,7 @@ export const jsenvPluginTopLevelAwait = ({ needJsModuleFallback }) => {
|
|
|
26
23
|
const { code, map } = await applyBabelPlugins({
|
|
27
24
|
babelPlugins: [
|
|
28
25
|
[
|
|
29
|
-
|
|
26
|
+
babelPluginAsyncToPromises,
|
|
30
27
|
{
|
|
31
28
|
// Maybe we could pass target: "es6" when we support arrow function
|
|
32
29
|
// https://github.com/rpetrich/babel-plugin-transform-async-to-promises/blob/92755ff8c943c97596523e586b5fa515c2e99326/async-to-promises.ts#L55
|