@utoo/pack-shared 1.1.14 → 1.1.16-alpha.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.
package/cjs/config.d.ts CHANGED
@@ -25,23 +25,29 @@ export type RustifiedEnv = {
25
25
  }[];
26
26
  export interface ExperimentalConfig {
27
27
  }
28
- export type TurbopackRuleConfigItem = TurbopackRuleConfigItemOptions | {
29
- [condition: string]: TurbopackRuleConfigItem;
30
- } | false;
31
- /**
32
- * @deprecated Use `TurbopackRuleConfigItem` instead.
33
- */
28
+ export type JSONValue = string | number | boolean | JSONValue[] | {
29
+ [k: string]: JSONValue;
30
+ };
31
+ export type TurbopackLoaderOptions = Record<string, JSONValue>;
34
32
  export type TurbopackLoaderItem = string | {
35
33
  loader: string;
36
- options: Record<string, JSONValue>;
34
+ options?: TurbopackLoaderOptions;
35
+ };
36
+ export type TurbopackLoaderBuiltinCondition = "browser" | "foreign" | "development" | "production" | "node" | "edge-light";
37
+ export type TurbopackRuleCondition = {
38
+ all: TurbopackRuleCondition[];
39
+ } | {
40
+ any: TurbopackRuleCondition[];
41
+ } | {
42
+ not: TurbopackRuleCondition;
43
+ } | TurbopackLoaderBuiltinCondition | {
44
+ path?: string | RegExp;
45
+ content?: RegExp;
37
46
  };
38
- export type TurbopackRuleConfigItemOrShortcut = TurbopackLoaderItem[] | TurbopackRuleConfigItem;
39
- export type TurbopackRuleConfigItemOptions = {
47
+ export type TurbopackRuleConfigItem = {
40
48
  loaders: TurbopackLoaderItem[];
41
49
  as?: string;
42
- };
43
- export type TurbopackRuleCondition = {
44
- path: string | RegExp;
50
+ condition?: TurbopackRuleCondition;
45
51
  };
46
52
  export interface ModuleOptions {
47
53
  rules?: Record<string, TurbopackRuleConfigItem>;
@@ -195,9 +201,6 @@ export interface EmotionConfig {
195
201
  };
196
202
  };
197
203
  }
198
- export type JSONValue = string | number | boolean | JSONValue[] | {
199
- [k: string]: JSONValue;
200
- };
201
204
  export interface BundleOptions {
202
205
  /**
203
206
  * The utoo pack configs.
package/esm/config.d.ts CHANGED
@@ -25,23 +25,29 @@ export type RustifiedEnv = {
25
25
  }[];
26
26
  export interface ExperimentalConfig {
27
27
  }
28
- export type TurbopackRuleConfigItem = TurbopackRuleConfigItemOptions | {
29
- [condition: string]: TurbopackRuleConfigItem;
30
- } | false;
31
- /**
32
- * @deprecated Use `TurbopackRuleConfigItem` instead.
33
- */
28
+ export type JSONValue = string | number | boolean | JSONValue[] | {
29
+ [k: string]: JSONValue;
30
+ };
31
+ export type TurbopackLoaderOptions = Record<string, JSONValue>;
34
32
  export type TurbopackLoaderItem = string | {
35
33
  loader: string;
36
- options: Record<string, JSONValue>;
34
+ options?: TurbopackLoaderOptions;
35
+ };
36
+ export type TurbopackLoaderBuiltinCondition = "browser" | "foreign" | "development" | "production" | "node" | "edge-light";
37
+ export type TurbopackRuleCondition = {
38
+ all: TurbopackRuleCondition[];
39
+ } | {
40
+ any: TurbopackRuleCondition[];
41
+ } | {
42
+ not: TurbopackRuleCondition;
43
+ } | TurbopackLoaderBuiltinCondition | {
44
+ path?: string | RegExp;
45
+ content?: RegExp;
37
46
  };
38
- export type TurbopackRuleConfigItemOrShortcut = TurbopackLoaderItem[] | TurbopackRuleConfigItem;
39
- export type TurbopackRuleConfigItemOptions = {
47
+ export type TurbopackRuleConfigItem = {
40
48
  loaders: TurbopackLoaderItem[];
41
49
  as?: string;
42
- };
43
- export type TurbopackRuleCondition = {
44
- path: string | RegExp;
50
+ condition?: TurbopackRuleCondition;
45
51
  };
46
52
  export interface ModuleOptions {
47
53
  rules?: Record<string, TurbopackRuleConfigItem>;
@@ -195,9 +201,6 @@ export interface EmotionConfig {
195
201
  };
196
202
  };
197
203
  }
198
- export type JSONValue = string | number | boolean | JSONValue[] | {
199
- [k: string]: JSONValue;
200
- };
201
204
  export interface BundleOptions {
202
205
  /**
203
206
  * The utoo pack configs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack-shared",
3
- "version": "1.1.14",
3
+ "version": "1.1.16-alpha.0",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "types": "esm/index.d.ts",