chore(deps): upgrade some dependencies to latest versions (#6673)

* chore(deps): upgrade some dependencies to latest versions

* fix: --skip-dev-dependencies

* fix: compression
This commit is contained in:
chenos 2025-04-15 22:53:07 +08:00 committed by GitHub
parent 91207a77f1
commit 5808ee57e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 22 additions and 11 deletions

View File

@ -6,7 +6,7 @@ WORKDIR /app
RUN cd /app \ RUN cd /app \
&& yarn config set network-timeout 600000 -g \ && yarn config set network-timeout 600000 -g \
&& npx -y create-nocobase-app@${CNA_VERSION} my-nocobase-app -a -e APP_ENV=production \ && npx -y create-nocobase-app@${CNA_VERSION} my-nocobase-app --skip-dev-dependencies -a -e APP_ENV=production \
&& cd /app/my-nocobase-app \ && cd /app/my-nocobase-app \
&& yarn install --production && yarn install --production

View File

@ -18,9 +18,8 @@
"fast-glob": "^3.3.1", "fast-glob": "^3.3.1",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"p-all": "3.0.0", "p-all": "3.0.0",
"pm2": "^5.2.0", "pm2": "^6.0.5",
"portfinder": "^1.0.28", "portfinder": "^1.0.28",
"serve": "^13.0.2",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
"tsx": "^4.19.0" "tsx": "^4.19.0"
}, },

View File

@ -8,6 +8,7 @@
"axios": "^1.7.0", "axios": "^1.7.0",
"chalk": "^4.1.1", "chalk": "^4.1.1",
"commander": "^9.2.0", "commander": "^9.2.0",
"fs-extra": "^11.3.0",
"tar": "6.1.11" "tar": "6.1.11"
}, },
"bin": { "bin": {

View File

@ -19,6 +19,7 @@ const cli = new Command('create-nocobase');
cli cli
.arguments('<name>', 'directory of new NocoBase app') .arguments('<name>', 'directory of new NocoBase app')
.option('--quickstart', 'quickstart app creation') .option('--quickstart', 'quickstart app creation')
.option('--skip-dev-dependencies')
.option('-a, --all-db-dialect', 'install all database dialect dependencies') .option('-a, --all-db-dialect', 'install all database dialect dependencies')
.option('-d, --db-dialect <dbDialect>', 'database dialect, current support sqlite/mysql/postgres', 'sqlite') .option('-d, --db-dialect <dbDialect>', 'database dialect, current support sqlite/mysql/postgres', 'sqlite')
.option('-e, --env <env>', 'environment variables write into .env file', concat, []) .option('-e, --env <env>', 'environment variables write into .env file', concat, [])

View File

@ -9,7 +9,8 @@
const chalk = require('chalk'); const chalk = require('chalk');
const crypto = require('crypto'); const crypto = require('crypto');
const { existsSync } = require('fs'); const { existsSync, promises } = require('fs');
const fs = require('fs-extra');
const { join, resolve } = require('path'); const { join, resolve } = require('path');
const { Generator } = require('@umijs/utils'); const { Generator } = require('@umijs/utils');
const { downloadPackageFromNpm, updateJsonFile } = require('./util'); const { downloadPackageFromNpm, updateJsonFile } = require('./util');
@ -191,6 +192,13 @@ class AppGenerator extends Generator {
this.checkDbEnv(); this.checkDbEnv();
const skipDevDependencies = this.args.skipDevDependencies;
if (skipDevDependencies) {
const json = await fs.readJSON(join(this.cwd, 'package.json'), 'utf8');
delete json['devDependencies'];
await fs.writeJSON(join(this.cwd, 'package.json'), json, { encoding: 'utf8', spaces: 2 });
}
console.log(''); console.log('');
console.log(chalk.green(`$ cd ${name}`)); console.log(chalk.green(`$ cd ${name}`));
console.log(chalk.green(`$ yarn install`)); console.log(chalk.green(`$ yarn install`));

View File

@ -28,6 +28,7 @@
"@types/react-dom": "^18.0.0", "@types/react-dom": "^18.0.0",
"react-router-dom": "6.28.1", "react-router-dom": "6.28.1",
"react-router": "6.28.1", "react-router": "6.28.1",
"async": "3.2.6",
"antd": "5.12.8", "antd": "5.12.8",
"rollup": "4.24.0" "rollup": "4.24.0"
}, },

View File

@ -20,12 +20,12 @@
"graphlib": "^2.1.8", "graphlib": "^2.1.8",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mathjs": "^10.6.1", "mathjs": "^10.6.1",
"nanoid": "^3.3.6", "nanoid": "^3.3.11",
"node-fetch": "^2.6.7", "node-fetch": "^2.6.7",
"node-sql-parser": "^4.18.0", "node-sql-parser": "^4.18.0",
"qs": "^6.11.2", "qs": "^6.11.2",
"safe-json-stringify": "^1.2.0", "safe-json-stringify": "^1.2.0",
"semver": "^7.3.7", "semver": "^7.7.1",
"sequelize": "^6.26.0", "sequelize": "^6.26.0",
"umzug": "^3.1.1", "umzug": "^3.1.1",
"uuid": "^9.0.1" "uuid": "^9.0.1"

View File

@ -35,7 +35,7 @@
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"rimraf": "^3.0.0", "rimraf": "^3.0.0",
"serve": "^13.0.2", "serve": "^14.2.4",
"ts-loader": "^7.0.4", "ts-loader": "^7.0.4",
"ts-node": "9.1.1", "ts-node": "9.1.1",
"ts-node-dev": "1.1.8", "ts-node-dev": "1.1.8",

View File

@ -45,9 +45,10 @@
"koa-static": "^5.0.0", "koa-static": "^5.0.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"multer": "^1.4.2", "multer": "^1.4.2",
"nanoid": "3.3.4", "nanoid": "^3.3.11",
"semver": "^7.3.7", "semver": "^7.7.1",
"serve-handler": "^6.1.5", "compression": "^1.8.0",
"serve-handler": "^6.1.6",
"ws": "^8.13.0", "ws": "^8.13.0",
"xpipe": "^1.0.5" "xpipe": "^1.0.5"
}, },

View File

@ -27,7 +27,7 @@
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"object-path": "^0.11.8", "object-path": "^0.11.8",
"react": "^18.2.0", "react": "^18.2.0",
"semver": "^7.5.4", "semver": "^7.7.1",
"tar": "^6.1.13" "tar": "^6.1.13"
}, },
"peerDependencies": { "peerDependencies": {