@modern-js/runtime-utils 2.65.5 → 2.67.0

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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { NestedRoute } from '@modern-js/types';
3
2
  export declare const transformNestedRoutes: (routes: NestedRoute[]) => import("react-router-dom").RouteObject[];
4
3
  type DeferredDataComponentType = (props?: {
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import type { Buffer } from 'buffer';
4
1
  import Fs from '@modern-js/utils/fs-extra';
5
2
  import type { Storage } from './storer/storage';
6
3
  export declare class FileReader {
@@ -11,7 +8,7 @@ export declare class FileReader {
11
8
  readFile(path: string, encoding?: 'buffer'): Promise<Buffer | null>;
12
9
  readFileFromSystem(path: string, encoding?: 'utf-8'): Promise<string | null>;
13
10
  readFileFromSystem(path: string, encoding?: 'buffer'): Promise<Buffer | null>;
14
- _readFileFactory(fs: typeof Fs): (path: string, encoding?: 'utf-8' | 'buffer') => Promise<string | Buffer | null>;
11
+ _readFileFactory(fs: typeof Fs): (path: string, encoding?: "utf-8" | "buffer") => Promise<string | Buffer | null>;
15
12
  /**
16
13
  * Clear the fileCache entriely.
17
14
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { type Readable } from 'stream';
3
2
  export declare const createReadableStreamFromReadable: (source: Readable & {
4
3
  readableHighWaterMark?: number;
@@ -1,24 +1,23 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingHttpHeaders } from 'http';
3
2
  import type { Monitors } from '@modern-js/types';
4
3
  declare const storage: {
5
4
  run: <O>(context: {
6
- monitors?: Monitors | undefined;
7
- headers?: IncomingHttpHeaders | undefined;
8
- request?: Request | undefined;
5
+ monitors?: Monitors;
6
+ headers?: IncomingHttpHeaders;
7
+ request?: Request;
9
8
  responseProxy?: {
10
9
  headers: Record<string, string>;
11
10
  status: number;
12
- } | undefined;
11
+ };
13
12
  }, cb: () => O | Promise<O>) => Promise<O>;
14
13
  useContext: () => {
15
- monitors?: Monitors | undefined;
16
- headers?: IncomingHttpHeaders | undefined;
17
- request?: Request | undefined;
14
+ monitors?: Monitors;
15
+ headers?: IncomingHttpHeaders;
16
+ request?: Request;
18
17
  responseProxy?: {
19
18
  headers: Record<string, string>;
20
19
  status: number;
21
- } | undefined;
20
+ };
22
21
  };
23
22
  };
24
23
  type Storage = typeof storage;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.65.5",
18
+ "version": "2.67.0",
19
19
  "_comment": "Provide ESM and CJS exports, ESM is used by runtime package, for treeshaking",
20
20
  "exports": {
21
21
  "./router": {
@@ -145,8 +145,8 @@
145
145
  "lru-cache": "^10.4.3",
146
146
  "react-router-dom": "6.27.0",
147
147
  "serialize-javascript": "^6.0.0",
148
- "@modern-js/utils": "2.65.5",
149
- "@modern-js/types": "2.65.5"
148
+ "@modern-js/types": "2.67.0",
149
+ "@modern-js/utils": "2.67.0"
150
150
  },
151
151
  "peerDependencies": {
152
152
  "react": ">=17.0.0",
@@ -168,8 +168,8 @@
168
168
  "react": "^18.3.1",
169
169
  "react-dom": "^18.3.1",
170
170
  "typescript": "^5",
171
- "@scripts/jest-config": "2.65.5",
172
- "@scripts/build": "2.65.5"
171
+ "@scripts/build": "2.66.0",
172
+ "@scripts/jest-config": "2.66.0"
173
173
  },
174
174
  "sideEffects": false,
175
175
  "scripts": {