@adonisjs/inertia 2.0.0-beta.0 → 2.0.1

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.
@@ -17,6 +17,7 @@ var ServerRenderer = class _ServerRenderer {
17
17
  const devServer = this.vite?.getDevServer();
18
18
  if (devServer) {
19
19
  _ServerRenderer.runtime ??= await this.vite.createRuntime();
20
+ _ServerRenderer.runtime.clearCache();
20
21
  render = await _ServerRenderer.runtime.executeEntrypoint(this.config.ssr.entrypoint);
21
22
  } else {
22
23
  render = await import(pathToFileURL(this.config.ssr.bundle).href);
@@ -130,7 +131,10 @@ var Inertia = class {
130
131
  let newProps = props;
131
132
  if (!isPartial) {
132
133
  newProps = Object.fromEntries(
133
- Object.entries(props).filter(([_, value]) => !value[ignoreFirstLoadSymbol])
134
+ Object.entries(props).filter(([_, value]) => {
135
+ if (value && value[ignoreFirstLoadSymbol]) return false;
136
+ return true;
137
+ })
134
138
  );
135
139
  }
136
140
  const partialOnlyHeader = this.ctx.request.header(InertiaHeaders.PartialOnly);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InertiaMiddleware
3
- } from "../chunk-HUEPL6EC.js";
3
+ } from "../chunk-FF2K7IPS.js";
4
4
 
5
5
  // providers/inertia_provider.ts
6
6
  import { configProvider } from "@adonisjs/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InertiaMiddleware
3
- } from "../chunk-HUEPL6EC.js";
3
+ } from "../chunk-FF2K7IPS.js";
4
4
  export {
5
5
  InertiaMiddleware as default
6
6
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/inertia",
3
3
  "description": "Official Inertia.js adapter for AdonisJS",
4
- "version": "2.0.0-beta.0",
4
+ "version": "2.0.1",
5
5
  "engines": {
6
6
  "node": ">=20.6.0"
7
7
  },
@@ -21,6 +21,22 @@
21
21
  "./client": "./build/src/plugins/vite.js",
22
22
  "./helpers": "./build/src/helpers.js"
23
23
  },
24
+ "scripts": {
25
+ "clean": "del-cli build",
26
+ "copy:templates": "copyfiles --up 1 \"stubs/**/*.stub\" build",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "eslint",
29
+ "format": "prettier --write .",
30
+ "quick:test": "node --enable-source-maps --import=ts-node-maintained/register/esm bin/test.ts",
31
+ "pretest": "npm run lint",
32
+ "test": "c8 npm run quick:test",
33
+ "prebuild": "npm run lint && npm run clean",
34
+ "build": "tsup-node",
35
+ "postbuild": "npm run copy:templates",
36
+ "release": "release-it",
37
+ "version": "npm run build",
38
+ "prepublishOnly": "npm run build"
39
+ },
24
40
  "devDependencies": {
25
41
  "@adonisjs/assembler": "^7.8.2",
26
42
  "@adonisjs/core": "6.14.0",
@@ -140,20 +156,5 @@
140
156
  "format": "esm",
141
157
  "dts": true,
142
158
  "target": "esnext"
143
- },
144
- "scripts": {
145
- "clean": "del-cli build",
146
- "copy:templates": "copyfiles --up 1 \"stubs/**/*.stub\" build",
147
- "typecheck": "tsc --noEmit",
148
- "lint": "eslint",
149
- "format": "prettier --write .",
150
- "quick:test": "node --enable-source-maps --import=ts-node-maintained/register/esm bin/test.ts",
151
- "pretest": "npm run lint",
152
- "test": "c8 npm run quick:test",
153
- "prebuild": "npm run lint && npm run clean",
154
- "build": "tsup-node",
155
- "postbuild": "npm run copy:templates",
156
- "release": "release-it",
157
- "version": "npm run build"
158
159
  }
159
- }
160
+ }