@jsenv/plugin-transpilation 1.0.0 → 1.1.0

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.
Files changed (21) hide show
  1. package/package.json +26 -26
  2. package/src/as_js_module/jsenv_plugin_as_js_module.js +4 -1
  3. package/src/babel/babel_helper_directory/README.md +1 -1
  4. package/src/babel/babel_helper_directory/babel_helpers/applyDecs2301/applyDecs2301.js +547 -528
  5. package/src/babel/babel_helper_directory/babel_helpers/applyDecs2305/applyDecs2305.js +681 -0
  6. package/src/babel/jsenv_plugin_babel.js +89 -17
  7. package/src/babel/new_stylesheet/babel_plugin_new_stylesheet_injector.js +11 -135
  8. package/src/babel/new_stylesheet/constructable_stylesheet_usage.js +114 -0
  9. package/src/babel/new_stylesheet/new_stylesheet_client_file_url.js +4 -0
  10. package/src/babel/regenerator_runtime/babel_plugin_regenerator_runtime_injector.js +11 -35
  11. package/src/babel/regenerator_runtime/regenerator_runtime_client_file_url.js +4 -0
  12. package/src/babel/regenerator_runtime/regenerator_runtime_usage.js +23 -0
  13. package/src/babel/{polyfill_injection_in_babel_ast.js → side_effect_injection_in_babel_ast.js} +8 -8
  14. package/src/import_assertions/jsenv_plugin_import_assertions.js +3 -3
  15. package/src/js_module_fallback/jsenv_plugin_js_module_conversion.js +15 -7
  16. package/src/js_module_fallback/jsenv_plugin_js_module_fallback.js +2 -11
  17. package/src/js_module_fallback/jsenv_plugin_js_module_fallback_inside_html.js +21 -98
  18. package/src/babel/apply_js_transpilation.js +0 -74
  19. package/src/babel/global_this/babel_plugin_global_this_injector.js +0 -56
  20. package/src/babel/global_this/client/global_this_js_classic.js +0 -25
  21. package/src/babel/global_this/client/global_this_js_module.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-transpilation",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "TODO",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,35 +26,35 @@
26
26
  "@babel/plugin-proposal-optional-catch-binding": "7.18.6",
27
27
  "@babel/plugin-proposal-optional-chaining": "7.21.0",
28
28
  "@babel/plugin-proposal-unicode-property-regex": "7.18.6",
29
- "@babel/plugin-syntax-import-assertions": "7.20.0",
29
+ "@babel/plugin-syntax-import-assertions": "7.22.5",
30
30
  "@babel/plugin-syntax-object-rest-spread": "7.8.3",
31
31
  "@babel/plugin-syntax-optional-catch-binding": "7.8.3",
32
- "@babel/plugin-transform-arrow-functions": "7.21.5",
33
- "@babel/plugin-transform-block-scoped-functions": "7.18.6",
34
- "@babel/plugin-transform-block-scoping": "7.21.0",
35
- "@babel/plugin-transform-classes": "7.21.0",
36
- "@babel/plugin-transform-computed-properties": "7.21.5",
37
- "@babel/plugin-transform-destructuring": "7.21.3",
38
- "@babel/plugin-transform-dotall-regex": "7.18.6",
39
- "@babel/plugin-transform-duplicate-keys": "7.18.9",
40
- "@babel/plugin-transform-exponentiation-operator": "7.18.6",
41
- "@babel/plugin-transform-for-of": "7.21.5",
42
- "@babel/plugin-transform-function-name": "7.18.9",
43
- "@babel/plugin-transform-literals": "7.18.9",
44
- "@babel/plugin-transform-new-target": "7.22.3",
45
- "@babel/plugin-transform-object-super": "7.18.6",
46
- "@babel/plugin-transform-parameters": "7.22.3",
47
- "@babel/plugin-transform-regenerator": "7.21.5",
48
- "@babel/plugin-transform-shorthand-properties": "7.18.6",
49
- "@babel/plugin-transform-spread": "7.20.7",
50
- "@babel/plugin-transform-sticky-regex": "7.18.6",
51
- "@babel/plugin-transform-template-literals": "7.18.9",
52
- "@babel/plugin-transform-typeof-symbol": "7.18.9",
53
- "@babel/plugin-transform-unicode-regex": "7.18.6",
32
+ "@babel/plugin-transform-arrow-functions": "7.22.5",
33
+ "@babel/plugin-transform-block-scoped-functions": "7.22.5",
34
+ "@babel/plugin-transform-block-scoping": "7.22.5",
35
+ "@babel/plugin-transform-classes": "7.22.5",
36
+ "@babel/plugin-transform-computed-properties": "7.22.5",
37
+ "@babel/plugin-transform-destructuring": "7.22.5",
38
+ "@babel/plugin-transform-dotall-regex": "7.22.5",
39
+ "@babel/plugin-transform-duplicate-keys": "7.22.5",
40
+ "@babel/plugin-transform-exponentiation-operator": "7.22.5",
41
+ "@babel/plugin-transform-for-of": "7.22.5",
42
+ "@babel/plugin-transform-function-name": "7.22.5",
43
+ "@babel/plugin-transform-literals": "7.22.5",
44
+ "@babel/plugin-transform-new-target": "7.22.5",
45
+ "@babel/plugin-transform-object-super": "7.22.5",
46
+ "@babel/plugin-transform-parameters": "7.22.5",
47
+ "@babel/plugin-transform-regenerator": "7.22.5",
48
+ "@babel/plugin-transform-shorthand-properties": "7.22.5",
49
+ "@babel/plugin-transform-spread": "7.22.5",
50
+ "@babel/plugin-transform-sticky-regex": "7.22.5",
51
+ "@babel/plugin-transform-template-literals": "7.22.5",
52
+ "@babel/plugin-transform-typeof-symbol": "7.22.5",
53
+ "@babel/plugin-transform-unicode-regex": "7.22.5",
54
54
  "babel-plugin-transform-async-to-promises": "0.8.18",
55
55
  "construct-style-sheets-polyfill": "3.1.0",
56
- "@jsenv/ast": "4.0.3",
56
+ "@jsenv/ast": "4.1.0",
57
57
  "@jsenv/runtime-compat": "1.0.0",
58
- "lightningcss": "1.20.0"
58
+ "lightningcss": "1.21.0"
59
59
  }
60
60
  }
@@ -49,7 +49,10 @@ export const jsenvPluginAsJsModule = () => {
49
49
  specifier: jsClassicReference.url,
50
50
  expectedType: "js_classic",
51
51
  });
52
- } else if (context.build && jsClassicUrlInfo.dependents.size === 0) {
52
+ } else if (
53
+ context.build &&
54
+ !context.urlGraph.hasDependent(jsClassicUrlInfo)
55
+ ) {
53
56
  context.urlGraph.deleteUrlInfo(jsClassicUrlInfo.url);
54
57
  }
55
58
  const { content, sourcemap } = await convertJsClassicToJsModule({
@@ -2,7 +2,7 @@
2
2
 
3
3
  Babel helpers are copied in there to properly appear in sourcemap.
4
4
 
5
- - Last sync date: 3 May 2023
5
+ - Last sync date: 9 June 2023
6
6
 
7
7
  - Helpers file: https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers.ts
8
8
  - Individual helpers: https://github.com/babel/babel/tree/main/packages/babel-helpers/src/helpers