adaptar-vite-plugin 1.0.0 → 1.0.2

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.
@@ -16,7 +16,7 @@ export function interceptHmrErrors(server) {
16
16
  let suppressReloadUntil = 0;
17
17
  // Cast to any to override — Vite 7 exposes an overloaded signature that
18
18
  // TypeScript cannot directly assign to. We restore full type safety inside
19
- // the function body by narrowing against HotPayload ourselves.
19
+ // the function body by narrowing against HMRPayload ourselves.
20
20
  server.ws.send = function (payload) {
21
21
  if (payload && typeof payload === "object") {
22
22
  // ── Fatal build / HMR error ──────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptar-vite-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Vite plugin for Adaptar preview error and selection bridging",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,10 +12,10 @@
12
12
  "devDependencies": {
13
13
  "@types/node": "^20.0.0",
14
14
  "typescript": "^5.0.0",
15
- "vite": "^7.0.0"
15
+ "vite": "^5.4.19"
16
16
  },
17
17
  "peerDependencies": {
18
- "vite": ">=5.0.0"
18
+ "vite": ">=4.0.0"
19
19
  },
20
20
  "keywords": [],
21
21
  "author": "",
@@ -1,4 +1,4 @@
1
- import type { ViteDevServer, HotPayload } from "vite";
1
+ import type { ViteDevServer, HMRPayload } from "vite";
2
2
 
3
3
  export interface AdaptarErrorPayload {
4
4
  message: string;
@@ -31,8 +31,8 @@ export function interceptHmrErrors(server: ViteDevServer): void {
31
31
 
32
32
  // Cast to any to override — Vite 7 exposes an overloaded signature that
33
33
  // TypeScript cannot directly assign to. We restore full type safety inside
34
- // the function body by narrowing against HotPayload ourselves.
35
- (server.ws as any).send = function (payload: HotPayload): void {
34
+ // the function body by narrowing against HMRPayload ourselves.
35
+ (server.ws as any).send = function (payload: HMRPayload): void {
36
36
  if (payload && typeof payload === "object") {
37
37
  // ── Fatal build / HMR error ──────────────────────────────────────────
38
38
  if (payload.type === "error") {