@modern-js/app-tools 1.6.2 → 1.6.5

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,99 @@
1
1
  # @modern-js/app-tools
2
2
 
3
+ ## 1.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - da65bf12: chore: merge plugin-fast-refresh into webpack
8
+ - 437367c6: fix(server): hmr not working when using proxy
9
+ - 7394df61: feat: prebundle @loadable/webpack-plugin and fix peer deps warning
10
+ - Updated dependencies [5f7fccf0]
11
+ - Updated dependencies [02b0a22e]
12
+ - Updated dependencies [f730081c]
13
+ - Updated dependencies [d1ab1f05]
14
+ - Updated dependencies [da65bf12]
15
+ - Updated dependencies [2ec8181a]
16
+ - Updated dependencies [8854c600]
17
+ - Updated dependencies [f7cbc771]
18
+ - Updated dependencies [6451a098]
19
+ - Updated dependencies [cdc2df9c]
20
+ - Updated dependencies [f5c48c3f]
21
+ - Updated dependencies [b39b399e]
22
+ - Updated dependencies [192dbc78]
23
+ - Updated dependencies [430d417e]
24
+ - Updated dependencies [658b4dd5]
25
+ - Updated dependencies [7fcfd6cc]
26
+ - Updated dependencies [d5a2cfd8]
27
+ - Updated dependencies [45d5643a]
28
+ - Updated dependencies [0d161fa8]
29
+ - Updated dependencies [437367c6]
30
+ - Updated dependencies [280eebf9]
31
+ - Updated dependencies [2ba8d62f]
32
+ - Updated dependencies [7394df61]
33
+ - @modern-js/webpack@1.9.0
34
+ - @modern-js/core@1.11.1
35
+ - @modern-js/server@1.4.16
36
+ - @modern-js/utils@1.7.6
37
+ - @modern-js/types@1.5.4
38
+ - @modern-js/prod-server@1.1.6
39
+ - @modern-js/plugin-analyze@1.4.5
40
+
41
+ ## 1.6.4
42
+
43
+ ### Patch Changes
44
+
45
+ - d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
46
+ - Updated dependencies [d2995e7d7]
47
+ - Updated dependencies [47934c4da]
48
+ - Updated dependencies [d5913bd96]
49
+ - Updated dependencies [d32f35134]
50
+ - Updated dependencies [43d9bb5fa]
51
+ - Updated dependencies [b1f7d2aa6]
52
+ - Updated dependencies [86fe5a657]
53
+ - Updated dependencies [d9d398e16]
54
+ - Updated dependencies [97086dde8]
55
+ - Updated dependencies [6ae4a34ae]
56
+ - Updated dependencies [97086dde8]
57
+ - Updated dependencies [97086dde8]
58
+ - Updated dependencies [b80229c79]
59
+ - Updated dependencies [ff6219909]
60
+ - Updated dependencies [948cc4436]
61
+ - @modern-js/webpack@1.7.0
62
+ - @modern-js/plugin@1.3.4
63
+ - @modern-js/core@1.10.2
64
+ - @modern-js/i18n-cli-language-detector@1.2.3
65
+ - @modern-js/plugin-analyze@1.4.3
66
+ - @modern-js/plugin-fast-refresh@1.2.6
67
+ - @modern-js/plugin-i18n@1.2.6
68
+ - @modern-js/new-action@1.3.9
69
+ - @modern-js/prod-server@1.1.5
70
+ - @modern-js/server@1.4.14
71
+ - @modern-js/node-bundle-require@1.3.3
72
+ - @modern-js/types@1.5.3
73
+ - @modern-js/utils@1.7.3
74
+
75
+ ## 1.6.3
76
+
77
+ ### Patch Changes
78
+
79
+ - 69a728375: fix: remove exports.jsnext:source after publish
80
+ - Updated dependencies [b7b8075dc]
81
+ - Updated dependencies [cd7346b0d]
82
+ - Updated dependencies [0e0537005]
83
+ - Updated dependencies [6b0bb5e3b]
84
+ - Updated dependencies [738c55d39]
85
+ - Updated dependencies [69a728375]
86
+ - @modern-js/webpack@1.6.2
87
+ - @modern-js/utils@1.7.2
88
+ - @modern-js/server@1.4.13
89
+ - @modern-js/new-action@1.3.8
90
+ - @modern-js/core@1.10.1
91
+ - @modern-js/plugin-analyze@1.4.2
92
+ - @modern-js/plugin-fast-refresh@1.2.5
93
+ - @modern-js/plugin-i18n@1.2.5
94
+ - @modern-js/prod-server@1.1.4
95
+ - @modern-js/node-bundle-require@1.3.2
96
+
3
97
  ## 1.6.2
