@modern-js/runtime-utils 2.58.1 → 2.58.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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import Fs from '@modern-js/utils/fs-extra';
3
- import { Storage } from './storer/storage';
3
+ import type { Storage } from './storer/storage';
4
4
  export declare class FileReader {
5
5
  private storage;
6
6
  private fs;
@@ -1,5 +1,5 @@
1
- import { RequestPayload } from '@modern-js/types';
2
- import { LoaderContext } from './createLoaderCtx';
1
+ import type { RequestPayload } from '@modern-js/types';
2
+ import type { LoaderContext } from './createLoaderCtx';
3
3
  interface Get<P extends Record<string, unknown>> {
4
4
  <Key extends keyof P>(key: Key): P[Key];
5
5
  <T>(key: LoaderContext<T>): T;
@@ -1,4 +1,4 @@
1
- import { Container } from '@modern-js/types';
1
+ import type { Container } from '@modern-js/types';
2
2
  interface MemoryContainerOptions {
3
3
  /** The maximum size of the cache, unit(MB). The default of value is 256. */
4
4
  max?: number;
@@ -1,4 +1,4 @@
1
- import { Container } from '@modern-js/types';
1
+ import type { Container } from '@modern-js/types';
2
2
  export declare class Storage<V = unknown> {
3
3
  private namespace;
4
4
  private container;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Readable } from 'stream';
2
+ import { type Readable } from 'stream';
3
3
  export declare const createReadableStreamFromReadable: (source: Readable & {
4
4
  readableHighWaterMark?: number;
5
5
  }) => ReadableStream<Uint8Array>;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.58.1",
18
+ "version": "2.58.2",
19
19
  "_comment": "Provide ESM and CJS exports, ESM is used by runtime package, for treeshaking",
20
20
  "exports": {
21
21
  "./router": {
@@ -29,6 +29,7 @@
29
29
  "default": "./dist/esm/remixRouter.js"
30
30
  },
31
31
  "./browser": {
32
+ "types": "./dist/types/browser/index.d.ts",
32
33
  "jsnext:source": "./src/browser/index.d.ts",
33
34
  "require": "./dist/cjs/browser/index.js",
34
35
  "default": "./dist/esm/browser/index.js"
@@ -130,7 +131,7 @@
130
131
  "lru-cache": "^6.0.0",
131
132
  "react-router-dom": "6.22.0",
132
133
  "serialize-javascript": "^6.0.0",
133
- "@modern-js/utils": "2.58.1"
134
+ "@modern-js/utils": "2.58.2"
134
135
  },
135
136
  "peerDependencies": {
136
137
  "react": ">=17.0.0",
@@ -153,9 +154,9 @@
153
154
  "react": "^18.2.0",
154
155
  "react-dom": "^18.2.0",
155
156
  "typescript": "^5",
156
- "@scripts/jest-config": "2.58.1",
157
- "@scripts/build": "2.58.1",
158
- "@modern-js/types": "2.58.1"
157
+ "@modern-js/types": "2.58.2",
158
+ "@scripts/build": "2.58.2",
159
+ "@scripts/jest-config": "2.58.2"
159
160
  },
160
161
  "sideEffects": false,
161
162
  "scripts": {