@modern-js/app-tools 2.33.1 → 2.34.1-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/bin/modern.js CHANGED
@@ -11,5 +11,5 @@ require('@modern-js/core/runBin').run({
11
11
  server: INTERNAL_SERVER_PLUGINS,
12
12
  autoLoad: INTERNAL_APP_TOOLS_RUNTIME_PLUGINS,
13
13
  },
14
- initialLog: `@modern-js/app-tools v${require('../package.json').version}`,
14
+ initialLog: `Modern.js Framework v${require('../package.json').version}`,
15
15
  });
@@ -116,6 +116,7 @@ const NESTED_ROUTE = {
116
116
  PAGE_DATA_FILE: "page.data",
117
117
  PAGE_CLIENT_LOADER: "page.data.client",
118
118
  SPLATE_FILE: "$",
119
+ SPLATE_CONFIG_FILE: "$.config",
119
120
  SPLATE_LOADER_FILE: "$.loader",
120
121
  SPLATE_DATA_FILE: "$.data",
121
122
  SPLATE_CLIENT_DATA: "$.data.client",
@@ -190,6 +190,11 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
190
190
  if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_CLIENT_DATA) {
191
191
  splatClientData = itemPath;
192
192
  }
193
+ if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_CONFIG_FILE) {
194
+ if (!route.config) {
195
+ route.config = itemPath;
196
+ }
197
+ }
193
198
  if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_DATA_FILE) {
194
199
  splatData = itemPath;
195
200
  }