4
98
 
5
99
  ### Patch Changes
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
 
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
- import { fs, logger, HMR_SOCK_PATH, clearConsole, chalk, isSSR } from '@modern-js/utils';
7
+ import { fs, logger, chalk, isSSR, clearConsole } from '@modern-js/utils';
8
8
  import { createCompiler } from "../utils/createCompiler";
9
9
  import { createServer } from "../utils/createServer";
10
10
  import { generateRoutes } from "../utils/routes";
@@ -61,10 +61,7 @@ export const dev = async (api, options) => {
61
61
  dev: _objectSpread(_objectSpread({}, {
62
62
  client: {
63
63
  port: port.toString(),
64
- overlay: false,
65
- logging: 'none',
66
- path: HMR_SOCK_PATH,
67
- host: 'localhost'
64
+ logging: 'none'
68
65
  },
69
66
  devMiddleware: {
70
67
  writeToDisk: file => !file.includes('.hot-update.')
@@ -7,7 +7,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
7
7
  import * as path from 'path';
8
8
  import { defineConfig, cli } from '@modern-js/core';
9
9
  import AnalyzePlugin from '@modern-js/plugin-analyze';
10
- import FastRefreshPlugin from '@modern-js/plugin-fast-refresh/cli';
11
10
  import { cleanRequireCache } from '@modern-js/utils';
12
11
  import { hooks } from "./hooks";
13
12
  import { i18n, localeKeys } from "./locale";
@@ -18,9 +17,9 @@ import { closeServer } from "./utils/createServer";
18
17
  export { defineConfig };
19
18
  export default (() => ({
20
19
  name: '@modern-js/app-tools',
21
- post: ['@modern-js/plugin-analyze', '@modern-js/plugin-fast-refresh', '@modern-js/plugin-ssr', '@modern-js/plugin-state', '@modern-js/plugin-router', '@modern-js/plugin-polyfill'],
20
+ post: ['@modern-js/plugin-analyze', '@modern-js/plugin-ssr', '@modern-js/plugin-state', '@modern-js/plugin-router', '@modern-js/plugin-polyfill'],
22
21
  registerHook: hooks,
23
- usePlugins: [AnalyzePlugin(), FastRefreshPlugin()],
22
+ usePlugins: [AnalyzePlugin()],
24
23
  setup: api => {
25
24
  const locale = getLocaleLanguage();
26
25
  i18n.changeLanguage({
@@ -87,7 +86,7 @@ export default (() => ({
87
86
  },
88
87
 
89
88
  async beforeRestart() {
90
- cleanRequireCache([require.resolve('@modern-js/plugin-analyze/cli'), require.resolve('@modern-js/plugin-fast-refresh/cli')]);
89
+ cleanRequireCache([require.resolve('@modern-js/plugin-analyze/cli')]);
91
90
  }
92
91
 
93
92
  };
@@ -81,10 +81,7 @@ const dev = async (api, options) => {
81
81
  dev: _objectSpread(_objectSpread({}, {
82
82
  client: {
83
83
  port: port.toString(),
84
- overlay: false,
85
- logging: 'none',
86
- path: _utils.HMR_SOCK_PATH,
87
- host: 'localhost'
84
+ logging: 'none'
88
85
  },
89
86
  devMiddleware: {
90
87
  writeToDisk: file => !file.includes('.hot-update.')
@@ -17,8 +17,6 @@ var _core = require("@modern-js/core");
17
17
 
18
18
  var _pluginAnalyze = _interopRequireDefault(require("@modern-js/plugin-analyze"));
19
19
 
20
- var _cli = _interopRequireDefault(require("@modern-js/plugin-fast-refresh/cli"));
21
-
22
20
  var _utils = require("@modern-js/utils");
23
21
 
24
22
  var _hooks = require("./hooks");
@@ -47,9 +45,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
47
45
 
48
46
  var _default = () => ({
49
47
  name: '@modern-js/app-tools',
50
- post: ['@modern-js/plugin-analyze', '@modern-js/plugin-fast-refresh', '@modern-js/plugin-ssr', '@modern-js/plugin-state', '@modern-js/plugin-router', '@modern-js/plugin-polyfill'],
48
+ post: ['@modern-js/plugin-analyze', '@modern-js/plugin-ssr', '@modern-js/plugin-state', '@modern-js/plugin-router', '@modern-js/plugin-polyfill'],
51
49
  registerHook: _hooks.hooks,
52
- usePlugins: [(0, _pluginAnalyze.default)(), (0, _cli.default)()],
50
+ usePlugins: [(0, _pluginAnalyze.default)()],
53
51
  setup: api => {
54
52
  const locale = (0, _language.getLocaleLanguage)();
55
53
 
@@ -118,7 +116,7 @@ var _default = () => ({
118
116
  },
119
117
 
120
118
  async beforeRestart() {
121
- (0, _utils.cleanRequireCache)([require.resolve('@modern-js/plugin-analyze/cli'), require.resolve('@modern-js/plugin-fast-refresh/cli')]);
119
+ (0, _utils.cleanRequireCache)([require.resolve('@modern-js/plugin-analyze/cli')]);
122
120
  }
123
121
 
124
122
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.6.2",
14
+ "version": "1.6.5",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -57,25 +57,24 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@babel/runtime": "^7",
60
- "@modern-js/core": "^1.10.0",
61
- "@modern-js/i18n-cli-language-detector": "^1.2.2",
62
- "@modern-js/new-action": "^1.3.7",
63
- "@modern-js/node-bundle-require": "^1.3.2",
64
- "@modern-js/plugin": "^1.3.3",
65
- "@modern-js/plugin-analyze": "^1.4.1",
66
- "@modern-js/plugin-fast-refresh": "^1.2.4",
67
- "@modern-js/plugin-i18n": "^1.2.4",
68
- "@modern-js/prod-server": "^1.1.3",
69
- "@modern-js/server": "^1.4.12",
70
- "@modern-js/types": "^1.5.2",
71
- "@modern-js/utils": "^1.7.0",
72
- "@modern-js/webpack": "^1.6.0"
60
+ "@modern-js/core": "^1.11.1",
61
+ "@modern-js/i18n-cli-language-detector": "^1.2.3",
62
+ "@modern-js/new-action": "^1.3.9",
63
+ "@modern-js/node-bundle-require": "^1.3.3",
64
+ "@modern-js/plugin": "^1.3.4",
65
+ "@modern-js/plugin-analyze": "^1.4.5",
66
+ "@modern-js/plugin-i18n": "^1.2.6",
67
+ "@modern-js/prod-server": "^1.1.6",
68
+ "@modern-js/server": "^1.4.16",
69
+ "@modern-js/types": "^1.5.4",
70
+ "@modern-js/utils": "^1.7.6",
71
+ "@modern-js/webpack": "^1.9.0"
73
72
  },
74
73
  "devDependencies": {
75
- "@modern-js/server-core": "1.3.3",
74
+ "@modern-js/server-core": "1.3.5",
76
75
  "@scripts/build": "0.0.0",
77
76
  "@scripts/jest-config": "0.0.0",
78
- "@types/jest": "^26",
77
+ "@types/jest": "^27",
79
78
  "@types/node": "^14",
80
79
  "@types/react": "^17",
81
80
  "@types/react-dom": "^17",
@@ -87,11 +86,34 @@
87
86
  "registry": "https://registry.npmjs.org/",
88
87
  "access": "public"
89
88
  },
89
+ "wireit": {
90
+ "build": {
91
+ "command": "modern build",
92
+ "files": [
93
+ "src/**/*",
94
+ "tsconfig.json",
95
+ "package.json"
96
+ ],
97
+ "output": [
98
+ "dist/**/*"
99
+ ]
100
+ },
101
+ "test": {
102
+ "command": "jest --passWithNoTests",
103
+ "files": [
104
+ "src/**/*",
105
+ "tsconfig.json",
106
+ "package.json",
107
+ "tests/**/*"
108
+ ],
109
+ "output": []
110
+ }
111
+ },
90
112
  "scripts": {
91
113
  "new": "modern new",
92
114
  "dev": "modern build --watch",
93
- "build": "modern build",
94
- "test": "jest --passWithNoTests"
115
+ "build": "wireit",
116
+ "test": "wireit"
95
117
  },
96
118
  "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"
97
119
  }
package/.eslintrc.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
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/modern.config.js DELETED
@@ -1,7 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {
3
- output: {
4
- packageMode: 'node-js',
5
- disableSourceMap: true,
6
- },
7
- };
package/tsconfig.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "esModuleInterop": true,
6
- "allowJs": true,
7
- "jsx": "preserve",
8
- "baseUrl": "./",
9
- "skipLibCheck": true,
10
- "isolatedModules": true,
11
- "paths": {}
12
- },
13
- "include": ["src"]
14
- }