Skip to content

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
liangskyli committed Aug 10, 2022
1 parent 33b6496 commit ca7c3aa
Show file tree
Hide file tree
Showing 12 changed files with 1,470 additions and 1,063 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx,css,less}": [
"prettier --parser=typescript --write",
"prettier --write",
"node script/lint"
]
},
Expand All @@ -37,25 +37,25 @@
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@commitlint/config-lerna-scopes": "^17.0.2",
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-typescript": "^8.3.3",
"@types/prettier": "^2.6.3",
"@umijs/lint": "^4.0.7",
"@rollup/plugin-typescript": "^8.3.4",
"@types/prettier": "^2.7.0",
"@umijs/lint": "^4.0.11",
"cross-env": "^7.0.3",
"del": "^6.1.1",
"eslint": "^8.20.0",
"del": "^7.0.0",
"eslint": "^8.21.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-typescript": "^6.0.0-alpha.1",
"husky": "^8.0.1",
"lerna": "^5.1.8",
"lerna": "^5.4.0",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^3.0.0",
"prettier-plugin-organize-imports": "^3.0.3",
"prettier-plugin-packagejson": "^2.2.18",
"rollup": "^2.76.0",
"rollup": "^2.77.2",
"rollup-plugin-typescript2": "^0.32.1",
"stylelint": "^14.9.1",
"through2": "^4.0.2",
Expand Down
13 changes: 9 additions & 4 deletions packages/grpc-mock/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const gulp = require('gulp');
const babel = require('gulp-babel');
const ts = require('gulp-typescript');
const del = require('del');
const del = require('../../script/esm-to-commjs').del;
const through = require('through2');
const tsconfig = require('../tsconfig.base.json');

function clean() {
return del('./lib/**');
return del.deleteAsync('./lib/**');
}

function buildCJS() {
Expand All @@ -25,7 +25,10 @@ function buildES() {
...tsconfig.compilerOptions,
module: 'ESNext',
});
return gulp.src(['src/**/*.{ts,tsx}']).pipe(tsProject).pipe(gulp.dest('lib/es/'));
return gulp
.src(['src/**/*.{ts,tsx}'])
.pipe(tsProject)
.pipe(gulp.dest('lib/es/'));
}

