Skip to content

Commit

Permalink
chore: properly patch vite-node
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed May 6, 2023
1 parent b1431c4 commit c72cbc5
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 2 deletions.
86 changes: 86 additions & 0 deletions .yarn/patches/vite-node-npm-0.31.0-0b476529fb.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,89 @@
diff --git a/dist/cli.d.ts b/dist/cli.d.ts
index 8fe7c4e55b2697a1ff4c4f0d1e92becfb5e4985c..37e4c309e8e440a33a45fa9c98f61d43c64afd8c 100644
--- a/dist/cli.d.ts
+++ b/dist/cli.d.ts
@@ -1,5 +1,4 @@
import { e as ViteNodeServerOptions } from './types-d9c0fafd.js';
-import 'vite/types/hot';
import './types.d-1e7e3fdf.js';

interface CliOptions {
diff --git a/dist/client.d.ts b/dist/client.d.ts
index 54620d689990040a804d5a4cb9379fbe9ae0ef0a..dcf1aa55ad7f609de751ad36e68091d0886f2814 100644
--- a/dist/client.d.ts
+++ b/dist/client.d.ts
@@ -1,3 +1,2 @@
import './types.d-1e7e3fdf.js';
export { h as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, g as ViteNodeRunner } from './types-d9c0fafd.js';
-import 'vite/types/hot';
diff --git a/dist/hmr.d.ts b/dist/hmr.d.ts
index 1db452c6d3a586068d087cbf562f2e90dc1ec280..deac86c2acda6a8f4306216cc9ec21ac0b39b99d 100644
--- a/dist/hmr.d.ts
+++ b/dist/hmr.d.ts
@@ -1,7 +1,6 @@
import { EventEmitter } from 'node:events';
import { HMRPayload as HMRPayload$1, Plugin } from 'vite';
import { g as ViteNodeRunner, H as HotContext } from './types-d9c0fafd.js';
-import 'vite/types/hot';
import './types.d-1e7e3fdf.js';

type EventType = string | symbol;
diff --git a/dist/index.d.ts b/dist/index.d.ts
index 2da3d189b087247f2556a48cc14912219c9dcab9..e7ea046d332f83c075afbd1cb8df915f0bcb7b38 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -1,3 +1,2 @@
export { A as Arrayable, C as CreateHotContextFunction, f as DebuggerOptions, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, H as HotContext, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-d9c0fafd.js';
export { D as DecodedSourceMap, E as EncodedSourceMap } from './types.d-1e7e3fdf.js';
-import 'vite/types/hot';
diff --git a/dist/server.d.ts b/dist/server.d.ts
index a9cd7bf142826d9b927697270c0333994ffa05f6..80a95d2c4a31a7cd18c4bccdbbe472e1ab8e0dbd 100644
--- a/dist/server.d.ts
+++ b/dist/server.d.ts
@@ -1,7 +1,6 @@
import { TransformResult, ViteDevServer } from 'vite';
import { E as EncodedSourceMap } from './types.d-1e7e3fdf.js';
import { f as DebuggerOptions, D as DepsHandlingOptions, e as ViteNodeServerOptions, F as FetchResult, d as ViteNodeResolveId } from './types-d9c0fafd.js';
-import 'vite/types/hot';

declare class Debugger {
options: DebuggerOptions;
diff --git a/dist/types-d9c0fafd.d.ts b/dist/types-d9c0fafd.d.ts
index 52e8cac62dbac095b76a3b7e9c97cabbeddeab17..42d6394c6cf6606488150fbe9bf0f765d99759e2 100644
--- a/dist/types-d9c0fafd.d.ts
+++ b/dist/types-d9c0fafd.d.ts
@@ -1,4 +1,3 @@
-import { ViteHotContext } from 'vite/types/hot';
import { E as EncodedSourceMap } from './types.d-1e7e3fdf.js';

declare const DEFAULT_REQUEST_STUBS: Record<string, unknown>;
@@ -90,7 +89,7 @@ interface FetchResult {
externalize?: string;
map?: EncodedSourceMap | null;
}
-type HotContext = Omit<ViteHotContext, 'acceptDeps' | 'decline'>;
+type HotContext = any;
type FetchFunction = (id: string) => Promise<FetchResult>;
type ResolveIdFunction = (id: string, importer?: string) => Promise<ViteNodeResolveId | null>;
type CreateHotContextFunction = (runner: ViteNodeRunner, url: string) => HotContext;
diff --git a/dist/types.d.ts b/dist/types.d.ts
index 50de14163bba29faaa2dd3a279e7b71742b91bd1..ea494aebe427b3ccb585004547d275aa99efa1bc 100644
--- a/dist/types.d.ts
+++ b/dist/types.d.ts
@@ -1,3 +1,2 @@
-import 'vite/types/hot';
export { D as DecodedSourceMap, E as EncodedSourceMap } from './types.d-1e7e3fdf.js';
export { A as Arrayable, C as CreateHotContextFunction, f as DebuggerOptions, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, H as HotContext, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-d9c0fafd.js';
diff --git a/dist/utils.d.ts b/dist/utils.d.ts
index 5c10f12799ef1e289d1d2f7d8f8b8bfb11d7071f..2901b17a5fc09cc2d33e621930b37556667ff3b6 100644
--- a/dist/utils.d.ts
+++ b/dist/utils.d.ts
@@ -1,5 +1,4 @@
import { N as Nullable, A as Arrayable } from './types-d9c0fafd.js';
-import 'vite/types/hot';
import './types.d-1e7e3fdf.js';

declare const isWindows: boolean;
diff --git a/package.json b/package.json
index 8544b71a79f1669992495a002332b806ad696801..27cf57383b65be04921cf931f87c2fb64160e116 100644
--- a/package.json
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6545,7 +6545,7 @@ __metadata:

"vite-node@patch:vite-node@npm%3A0.31.0#./.yarn/patches/vite-node-npm-0.31.0-0b476529fb.patch::locator=archid-components%40workspace%3A.":
version: 0.31.0
resolution: "vite-node@patch:vite-node@npm%3A0.31.0#./.yarn/patches/vite-node-npm-0.31.0-0b476529fb.patch::version=0.31.0&hash=ccb672&locator=archid-components%40workspace%3A."
resolution: "vite-node@patch:vite-node@npm%3A0.31.0#./.yarn/patches/vite-node-npm-0.31.0-0b476529fb.patch::version=0.31.0&hash=434055&locator=archid-components%40workspace%3A."
dependencies:
cac: ^6.7.14
debug: ^4.3.4
Expand All @@ -6555,7 +6555,7 @@ __metadata:
vite: ^3.0.0 || ^4.0.0
bin:
vite-node: vite-node.mjs
checksum: ba39522f0c3704dcda3f72b69c6e8500a52e84d27680cd5aefe46913482878a3123ff19d8c794abeb60018cd0aa24d2dd7d279d5f8d513e7e49394ff50cb933c
checksum: 309aa8b9cb623c669f73085c3d3b299ff55e2499877f0cd205c18eb7f7709131823cb4647fe0b86cd1d880fb9912f381eff34fbd3932a2e9972b0b3607947f4f
languageName: node
linkType: hard

Expand Down

0 comments on commit c72cbc5

Please sign in to comment.