Skip to content

Commit

Permalink
Merge pull request #147 from bytedance/feat/0.2.27
Browse files Browse the repository at this point in the history
Feat/0.2.27
  • Loading branch information
1198994985 authored Sep 9, 2022
2 parents 4f345eb + db36410 commit 997d3d9
Show file tree
Hide file tree
Showing 28 changed files with 206 additions and 191 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.26",
"version": "0.2.27",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
Expand Down
6 changes: 3 additions & 3 deletions packages/mona-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-cli",
"version": "0.2.26",
"version": "0.2.27",
"displayName": "mona",
"description": "Merchant app's developing and building tools",
"main": "./bin/mona",
Expand All @@ -20,8 +20,8 @@
"author": "zhangxiaowei.chris@bytedance.com",
"license": "MIT",
"dependencies": {
"@bytedance/mona-service": "0.2.26",
"@bytedance/mona-shared": "0.2.26",
"@bytedance/mona-service": "0.2.27",
"@bytedance/mona-shared": "0.2.27",
"chalk": "^4.1.2",
"command-line-usage": "^6.1.1",
"compare-version": "^0.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/mona-clients/mona-client-mini/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-client-mini",
"version": "0.2.26",
"version": "0.2.27",
"description": "miniapp for mona",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -21,8 +21,8 @@
"license": "MIT",
"sideEffects": false,
"dependencies": {
"@bytedance/mona": "0.2.26",
"@bytedance/mona-shared": "0.2.26",
"@bytedance/mona": "0.2.27",
"@bytedance/mona-shared": "0.2.27",
"react-reconciler": "^0.26.2",
"scheduler": "^0.20.2"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/mona-clients/mona-client-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-client-plugin",
"version": "0.2.26",
"version": "0.2.27",
"description": "plugin for mona",
"main": "./dist/index.js",
"files": [
Expand All @@ -17,10 +17,10 @@
"mona"
],
"dependencies": {
"@bytedance/mona": "0.2.26",
"@bytedance/mona-client-web": "0.2.26",
"@bytedance/mona-plugin-events": "0.2.26",
"@bytedance/mona-shared": "0.2.26"
"@bytedance/mona": "0.2.27",
"@bytedance/mona-client-web": "0.2.27",
"@bytedance/mona-plugin-events": "0.2.27",
"@bytedance/mona-shared": "0.2.27"
},
"peerDependencies": {
"react": "^17.0.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/mona-clients/mona-client-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-client-web",
"version": "0.2.26",
"version": "0.2.27",
"description": "web for mona",
"main": "./dist/index.js",
"files": [
Expand All @@ -19,8 +19,8 @@
"mona"
],
"dependencies": {
"@bytedance/mona": "0.2.26",
"@bytedance/mona-shared": "0.2.26",
"@bytedance/mona": "0.2.27",
"@bytedance/mona-shared": "0.2.27",
"ahooks": "^3.7.0",
"classnames": "^2.3.1",
"copyfiles": "^2.4.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/mona-max/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-max",
"version": "0.2.26",
"version": "0.2.27",
"description": "Cli for isv",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/mona-plugin-events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-plugin-events",
"version": "0.2.26",
"version": "0.2.27",
"description": "Merchant application plugin side communication package",
"author": "fengbo.lucky@bytedance.com",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions packages/mona-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-runtime",
"version": "0.2.26",
"version": "0.2.27",
"description": "Merchant app's developing and building tools",
"main": "./dist/index",
"scripts": {
Expand All @@ -25,12 +25,12 @@
"typescript-transform-paths": "^2.2.4"
},
"dependencies": {
"@bytedance/mona": "0.2.26",
"@bytedance/mona-client-mini": "0.2.26",
"@bytedance/mona-client-plugin": "0.2.26",
"@bytedance/mona-client-web": "0.2.26",
"@bytedance/mona-plugin-events": "0.2.26",
"@bytedance/mona-shared": "0.2.26"
"@bytedance/mona": "0.2.27",
"@bytedance/mona-client-mini": "0.2.27",
"@bytedance/mona-client-plugin": "0.2.27",
"@bytedance/mona-client-web": "0.2.27",
"@bytedance/mona-plugin-events": "0.2.27",
"@bytedance/mona-shared": "0.2.27"
},
"publishConfig": {
"access": "public",
Expand Down
18 changes: 7 additions & 11 deletions packages/mona-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytedance/mona-service",
"version": "0.2.26",
"version": "0.2.27",
"displayName": "mona",
"description": "Merchant app's developing and building tools",
"main": "./dist/index.js",
Expand All @@ -23,7 +23,6 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.16.5",
"@babel/helper-plugin-utils": "^7.16.5",
"@babel/parser": "^7.16.6",
"@babel/plugin-proposal-decorators": "^7.19.0",
"@babel/plugin-transform-runtime": "^7.16.5",
Expand All @@ -32,10 +31,10 @@
"@babel/preset-typescript": "^7.16.5",
"@babel/traverse": "^7.16.5",
"@babel/types": "^7.16.0",
"@bytedance/mona": "0.2.26",
"@bytedance/mona-max": "0.2.26",
"@bytedance/mona-runtime": "0.2.26",
"@bytedance/mona-shared": "0.2.26",
"@bytedance/mona": "0.2.27",
"@bytedance/mona-max": "0.2.27",
"@bytedance/mona-runtime": "0.2.27",
"@bytedance/mona-shared": "0.2.27",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
"@svgr/webpack": "^5.5.0",
"@teamsupercell/typings-for-css-modules-loader": "^2.5.1",
Expand All @@ -56,15 +55,12 @@
"form-data": "^4.0.0",
"fs-extra": "^10.1.0",
"html-webpack-plugin": "^5.4.0",
"htmlparser2": "^7.2.0",
"inquirer": "^8.1.2",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"lodash": "^4.17.21",
"lodash.merge": "^4.6.2",
"mini-css-extract-plugin": "^2.4.2",
"minimist": "^1.2.5",
"nanoid": "^3.1.30",
"node-fetch": "^3.2.0",
"open": "^8.4.0",
"ora": "^5.4.1",
"pkg-updater": "^1.0.4",
Expand All @@ -90,7 +86,7 @@
"@types/fs-extra": "^9.0.13",
"@types/inquirer": "^7.3.3",
"@types/loader-utils": "^2.0.3",
"@types/lodash": "^4.14.178",
"@types/lodash.merge": "^4.6.7",
"@types/mini-css-extract-plugin": "^2.4.0",
"@types/minimist": "^1.2.2",
"@types/node": "^16.4.5",
Expand Down
17 changes: 11 additions & 6 deletions packages/mona-service/src/ConfigHelper.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import path from 'path';
import fs from 'fs';
import merge from 'lodash.merge';
import path from 'path';
import Config from 'webpack-chain';

import { AppConfig, ProjectConfig as OriginProjectConfig } from '@bytedance/mona';
import { readConfig, searchScriptFile } from '@bytedance/mona-shared';

import { getConfigPath } from './commands/util';
import { DEFAULT_PORT } from './target/constants';
import { createUniqueId } from './target/utils/utils';
import { merge } from 'lodash';

export type ProjectConfig = OriginProjectConfig & { output: string };

Expand All @@ -21,7 +25,7 @@ const genDefaultProjectConfig = (cwd: string): ProjectConfig => {
abilities: {
define: {},
copy: { patterns: [] },
sourceMap: false,
sourceMap: 'eval-cheap-module-source-map' as Config.DevTool,
alias: {
'@': path.resolve(cwd, './src'),
},
Expand All @@ -48,11 +52,12 @@ class ConfigHelper {
}

get isDev(): boolean {
return process.env.NODE_ENV !== 'production'
return process.env.NODE_ENV !== 'production';
}

readAllConfig() {
this.projectConfig = merge(genDefaultProjectConfig(this.cwd), this._readConfig<ProjectConfig>('mona.config'));
const configFile = getConfigPath();
this.projectConfig = merge(genDefaultProjectConfig(this.cwd), this._readConfig<ProjectConfig>(configFile));
this.appConfig = merge(DEFAULT_APP_CONFIG, this._readConfig<AppConfig>('app.config'));
this.entryPath = searchScriptFile(path.resolve(this.cwd, this.projectConfig.input));
}
Expand All @@ -64,7 +69,7 @@ class ConfigHelper {
const projectConfig = readConfig<T>(fullConfigPath);
return projectConfig;
}
return {} as T
return {} as T;
}
}

Expand Down
Loading

0 comments on commit 997d3d9

Please sign in to comment.