@@ -37,6 +37,7 @@ export var NESTED_ROUTE = {
37
37
  PAGE_DATA_FILE: "page.data",
38
38
  PAGE_CLIENT_LOADER: "page.data.client",
39
39
  SPLATE_FILE: "$",
40
+ SPLATE_CONFIG_FILE: "$.config",
40
41
  SPLATE_LOADER_FILE: "$.loader",
41
42
  SPLATE_DATA_FILE: "$.data",
42
43
  SPLATE_CLIENT_DATA: "$.data.client",
@@ -229,6 +229,11 @@ export var walk = function() {
229
229
  if (itemWithoutExt === NESTED_ROUTE.SPLATE_CLIENT_DATA) {
230
230
  splatClientData = itemPath;
231
231
  }
232
+ if (itemWithoutExt === NESTED_ROUTE.SPLATE_CONFIG_FILE) {
233
+ if (!route.config) {
234
+ route.config = itemPath;
235
+ }
236
+ }
232
237
  if (itemWithoutExt === NESTED_ROUTE.SPLATE_DATA_FILE) {
233
238
  splatData = itemPath;
234
239
  }
@@ -37,6 +37,7 @@ export const NESTED_ROUTE = {
37
37
  PAGE_DATA_FILE: "page.data",
38
38
  PAGE_CLIENT_LOADER: "page.data.client",
39
39
  SPLATE_FILE: "$",
40
+ SPLATE_CONFIG_FILE: "$.config",
40
41
  SPLATE_LOADER_FILE: "$.loader",
41
42
  SPLATE_DATA_FILE: "$.data",
42
43
  SPLATE_CLIENT_DATA: "$.data.client",
@@ -167,6 +167,11 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
167
167
  if (itemWithoutExt === NESTED_ROUTE.SPLATE_CLIENT_DATA) {
168
168
  splatClientData = itemPath;
169
169
  }
170
+ if (itemWithoutExt === NESTED_ROUTE.SPLATE_CONFIG_FILE) {
171
+ if (!route.config) {
172
+ route.config = itemPath;
173
+ }
174
+ }
170
175
  if (itemWithoutExt === NESTED_ROUTE.SPLATE_DATA_FILE) {
171
176
  splatData = itemPath;
172
177
  }
@@ -28,6 +28,7 @@ export declare const NESTED_ROUTE: {
28
28
  PAGE_DATA_FILE: string;
29
29
  PAGE_CLIENT_LOADER: string;
30
30
  SPLATE_FILE: string;
31
+ SPLATE_CONFIG_FILE: string;
31
32
  SPLATE_LOADER_FILE: string;
32
33
  SPLATE_DATA_FILE: string;
33
34
  SPLATE_CLIENT_DATA: string;
@@ -1,6 +1,7 @@
1
1
  import { IAppContext, PluginAPI } from '@modern-js/core';
2
2
  import type { Entrypoint } from '@modern-js/types';
3
- import { AppNormalizedConfig, AppTools, ImportStatement, Rspack, webpack } from '../types';
3
+ import { BundlerConfig } from '@modern-js/builder-shared';
4
+ import { AppNormalizedConfig, AppTools, ImportStatement } from '../types';
4
5
  export declare const createImportStatements: (statements: ImportStatement[]) => string;
5
6
  export declare const generateCode: (appContext: IAppContext, config: AppNormalizedConfig<'shared'>, entrypoints: Entrypoint[], api: PluginAPI<AppTools<'shared'>>) => Promise<{
6
7
  importsStatemets: Map<string, ImportStatement[]>;
@@ -18,5 +19,5 @@ export declare const generateIndexCode: ({
18
19
  entrypoints: Entrypoint[];
19
20
  config: AppNormalizedConfig<'shared'>;
20
21
  importsStatemets: Map<string, ImportStatement[]>;
21
- bundlerConfigs?: webpack.Configuration[] | Rspack.RspackOptions[] | undefined;
22
+ bundlerConfigs?: BundlerConfig[] | undefined;
22
23
  }) => Promise<void>;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.33.1",
18
+ "version": "2.34.1-alpha.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -66,31 +66,31 @@
66
66
  "modern-app": "./bin/modern.js"
67
67
  },
68
68
  "dependencies": {
69
- "@babel/parser": "^7.21.8",
70
- "@babel/traverse": "^7.21.5",
71
- "@babel/types": "^7.21.5",
69
+ "@babel/parser": "^7.22.15",
70
+ "@babel/traverse": "^7.22.15",
71
+ "@babel/types": "^7.22.15",
72
72
  "es-module-lexer": "^1.1.0",
73
73
  "esbuild": "0.17.19",
74
74
  "rspack-plugin-virtual-module": "0.1.7",
75
75
  "@swc/helpers": "0.5.1",
76
- "@modern-js/builder": "2.33.1",
77
- "@modern-js/builder-plugin-esbuild": "2.33.1",
78
- "@modern-js/builder-plugin-node-polyfill": "2.33.1",
79
- "@modern-js/builder-shared": "2.33.1",
80
- "@modern-js/builder-webpack-provider": "2.33.1",
81
- "@modern-js/core": "2.33.1",
82
- "@modern-js/new-action": "2.33.1",
83
- "@modern-js/node-bundle-require": "2.33.1",
84
- "@modern-js/plugin": "2.33.1",
85
- "@modern-js/plugin-data-loader": "2.33.1",
86
- "@modern-js/plugin-i18n": "2.33.1",
87
- "@modern-js/plugin-lint": "2.33.1",
88
- "@modern-js/prod-server": "2.33.1",
89
- "@modern-js/server": "2.33.1",
90
- "@modern-js/types": "2.33.1",
91
- "@modern-js/upgrade": "2.33.1",
92
- "@modern-js/server-core": "2.33.1",
93
- "@modern-js/utils": "2.33.1"
76
+ "@modern-js/builder": "2.34.0",
77
+ "@modern-js/builder-shared": "2.34.0",
78
+ "@modern-js/builder-plugin-node-polyfill": "2.34.0",
79
+ "@modern-js/core": "2.34.0",
80
+ "@modern-js/new-action": "2.34.0",
81
+ "@modern-js/node-bundle-require": "2.34.0",
82
+ "@modern-js/builder-webpack-provider": "2.34.0",
83
+ "@modern-js/plugin": "2.34.0",
84
+ "@modern-js/builder-plugin-esbuild": "2.34.0",
85
+ "@modern-js/plugin-data-loader": "2.34.0",
86
+ "@modern-js/server": "2.34.0",
87
+ "@modern-js/prod-server": "2.34.0",
88
+ "@modern-js/plugin-lint": "2.34.0",
89
+ "@modern-js/plugin-i18n": "2.34.0",
90
+ "@modern-js/upgrade": "2.34.0",
91
+ "@modern-js/types": "2.34.0",
92
+ "@modern-js/server-core": "2.34.0",
93
+ "@modern-js/utils": "2.34.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@types/babel__traverse": "^7.14.2",
@@ -99,13 +99,13 @@
99
99
  "jest": "^29",
100
100
  "typescript": "^5",
101
101
  "webpack": "^5.88.1",
102
- "@modern-js/builder-plugin-swc": "2.33.1",
103
- "@modern-js/builder-rspack-provider": "2.33.1",
104
- "@scripts/jest-config": "2.33.1",
105
- "@scripts/build": "2.33.1"
102
+ "@modern-js/builder-rspack-provider": "2.34.0",
103
+ "@scripts/build": "2.34.0",
104
+ "@modern-js/builder-plugin-swc": "2.34.0",
105
+ "@scripts/jest-config": "2.34.0"
106
106
  },
107
107
  "peerDependencies": {
108
- "@modern-js/builder-rspack-provider": "^2.33.1"
108
+ "@modern-js/builder-rspack-provider": "^2.34.0"
109
109
  },
110
110
  "peerDependenciesMeta": {
111
111
  "@modern-js/builder-rspack-provider": {