@cedarjs/babel-config 5.0.0-canary.2575 → 5.0.0-canary.2576

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=api.transformWithBabel.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.transformWithBabel.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/api.transformWithBabel.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"prebuildApiFile.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/prebuildApiFile.test.ts"],"names":[],"mappings":"AAqCA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAU,SAAS,MAAM,oBAY3D,CAAA"}
1
+ {"version":3,"file":"prebuildApiFile.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/prebuildApiFile.test.ts"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAU,SAAS,MAAM,oBAa3D,CAAA"}
package/dist/api.d.ts CHANGED
@@ -25,6 +25,6 @@ export declare const getApiSideDefaultBabelConfig: ({ projectIsEsm }?: {
25
25
  ignore: string[];
26
26
  };
27
27
  export declare const registerApiSideBabelHook: ({ plugins, ...rest }?: RegisterHookOptions) => void;
28
- export declare const transformWithBabel: (srcPath: string, plugins: TransformOptions["plugins"]) => Promise<import("@babel/core").BabelFileResult | null>;
28
+ export declare const transformWithBabel: (sourceCode: string, filename: string, plugins: TransformOptions["plugins"], sourceMaps?: TransformOptions["sourceMaps"]) => Promise<import("@babel/core").BabelFileResult | null>;
29
29
  export {};
30
30
  //# sourceMappingURL=api.d.ts.map
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAA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AA;AAEjC,eAAO,MAAM,sBAAsB,GAAI;;;CAGjC,0FAiGL,CAAA;AAED,eAAO,MAAM,yBAAyB,0BAOrC,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI;;CAA6B,KA6BhD,gBAAgB,EACrC,CAAA;AAED,eAAO,MAAM,4BAA4B,GAAI;;CAA6B;;;;;;;CASzE,CAAA;AAGD,eAAO,MAAM,wBAAwB,GAAI,uBAGtC,mBAAwB,SAe1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,EAClB,UAAU,MAAM,EAChB,SAAS,gBAAgB,CAAC,SAAS,CAAC,EACpC,aAAY,gBAAgB,CAAC,YAAY,CAAY,0DAmBtD,CAAA"}
package/dist/api.js CHANGED
@@ -219,20 +219,19 @@ const registerApiSideBabelHook = ({
219
219
  ...rest
220
220
  });
221
221
  };
222
- const transformWithBabel = async (srcPath, plugins) => {
223
- const code = await import_node_fs.default.promises.readFile(srcPath, "utf-8");
222
+ const transformWithBabel = async (sourceCode, filename, plugins, sourceMaps = "inline") => {
224
223
  const defaultOptions = getApiSideDefaultBabelConfig({
225
224
  projectIsEsm: (0, import_project_config.projectSideIsEsm)("api")
226
225
  });
227
- const result = (0, import_core.transformAsync)(code, {
226
+ const result = (0, import_core.transformAsync)(sourceCode, {
228
227
  ...defaultOptions,
229
228
  cwd: (0, import_project_config.getPaths)().api.base,
230
- filename: srcPath,
231
- // we need inline sourcemaps at this level
232
- // because this file will eventually be fed to esbuild
233
- // when esbuild finds an inline sourcemap, it tries to "combine" it
234
- // so the final sourcemap (the one that esbuild generates) combines both mappings
235
- sourceMaps: "inline",
229
+ filename,
230
+ // The default 'inline' embeds the map as a data URL in result.code,
231
+ // which esbuild consumes when it reads from the result. Vite callers
232
+ // pass sourceMaps: true because they extract result.map separately for
233
+ // SSR source map chaining.
234
+ sourceMaps,
236
235
  plugins
237
236
  });
238
237
  return result;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=babel-plugin-redwood-context-wrapping.sourcemaps.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel-plugin-redwood-context-wrapping.sourcemaps.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/__tests__/babel-plugin-redwood-context-wrapping.sourcemaps.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/babel-config",
3
- "version": "5.0.0-canary.2575",
3
+ "version": "5.0.0-canary.2576",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -8,7 +8,10 @@
8
8
  },
9
9
  "license": "MIT",
10
10
  "type": "commonjs",
11
- "exports": "./dist/index.js",
11
+ "exports": {
12
+ ".": "./dist/index.js",
13
+ "./dist/plugins/*": "./dist/plugins/*"
14
+ },
12
15
  "types": "./dist/index.d.ts",
13
16
  "files": [
14
17
  "dist"
@@ -32,7 +35,7 @@
32
35
  "@babel/preset-typescript": "7.29.7",
33
36
  "@babel/register": "7.29.7",
34
37
  "@babel/traverse": "7.29.7",
35
- "@cedarjs/project-config": "5.0.0-canary.2575",
38
+ "@cedarjs/project-config": "5.0.0-canary.2576",
36
39
  "babel-plugin-auto-import": "1.1.0",
37
40
  "babel-plugin-graphql-tag": "3.3.0",
38
41
  "babel-plugin-module-resolver": "5.0.3",
@@ -41,7 +44,8 @@
41
44
  "typescript": "5.9.3"
42
45
  },
43
46
  "devDependencies": {
44
- "@cedarjs/framework-tools": "5.0.0-canary.2575",
47
+ "@cedarjs/framework-tools": "5.0.0-canary.2576",
48
+ "@jridgewell/trace-mapping": "0.3.31",
45
49
  "@types/babel-plugin-tester": "11.0.0",
46
50
  "@types/babel__core": "7.20.5",
47
51
  "@types/babel__register": "7.17.3",