function buildDeclaration() {
Expand All @@ -43,7 +46,9 @@ function buildDeclaration() {
}

function copyMetaFiles() {
gulp.src(['./README.md', './bin*/**', './docs*/**', 'LICENSE']).pipe(gulp.dest('./lib/'));
gulp
.src(['./README.md', './bin*/**', './docs*/**', 'LICENSE'])
.pipe(gulp.dest('./lib/'));
return gulp
.src(['./src/grpc*/custom-data-template*/**'])
.pipe(gulp.dest('lib/es/'))
Expand Down
8 changes: 4 additions & 4 deletions packages/grpc-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"build": "gulp"
},
"dependencies": {
"@grpc/proto-loader": "^0.6.13",
"@grpc/proto-loader": "^0.7.0",
"@liangskyli/utils": "^1.1.3",
"@types/fs-extra": "^9.0.13",
"commander": "^9.3.0",
"commander": "^9.4.0",
"cross-spawn": "^7.0.3",
"fs-extra": "^10.1.0",
"protobufjs": "^6.11.3",
"ts-node": "^10.8.2",
"protobufjs": "^7.0.0",
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"tslib": "^2.4.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/grpc-mock/src/grpc/gen-response-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function genResponseData(opts: IOpts): string {
const { fields } = type;
const jsonArr: string[] = [];
Object.keys(fields).forEach((field) => {
const { type: fieldType, rule, comment } = fields[field];
const { type: fieldType, repeated, comment } = fields[field];
const originalTsType = PROTO_TYPE_2_TS_TYPE_MAP[fieldType];
let tsType = originalTsType;
if (tsType) {
Expand All @@ -51,7 +51,7 @@ export default function genResponseData(opts: IOpts): string {
if (commentStr) {
jsonArr.push(commentStr);
}
if (rule === 'repeated') {
if (repeated) {
jsonArr.push(`${field}: [${fieldValue}],`);
} else {
jsonArr.push(`${field}: ${fieldValue},`);
Expand All @@ -72,15 +72,15 @@ export default function genResponseData(opts: IOpts): string {
const dataObj = genFieldObj(root.lookupType(typePath));

let str = '';
if (rule === 'repeated') {
if (repeated) {
str = `[{${dataObj.join('\n')}}]`;
} else {
str = `{${dataObj.join('\n')}}`;
}

jsonArr.push(`${field}: ${str},`);
} else {
if (rule === 'repeated') {
if (repeated) {
jsonArr.push(`${field}: [],`);
} else {
jsonArr.push(`${field}: {},`);
Expand Down
13 changes: 9 additions & 4 deletions packages/http-mock-gen/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const gulp = require('gulp');
const babel = require('gulp-babel');
const ts = require('gulp-typescript');
const del = require('del');
const del = require('../../script/esm-to-commjs').del;
const through = require('through2');
const tsconfig = require('../tsconfig.base.json');

function clean() {
return del('./lib/**');
return del.deleteAsync('./lib/**');
}

function buildCJS() {
Expand All @@ -28,7 +28,10 @@ function buildES() {
...tsconfig.compilerOptions,
module: 'ESNext',
});
return gulp.src(['src/**/*.{ts,tsx}']).pipe(tsProject).pipe(gulp.dest('lib/es/'));
return gulp
.src(['src/**/*.{ts,tsx}'])
.pipe(tsProject)
.pipe(gulp.dest('lib/es/'));
}

function buildDeclaration() {
Expand All @@ -46,7 +49,9 @@ function buildDeclaration() {
}

function copyMetaFiles() {
gulp.src(['./README.md', './bin*/**', './docs*/**', 'LICENSE']).pipe(gulp.dest('./lib/'));
gulp
.src(['./README.md', './bin*/**', './docs*/**', 'LICENSE'])
.pipe(gulp.dest('./lib/'));
return gulp
.src(['./src/gen*/custom-data-template*/**'])
.pipe(gulp.dest('lib/es/'))
Expand Down
6 changes: 3 additions & 3 deletions packages/http-mock-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
"build": "gulp"
},
"dependencies": {
"@liangskyli/openapi-gen-ts": "^0.4.0",
"@liangskyli/openapi-gen-ts": "^0.5.0",
"@liangskyli/utils": "^1.1.3",
"@types/fs-extra": "^9.0.13",
"axios": "^0.27.2",
"commander": "^9.3.0",
"commander": "^9.4.0",
"cross-spawn": "^7.0.3",
"express": "^4.18.1",
"fs-extra": "^10.1.0",
"json-schema-faker": "^0.5.0-rcv.44",
"ts-node": "^10.8.2"
"ts-node": "^10.9.1"
},
"devDependencies": {
"@types/cross-spawn": "^6.0.2"
Expand Down
13 changes: 9 additions & 4 deletions packages/mock/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const gulp = require('gulp');
const babel = require('gulp-babel');
const ts = require('gulp-typescript');
const del = require('del');
const del = require('../../script/esm-to-commjs').del;
const through = require('through2');
const tsconfig = require('../tsconfig.base.json');

function clean() {
return del('./lib/**');
return del.deleteAsync('./lib/**');
}

function buildCJS() {
Expand All @@ -25,7 +25,10 @@ function buildES() {
...tsconfig.compilerOptions,
module: 'ESNext',
});
return gulp.src(['src/**/*.{ts,tsx}']).pipe(tsProject).pipe(gulp.dest('lib/es/'));
return gulp
.src(['src/**/*.{ts,tsx}'])
.pipe(tsProject)
.pipe(gulp.dest('lib/es/'));
}

function buildDeclaration() {
Expand All @@ -43,7 +46,9 @@ function buildDeclaration() {
}

function copyMetaFiles() {
return gulp.src(['./README.md', './bin*/**', './docs*/**', 'LICENSE']).pipe(gulp.dest('./lib/'));
return gulp
.src(['./README.md', './bin*/**', './docs*/**', 'LICENSE'])
.pipe(gulp.dest('./lib/'));
}

function generateCliPackageJSON() {
Expand Down
10 changes: 5 additions & 5 deletions packages/mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@
"build": "gulp"
},
"dependencies": {
"@babel/core": "^7.18.6",
"@babel/core": "^7.18.10",
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
"@babel/register": "^7.18.6",
"@babel/register": "^7.18.9",
"@liangskyli/utils": "^1.1.3",
"@types/express": "^4.17.13",
"@types/fs-extra": "^9.0.13",
"body-parser": "^1.20.0",
"chokidar": "^3.5.3",
"commander": "^9.3.0",
"commander": "^9.4.0",
"cross-spawn": "^7.0.3",
"express": "^4.18.1",
"fs-extra": "^10.1.0",
"glob": "^8.0.3",
"multer": "^1.4.5-lts.1",
"path-to-regexp": "^6.2.1",
"socket.io": "^4.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"tslib": "^2.4.0"
},
"devDependencies": {
Expand All @@ -65,7 +65,7 @@
"@types/multer": "^1.4.7",
"mockjs": "^1.1.0",
"socket.io-client": "^4.5.1",
"webpack": "^5.73.0",
"webpack": "^5.74.0",
"webpack-dev-server": "^4.9.3"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const gulp = require('gulp');
const del = require('del');
const del = require('../../script/esm-to-commjs').del;
const through = require('through2');

function clean() {
return del('./lib/**');
return del.deleteAsync('./lib/**');
}

function copyMetaFiles() {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@types/lodash": "^4.14.182",
"@types/prettier": "^2.6.3",
"@types/prettier": "^2.7.0",
"address": "^1.2.0",
"colors": "^1.4.0",
"crequire": "^1.8.1",
Expand Down
4 changes: 4 additions & 0 deletions script/esm-to-commjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// eslint-disable-next-line no-global-assign,no-native-reassign
require = require('@qiwi/esm')(module /*, options*/);
const del = require('del');
module.exports.del = del;
Loading

0 comments on commit ca7c3aa

Please sign in to comment.