@cedarjs/vite 5.0.7-next.310 → 5.0.7-next.335

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":"buildApp.d.ts","sourceRoot":"","sources":["../src/buildApp.ts"],"names":[],"mappings":"AA6DA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,EAClC,OAAe,EACf,SAA0B,EAC1B,EAAU,GACX,GAAE,oBAAyB,iBAya3B"}
1
+ {"version":3,"file":"buildApp.d.ts","sourceRoot":"","sources":["../src/buildApp.ts"],"names":[],"mappings":"AA6DA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,EAClC,OAAe,EACf,SAA0B,EAC1B,EAAU,GACX,GAAE,oBAAyB,iBA0a3B"}
package/dist/buildApp.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  transformWithBabel
17
17
  } from "@cedarjs/babel-config";
18
18
  import {
19
- applyEsmExtensions,
19
+ applyImportExtensions,
20
20
  applySrcAlias
21
21
  } from "@cedarjs/internal/dist/build/api.js";
22
22
  import { findApiFiles } from "@cedarjs/internal/dist/files.js";
@@ -282,9 +282,7 @@ async function buildCedarApp({
282
282
  );
283
283
  const applyImportRewrites = (source) => {
284
284
  let rewritten = applySrcAlias(source, fromDirRelativeToApiSrc);
285
- if (projectSideIsEsm("api")) {
286
- rewritten = applyEsmExtensions(rewritten, id);
287
- }
285
+ rewritten = applyImportExtensions(rewritten, id);
288
286
  return rewritten;
289
287
  };
290
288
  const rewrittenCode = applyImportRewrites(code);
@@ -31,7 +31,8 @@ function rscAnalyzePlugin(clientEntryCallback, serverEntryCallback) {
31
31
  };
32
32
  }
33
33
  function isServerAction(node) {
34
- return node.body?.type === "BlockStatement" && node.body.stmts.some(
34
+ const body = node.body;
35
+ return !!body && "stmts" in body && body.stmts.some(
35
36
  (s) => s.type === "ExpressionStatement" && s.expression.type === "StringLiteral" && s.expression.value === "use server"
36
37
  );
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "5.0.7-next.310",
3
+ "version": "5.0.7-next.335",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,22 +48,22 @@
48
48
  "test:watch": "vitest watch"
49
49
  },
50
50
  "dependencies": {
51
- "@babel/generator": "7.29.7",
52
- "@babel/parser": "7.29.7",
53
- "@babel/traverse": "7.29.7",
54
- "@babel/types": "7.29.7",
55
- "@cedarjs/api": "5.0.7-next.310",
56
- "@cedarjs/api-server": "5.0.7-next.310",
57
- "@cedarjs/babel-config": "5.0.7-next.310",
58
- "@cedarjs/context": "5.0.7-next.310",
59
- "@cedarjs/graphql-server": "5.0.7-next.310",
60
- "@cedarjs/internal": "5.0.7-next.310",
61
- "@cedarjs/jobs": "5.0.7-next.310",
62
- "@cedarjs/project-config": "5.0.7-next.310",
63
- "@cedarjs/server-store": "5.0.7-next.310",
64
- "@cedarjs/structure": "5.0.7-next.310",
65
- "@cedarjs/testing": "5.0.7-next.310",
66
- "@swc/core": "1.15.47",
51
+ "@babel/generator": "7.29.8",
52
+ "@babel/parser": "7.29.8",
53
+ "@babel/traverse": "7.29.8",
54
+ "@babel/types": "7.29.8",
55
+ "@cedarjs/api": "5.0.7-next.335",
56
+ "@cedarjs/api-server": "5.0.7-next.335",
57
+ "@cedarjs/babel-config": "5.0.7-next.335",
58
+ "@cedarjs/context": "5.0.7-next.335",
59
+ "@cedarjs/graphql-server": "5.0.7-next.335",
60
+ "@cedarjs/internal": "5.0.7-next.335",
61
+ "@cedarjs/jobs": "5.0.7-next.335",
62
+ "@cedarjs/project-config": "5.0.7-next.335",
63
+ "@cedarjs/server-store": "5.0.7-next.335",
64
+ "@cedarjs/structure": "5.0.7-next.335",
65
+ "@cedarjs/testing": "5.0.7-next.335",
66
+ "@swc/core": "1.16.0",
67
67
  "@universal-deploy/store": "^0.2.1",
68
68
  "@universal-deploy/vite": "^0.1.9",
69
69
  "@vitejs/plugin-react": "4.7.0",
@@ -93,10 +93,10 @@
93
93
  "yargs-parser": "21.1.1"
94
94
  },
95
95
  "devDependencies": {
96
- "@cedarjs/auth": "5.0.7-next.310",
97
- "@cedarjs/framework-tools": "5.0.7-next.310",
98
- "@cedarjs/router": "5.0.7-next.310",
99
- "@cedarjs/web": "5.0.7-next.310",
96
+ "@cedarjs/auth": "5.0.7-next.335",
97
+ "@cedarjs/framework-tools": "5.0.7-next.335",
98
+ "@cedarjs/router": "5.0.7-next.335",
99
+ "@cedarjs/web": "5.0.7-next.335",
100
100
  "@dr.pogodin/react-helmet": "2.0.4",
101
101
  "@hyrious/esbuild-plugin-commonjs": "0.2.6",
102
102
  "@jridgewell/trace-mapping": "0.3.31",
@@ -116,9 +116,9 @@
116
116
  "vitest": "4.1.10"
117
117
  },
118
118
  "peerDependencies": {
119
- "@cedarjs/auth": "5.0.7-next.310",
120
- "@cedarjs/router": "5.0.7-next.310",
121
- "@cedarjs/web": "5.0.7-next.310"
119
+ "@cedarjs/auth": "5.0.7-next.335",
120
+ "@cedarjs/router": "5.0.7-next.335",
121
+ "@cedarjs/web": "5.0.7-next.335"
122
122
  },
123
123
  "engines": {
124
124
  "node": ">=24"