@modern-js/core 1.10.0 → 1.10.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @modern-js/core
2
2
 
3
+ ## 1.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - a37960018: refactor: modify deploy microFrontend type
8
+ - Updated dependencies [b8cfc42cd]
9
+ - Updated dependencies [804a5bb8a]
10
+ - @modern-js/utils@1.7.4
11
+
12
+ ## 1.10.2
13
+
14
+ ### Patch Changes
15
+
16
+ - d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
17
+ - d9d398e16: add filter logic for merge config
18
+ - Updated dependencies [d5913bd96]
19
+ - Updated dependencies [d32f35134]
20
+ - Updated dependencies [6ae4a34ae]
21
+ - Updated dependencies [b80229c79]
22
+ - Updated dependencies [948cc4436]
23
+ - @modern-js/plugin@1.3.4
24
+ - @modern-js/load-config@1.3.3
25
+ - @modern-js/utils@1.7.3
26
+
27
+ ## 1.10.1
28
+
29
+ ### Patch Changes
30
+
31
+ - 69a728375: fix: remove exports.jsnext:source after publish
32
+ - Updated dependencies [cd7346b0d]
33
+ - Updated dependencies [69a728375]
34
+ - @modern-js/utils@1.7.2
35
+ - @modern-js/load-config@1.3.2
36
+
3
37
  ## 1.10.0
4
38
 
5
39
  ### Minor Changes
@@ -1 +1 @@
1
- {"name":"ajv","author":"Evgeny Poberezkin","version":"8.11.0","funding":{"type":"github","url":"https://github.com/sponsors/epoberezkin"},"license":"MIT","types":"dist/ajv.d.ts"}
1
+ {"name":"ajv","author":"Evgeny Poberezkin","version":"8.11.0","funding":{"type":"github","url":"https://github.com/sponsors/epoberezkin"},"license":"MIT","types":"types/ajv.d.ts"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -9,7 +9,11 @@ const utils_1 = require("@modern-js/utils");
9
9
  * @param configs - Configuration from modern.config.ts or plugin's config hook.
10
10
  * @returns - normalized user config.
11
11
  */
12
- const mergeConfig = (configs) => (0, lodash_1.mergeWith)({}, ...configs, (target, source) => {
12
+ const mergeConfig = (configs) => (0, lodash_1.mergeWith)({}, ...configs, (target, source, key) => {
13
+ // Do not use the following merge logic for source.designSystem and tools.tailwind(css)
14
+ if (key === 'designSystem' || key === 'tailwind' || key === 'tailwindcss') {
15
+ return (0, lodash_1.mergeWith)({}, target !== null && target !== void 0 ? target : {}, source !== null && source !== void 0 ? source : {});
16
+ }
13
17
  if (Array.isArray(target)) {
14
18
  if (Array.isArray(source)) {
15
19
  return [...target, ...source];
@@ -5,7 +5,7 @@ import type { MetaOptions } from '@modern-js/utils';
5
5
  import type { TransformOptions } from '@babel/core';
6
6
  import type webpack from 'webpack';
7
7
  import type { Configuration as WebpackConfiguration } from 'webpack';
8
- import autoprefixer from 'autoprefixer';
8
+ import type autoprefixer from 'autoprefixer';
9
9
  import type { BasePluginOptions, TerserOptions as RawTerserOptions } from 'terser-webpack-plugin';
10
10
  import type { PluginConfig } from '../../loadPlugins';
11
11
  import type { TestConfig, JestConfig } from './test';
@@ -133,7 +133,7 @@ export interface MicroFrontend {
133
133
  moduleApp?: string;
134
134
  }
135
135
  export interface DeployConfig {
136
- microFrontend?: false | MicroFrontend;
136
+ microFrontend?: boolean | MicroFrontend;
137
137
  domain?: string | Array<string>;
138
138
  domainByEntries?: Record<string, string | Array<string>>;
139
139
  }
@@ -10,7 +10,7 @@ export declare type LoadedPlugin = {
10
10
  export declare type TransformPlugin = (plugin: PluginConfig, resolvedConfig: UserConfig, pluginOptions?: any) => PluginConfig;
11
11
  /**
12
12
  * @deprecated
13
- * Using NewPluginConfig insteand.
13
+ * Using NewPluginConfig instead.
14
14
  */
15
15
  declare type OldPluginConfig = Array<PluginItem | {
16
16
  cli?: PluginItem;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.10.0",
14
+ "version": "1.10.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/index.d.ts",
17
17
  "main": "./dist/index.js",
@@ -40,18 +40,18 @@
40
40
  },
41
41
  "bin": "./bin/modern-js.js",
42
42
  "dependencies": {
43
- "@modern-js/load-config": "^1.3.1",
44
- "@modern-js/plugin": "^1.3.3",
45
- "@modern-js/utils": "^1.7.0"
43
+ "@modern-js/load-config": "^1.3.3",
44
+ "@modern-js/plugin": "^1.3.4",
45
+ "@modern-js/utils": "^1.7.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@jest/types": "^27.0.6",
49
- "@modern-js/types": "1.5.2",
49
+ "@modern-js/types": "1.5.3",
50
50
  "@scripts/build": "0.0.0",
51
51
  "@scripts/jest-config": "0.0.0",
52
52
  "@types/babel__code-frame": "^7.0.3",
53
53
  "@types/babel__core": "^7.1.16",
54
- "@types/jest": "^26",
54
+ "@types/jest": "^27",
55
55
  "@types/less": "^3.0.3",
56
56
  "@types/node": "^14",
57
57
  "@types/react": "^17",
@@ -70,11 +70,34 @@
70
70
  "registry": "https://registry.npmjs.org/",
71
71
  "access": "public"
72
72
  },
73
+ "wireit": {
74
+ "build": {
75
+ "command": "tsc",
76
+ "files": [
77
+ "src/**/*",
78
+ "tsconfig.json",
79
+ "package.json"
80
+ ],
81
+ "output": [
82
+ "dist/**/*"
83
+ ]
84
+ },
85
+ "test": {
86
+ "command": "jest",
87
+ "files": [
88
+ "src/**/*",
89
+ "tsconfig.json",
90
+ "package.json",
91
+ "tests/**/*"
92
+ ],
93
+ "output": []
94
+ }
95
+ },
73
96
  "scripts": {
74
97
  "new": "modern new",
75
- "build": "tsc",
98
+ "build": "wireit",
76
99
  "dev": "tsc --watch",
77
- "test": "jest"
100
+ "test": "wireit"
78
101
  },
79
102
  "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
80
103
  }
package/.eslintrc.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- ignorePatterns: ['compiled/'],
5
- parserOptions: {
6
- tsconfigRootDir: __dirname,
7
- project: ['./tsconfig.json'],
8
- },
9
- };
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/tsconfig.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "target": "ES2019",
5
- "declaration": true,
6
- "outDir": "./dist",
7
- "baseUrl": "./",
8
- "isolatedModules": true,
9
- "esModuleInterop": true
10
- },
11
- "include": ["src"]
12
- }