@cedarjs/internal 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.
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/build/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,SAAS,CAAA;AAetE,eAAO,MAAM,QAAQ,4DAIpB,CAAA;AAED,eAAO,MAAM,UAAU,4DAStB,CAAA;AAED,eAAO,MAAM,aAAa,qBAGzB,CAAA;AAqED,eAAO,MAAM,gBAAgB,iHAqD5B,CAAA;AAcD,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAoDf"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/build/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,SAAS,CAAA;AAetE,eAAO,MAAM,QAAQ,4DAIpB,CAAA;AAED,eAAO,MAAM,UAAU,4DAStB,CAAA;AAED,eAAO,MAAM,aAAa,qBAGzB,CAAA;AA0ED,eAAO,MAAM,gBAAgB,iHAqD5B,CAAA;AAcD,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAoDf"}
package/dist/build/api.js CHANGED
@@ -33,7 +33,9 @@ const runCedarBabelTransformsPlugin = {
33
33
  setup(build2) {
34
34
  const cedarConfig = getConfig();
35
35
  build2.onLoad({ filter: /\.(js|ts|tsx|jsx)$/ }, async (args) => {
36
+ const fileContents = await fs.promises.readFile(args.path, "utf-8");
36
37
  const transformedCode = await transformWithBabel(
38
+ fileContents,
37
39
  args.path,
38
40
  getApiSideBabelPlugins({
39
41
  openTelemetry: cedarConfig.experimental.opentelemetry.enabled && cedarConfig.experimental.opentelemetry.wrapApi,
@@ -55,7 +57,8 @@ function createCedarViteApiPlugin() {
55
57
  const isEsm = projectSideIsEsm("api");
56
58
  return {
57
59
  name: "cedar-vite-api-babel-transform",
58
- async transform(_code, id) {
60
+ enforce: "pre",
61
+ async transform(code, id) {
59
62
  if (!/\.(js|ts|tsx|jsx)$/.test(id)) {
60
63
  return null;
61
64
  }
@@ -67,11 +70,13 @@ function createCedarViteApiPlugin() {
67
70
  return null;
68
71
  }
69
72
  const transformedCode = await transformWithBabel(
73
+ code,
70
74
  id,
71
75
  getApiSideBabelPlugins({
72
76
  openTelemetry: cedarConfig.experimental.opentelemetry.enabled && cedarConfig.experimental.opentelemetry.wrapApi,
73
77
  projectIsEsm: isEsm
74
- })
78
+ }),
79
+ true
75
80
  );
76
81
  if (transformedCode?.code) {
77
82
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/build/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,SAAS,CAAA;AAetE,eAAO,MAAM,QAAQ,4DAIpB,CAAA;AAED,eAAO,MAAM,UAAU,4DAStB,CAAA;AAED,eAAO,MAAM,aAAa,qBAGzB,CAAA;AAqED,eAAO,MAAM,gBAAgB,iHAqD5B,CAAA;AAcD,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAoDf"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/build/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,SAAS,CAAA;AAetE,eAAO,MAAM,QAAQ,4DAIpB,CAAA;AAED,eAAO,MAAM,UAAU,4DAStB,CAAA;AAED,eAAO,MAAM,aAAa,qBAGzB,CAAA;AA0ED,eAAO,MAAM,gBAAgB,iHAqD5B,CAAA;AAcD,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAoDf"}
@@ -67,7 +67,9 @@ const runCedarBabelTransformsPlugin = {
67
67
  setup(build2) {
68
68
  const cedarConfig = (0, import_project_config.getConfig)();
69
69
  build2.onLoad({ filter: /\.(js|ts|tsx|jsx)$/ }, async (args) => {
70
+ const fileContents = await import_node_fs.default.promises.readFile(args.path, "utf-8");
70
71
  const transformedCode = await (0, import_babel_config.transformWithBabel)(
72
+ fileContents,
71
73
  args.path,
72
74
  (0, import_babel_config.getApiSideBabelPlugins)({
73
75
  openTelemetry: cedarConfig.experimental.opentelemetry.enabled && cedarConfig.experimental.opentelemetry.wrapApi,
@@ -89,7 +91,8 @@ function createCedarViteApiPlugin() {
89
91
  const isEsm = (0, import_project_config.projectSideIsEsm)("api");
90
92
  return {
91
93
  name: "cedar-vite-api-babel-transform",
92
- async transform(_code, id) {
94
+ enforce: "pre",
95
+ async transform(code, id) {
93
96
  if (!/\.(js|ts|tsx|jsx)$/.test(id)) {
94
97
  return null;
95
98
  }
@@ -101,11 +104,13 @@ function createCedarViteApiPlugin() {
101
104
  return null;
102
105
  }
103
106
  const transformedCode = await (0, import_babel_config.transformWithBabel)(
107
+ code,
104
108
  id,
105
109
  (0, import_babel_config.getApiSideBabelPlugins)({
106
110
  openTelemetry: cedarConfig.experimental.opentelemetry.enabled && cedarConfig.experimental.opentelemetry.wrapApi,
107
111
  projectIsEsm: isEsm
108
- })
112
+ }),
113
+ true
109
114
  );
110
115
  if (transformedCode?.code) {
111
116
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/internal",
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",
@@ -159,13 +159,13 @@
159
159
  "@babel/plugin-transform-react-jsx": "7.29.7",
160
160
  "@babel/plugin-transform-typescript": "^7.26.8",
161
161
  "@babel/traverse": "7.29.7",
162
- "@cedarjs/babel-config": "5.0.0-canary.2575",
163
- "@cedarjs/cli-helpers": "5.0.0-canary.2575",
164
- "@cedarjs/graphql-server": "5.0.0-canary.2575",
165
- "@cedarjs/project-config": "5.0.0-canary.2575",
166
- "@cedarjs/router": "5.0.0-canary.2575",
167
- "@cedarjs/structure": "5.0.0-canary.2575",
168
- "@cedarjs/utils": "5.0.0-canary.2575",
162
+ "@cedarjs/babel-config": "5.0.0-canary.2576",
163
+ "@cedarjs/cli-helpers": "5.0.0-canary.2576",
164
+ "@cedarjs/graphql-server": "5.0.0-canary.2576",
165
+ "@cedarjs/project-config": "5.0.0-canary.2576",
166
+ "@cedarjs/router": "5.0.0-canary.2576",
167
+ "@cedarjs/structure": "5.0.0-canary.2576",
168
+ "@cedarjs/utils": "5.0.0-canary.2576",
169
169
  "@graphql-codegen/add": "6.0.1",
170
170
  "@graphql-codegen/cli": "6.3.1",
171
171
  "@graphql-codegen/client-preset": "5.3.0",
@@ -206,7 +206,7 @@
206
206
  },
207
207
  "devDependencies": {
208
208
  "@arethetypeswrong/cli": "0.18.3",
209
- "@cedarjs/framework-tools": "5.0.0-canary.2575",
209
+ "@cedarjs/framework-tools": "5.0.0-canary.2576",
210
210
  "concurrently": "9.2.1",
211
211
  "graphql-tag": "2.12.6",
212
212
  "publint": "0.3.21",