@veryfront/ext-parser-babel 0.1.1203 → 0.1.1205

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.
@@ -1 +1 @@
1
- {"version":3,"file":"parser-only.d.ts","sourceRoot":"","sources":["../src/parser-only.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEzE,wEAAwE;AACxE,MAAM,WAAW,4BAA4B;IAC3C,sEAAsE;IACtE,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AAuBD;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,4BAA4B;IACvE,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAQ/C"}
1
+ {"version":3,"file":"parser-only.d.ts","sourceRoot":"","sources":["../src/parser-only.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEzE,wEAAwE;AACxE,MAAM,WAAW,4BAA4B;IAC3C,sEAAsE;IACtE,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AA0BD;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,4BAA4B;IACvE,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAQ/C"}
@@ -11,7 +11,6 @@
11
11
  import * as parser from "@babel/parser";
12
12
  function pickPlugins(filePath) {
13
13
  const normalizedPath = filePath?.toLowerCase() ?? "";
14
- const isTypeScript = /\.(?:tsx?|[cm]ts)$/.test(normalizedPath);
15
14
  const supportsJsx = !filePath ||
16
15
  /\.(?:tsx|jsx|js|mjs|cjs)$/.test(normalizedPath);
17
16
  const plugins = [
@@ -24,9 +23,12 @@ function pickPlugins(filePath) {
24
23
  "dynamicImport",
25
24
  "importAttributes",
26
25
  "topLevelAwait",
26
+ // Hosted configs are authored in TypeScript but can arrive named `.js`, so
27
+ // the extension cannot decide the dialect. TypeScript is a superset, so
28
+ // enabling it always only widens what parses.
29
+ "typescript",
27
30
  ];
28
- if (isTypeScript || !filePath)
29
- plugins.push("typescript");
31
+ // JSX stays extension-driven so `.ts` keeps `<T>x` as a type assertion.
30
32
  if (supportsJsx)
31
33
  plugins.push("jsx");
32
34
  return plugins;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-parser-babel",
3
- "version": "0.1.1203",
3
+ "version": "0.1.1205",
4
4
  "description": "Veryfront first-party extension package for ext-parser-babel",
5
5
  "keywords": [
6
6
  "veryfront",
@@ -52,7 +52,7 @@
52
52
  "@babel/types": "7.29.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "veryfront": "^0.1.1203"
55
+ "veryfront": "^0.1.1205"
56
56
  },
57
57
  "type": "module",
58
58
  "types": "./esm/index.d.ts",