@jsenv/plugin-transpilation 1.4.95 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-transpilation",
3
- "version": "1.4.95",
3
+ "version": "1.5.0",
4
4
  "description": "TODO",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -51,9 +51,9 @@
51
51
  "@babel/plugin-transform-template-literals": "7.25.9",
52
52
  "@babel/plugin-transform-typeof-symbol": "7.25.9",
53
53
  "@babel/plugin-transform-unicode-regex": "7.25.9",
54
- "@jsenv/ast": "6.5.2",
55
- "@jsenv/js-module-fallback": "1.3.59",
56
- "@jsenv/runtime-compat": "1.3.1",
54
+ "@jsenv/ast": "6.6.0",
55
+ "@jsenv/js-module-fallback": "1.4.0",
56
+ "@jsenv/runtime-compat": "1.3.3",
57
57
  "babel-plugin-transform-async-to-promises": "0.8.18",
58
58
  "construct-style-sheets-polyfill": "3.1.0",
59
59
  "lightningcss": "1.29.1"
@@ -5,6 +5,26 @@ export const analyzeConstructableStyleSheetUsage = (urlInfo) => {
5
5
  if (urlInfo.url === newStylesheetClientFileUrl) {
6
6
  return null;
7
7
  }
8
+ // const { runtimeCompat } = urlInfo.kitchen.context;
9
+ // const runtimeNames = runtimeCompat ? Object.keys(runtimeCompat) : [];
10
+ // let someRuntimeIsBrowser = false;
11
+ // for (const runtimeName of runtimeNames) {
12
+ // if (
13
+ // runtimeName === "chrome" ||
14
+ // runtimeName === "edge" ||
15
+ // runtimeName === "firefox" ||
16
+ // runtimeName === "opera" ||
17
+ // runtimeName === "safari" ||
18
+ // runtimeName === "samsung"
19
+ // ) {
20
+ // someRuntimeIsBrowser = true;
21
+ // break;
22
+ // }
23
+ // }
24
+ // if (!someRuntimeIsBrowser) {
25
+ // // we are building only for nodejs, no need to analyze constructable stylesheet usage
26
+ // return null;
27
+ // }
8
28
  const node = visitJsAstUntil(urlInfo.contentAst, {
9
29
  NewExpression: (node) => {
10
30
  return isNewCssStyleSheetCall(node);
@@ -123,6 +123,19 @@ export const jsenvPluginImportAttributes = ({
123
123
  return null;
124
124
  }
125
125
  await originalUrlInfo.cook();
126
+ if (
127
+ injectSearchParamForSideEffectImports &&
128
+ originalUrlInfo.searchParams.has("side_effect")
129
+ ) {
130
+ const urlInfoWithoutSideEffect =
131
+ originalUrlInfo.getWithoutSearchParam("side_effect");
132
+ if (urlInfoWithoutSideEffect) {
133
+ await urlInfoWithoutSideEffect.kitchen.urlInfoTransformer.setContent(
134
+ urlInfoWithoutSideEffect,
135
+ originalUrlInfo.content,
136
+ );
137
+ }
138
+ }
126
139
  return createUrlContent(originalUrlInfo);
127
140
  },
128
141
  };