@modern-js/utils 2.0.0-beta.7 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @modern-js/utils
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Minor Changes
10
+
11
+ - edd1cfb1af: feat: modernjs Access builder compiler
12
+ feat: modernjs 接入 builder 构建
13
+ - bbe4c4ab64: feat: add @modern-js/plugin-swc
14
+
15
+ feat: 新增 @modern-js/plugin-swc 插件
16
+
17
+ ### Patch Changes
18
+
19
+ - ffb2ed4: feat:
20
+
21
+ 1. change storybook runtime logic
22
+ 2. export runtime api define from runtime module
23
+ 3. refactor defineConfig in module-tools
24
+
25
+ feat:
26
+
27
+ 1. 更改 Storybook 对于 Runtime API 的处理逻辑
28
+ 2. 从 @modern-js/runtime 导出 Runtime API 的用户配置
29
+ 3. 重构 module-tools 的 defineConfig
30
+
3
31
  ## 2.0.0-beta.7
4
32
 
5
33
  ### Major Changes
package/dist/alias.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export declare type Alias = Record<string, string | string[]>;
2
- export declare type AliasOption = Alias | ((aliases: Alias) => Alias | void);
1
+ export type Alias = Record<string, string | string[]>;
2
+ export type AliasOption = Alias | ((aliases: Alias) => Alias | void);
3
3
  interface NormalizedConfig {
4
4
  source: {
5
5
  alias?: AliasOption | Array<AliasOption>;
package/dist/chainId.d.ts CHANGED
@@ -159,8 +159,8 @@ export declare const CHAIN_ID: {
159
159
  readonly AUTO_SET_ROOT_SIZE: "auto-set-root-size";
160
160
  /** HtmlAsyncChunkPlugin */
161
161
  readonly HTML_ASYNC_CHUNK: "html-async-chunk";
162
- /** SwcPolyfillCheckerPlugin */
163
- readonly SwcPolyfillCheckerPlugin: "swc-polyfill-checker-plugin";
162
+ /** SWC_POLYFILL_CHECKER */
163
+ readonly SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin";
164
164
  };
165
165
  /** Predefined minimizers */
166
166
  readonly MINIMIZER: {
@@ -181,4 +181,4 @@ export declare const CHAIN_ID: {
181
181
  readonly TS_CONFIG_PATHS: "ts-config-paths";
182
182
  };
183
183
  };
184
- export declare type ChainIdentifier = typeof CHAIN_ID;
184
+ export type ChainIdentifier = typeof CHAIN_ID;
package/dist/chainId.js CHANGED
@@ -162,8 +162,8 @@ exports.CHAIN_ID = {
162
162
  AUTO_SET_ROOT_SIZE: 'auto-set-root-size',
163
163
  /** HtmlAsyncChunkPlugin */
164
164
  HTML_ASYNC_CHUNK: 'html-async-chunk',
165
- /** SwcPolyfillCheckerPlugin */
166
- SwcPolyfillCheckerPlugin: 'swc-polyfill-checker-plugin',
165
+ /** SWC_POLYFILL_CHECKER */
166
+ SWC_POLYFILL_CHECKER: 'swc-polyfill-checker-plugin',
167
167
  },
168
168
  /** Predefined minimizers */
169
169
  MINIMIZER: {
package/dist/constants.js CHANGED
@@ -100,6 +100,8 @@ exports.INTERNAL_MODULE_TOOLS_PLUGINS = {
100
100
  '@modern-js/plugin-tailwindcss': '@modern-js/plugin-tailwindcss/cli',
101
101
  // TODO: Maybe can remove it
102
102
  '@modern-js/plugin-nocode': '@modern-js/plugin-nocode/cli',
103
+ // legacy router (inner react-router-dom v5)
104
+ '@modern-js/plugin-router-legacy': '@modern-js/plugin-router-legacy/cli',
103
105
  };
104
106
  /**
105
107
  * Internal monorepo-tools plugins that work as soon as they are installed.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Modified from https://github.com/jantimon/html-webpack-plugin/blob/2f5de7ab9e8bca60e9e200f2e4b4cfab90db28d4/index.js#L800
9
9
  */
10
- export declare type MetaAttributes = {
10
+ export type MetaAttributes = {
11
11
  [attributeName: string]: string | boolean;
12
12
  };
13
13
  export interface MetaOptions {
package/dist/logger.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Color } from '../compiled/chalk';
2
- declare type LogLevel = 'debug' | 'info' | 'warn' | 'error';
3
- declare type LogMsg = number | string | Error | null;
2
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
3
+ type LogMsg = number | string | Error | null;
4
4
  interface LoggerConfiguration {
5
5
  color?: typeof Color;
6
6
  label?: string;
@@ -15,7 +15,7 @@ interface ConstructorOptions {
15
15
  level?: string;
16
16
  types?: Record<string, LoggerConfiguration>;
17
17
  }
18
- declare type LoggerFunction = (message?: LogMsg, ...args: any[]) => void;
18
+ type LoggerFunction = (message?: LogMsg, ...args: any[]) => void;
19
19
  declare const LOG_TYPES: {
20
20
  error: {
21
21
  color: string;
@@ -56,7 +56,7 @@ declare class Logger {
56
56
  private _log;
57
57
  private getLongestLabel;
58
58
  }
59
- declare type LoggerInterface = {
59
+ type LoggerInterface = {
60
60
  [key in keyof typeof LOG_TYPES]: LoggerFunction;
61
61
  };
62
62
  declare const logger: Logger & LoggerInterface;
@@ -1,5 +1,5 @@
1
1
  /** Different from */
2
- export declare type PathMatchExpression = string | RegExp;
2
+ export type PathMatchExpression = string | RegExp;
3
3
  export interface PathMatcher {
4
4
  match: PathMatchExpression;
5
5
  mark: string | ((substring: string, ...args: any[]) => string);
package/dist/types.d.ts CHANGED
@@ -1 +1 @@
1
- export declare type Falsy = false | null | undefined | 0 | '';
1
+ export type Falsy = false | null | undefined | 0 | '';
package/dist/watch.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export declare type WatchChangeTypeValueT = 'add' | 'unlink' | 'change';
1
+ export type WatchChangeTypeValueT = 'add' | 'unlink' | 'change';
2
2
  export declare const WatchChangeType: Record<'ADD' | 'UNLINK' | 'CHANGE', WatchChangeTypeValueT>;
3
- declare type RunTaskType = (option: {
3
+ type RunTaskType = (option: {
4
4
  changedFilePath: string;
5
5
  changeType: WatchChangeTypeValueT;
6
6
  }) => void | Promise<void>;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.7",
14
+ "version": "2.0.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/index.d.ts",
17
17
  "main": "./dist/index.js",
@@ -134,9 +134,9 @@
134
134
  "jest": "^27",
135
135
  "typescript": "^4",
136
136
  "webpack": "^5.75.0",
137
- "@modern-js/types": "2.0.0-beta.7",
138
- "@scripts/jest-config": "2.0.0-beta.7",
139
- "@scripts/build": "2.0.0-beta.7"
137
+ "@modern-js/types": "2.0.0",
138
+ "@scripts/jest-config": "2.0.0",
139
+ "@scripts/build": "2.0.0"
140
140
  },
141
141
  "sideEffects": false,
142
142
  "scripts": {