Skip to content

Commit

Permalink
chore: 修复安全告警问题
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Oct 30, 2024
1 parent 1d22690 commit 2e229b8
Show file tree
Hide file tree
Showing 11 changed files with 1,930 additions and 688 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import antfu from '@antfu/eslint-config';

export default await antfu({
files: ['**/*.js', '**/*.jsx', '**/*.vue', '**/*.ts'],
// TODO: 使用 ignore 代替 cli 命令中的配置
stylistic: {
indent: 4,
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
"semver": "^7.3.6"
},
"devDependencies": {
"@antfu/eslint-config": "^2.6.2",
"@antfu/eslint-config": "^3.8.0",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"chokidar": "^3.5.3",
"commitizen": "^4.3.0",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"deepmerge": "^4.2.2",
"eslint": "^8.56.0",
"eslint": "^9.13.0",
"fs-extra": "^11.1.1",
"lint-staged": "^15.2.0",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.0.4",
"typescript": "^5.6.3",
"vitepress": "1.0.0-alpha.73",
"vue": "^3.3.4",
"yargs-parser": "^21.1.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/fes-builder-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"fs-extra": "^11.1.1",
"get-folder-size": "^2.0.1",
"html-webpack-plugin": "^5.5.0",
"html-webpack-tags-plugin": "^3.0.0",
"html-webpack-tags-plugin": "^3.0.2",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.8.1",
Expand Down
21 changes: 10 additions & 11 deletions packages/fes-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"name": "@fesjs/compiler",
"version": "3.0.4",
"description": "@fesjs/compiler",
"main": "lib/index.js",
"files": [
"lib"
],
"author": "qlin",
"license": "MIT",
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-compiler"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"keywords": [
"fes"
],
"main": "lib/index.js",
"files": [
"lib"
],
"publishConfig": {
"access": "public"
},
Expand All @@ -31,7 +31,6 @@
"commander": "^7.0.0",
"dotenv": "8.2.0",
"joi": "17.3.0",
"set-value": "3.0.2",
"tapable": "^2.2.0"
}
}
7 changes: 3 additions & 4 deletions packages/fes-compiler/src/config/utils/configUtils.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { lodash } from '@fesjs/utils';
import set from 'set-value';

export function updateUserConfigWithKey({
key,
value,
userConfig
userConfig,
}) {
set(userConfig, key, value);
lodash.set(userConfig, key, value);
}

export function getUserConfigWithKey({
key,
userConfig
userConfig,
}) {
return lodash.get(userConfig, key);
}
4 changes: 2 additions & 2 deletions packages/fes-preset-built-in/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"@fesjs/runtime": "^3.0.1",
"@fesjs/utils": "^3.0.3",
"@vue/compiler-sfc": "^3.3.4",
"@wll8/better-mock": "0.3.3-alpha",
"envinfo": "^7.7.3",
"express": "^4.17.3",
"mockjs": "^1.1.0"
"express": "^4.17.3"
},
"typings": "./types.d.ts"
}
2 changes: 1 addition & 1 deletion packages/fes-preset-built-in/src/plugins/features/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default (api) => {
api.logger.info('mock.js should export Function');
return;
}
const mockjs = require('mockjs');
const mockjs = require('@wll8/better-mock');
initFunction({ cgiMock, mockjs, utils });
} catch (err) {
api.logger.error('mock.js run fail!');
Expand Down
57 changes: 28 additions & 29 deletions packages/fes-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
{
"compilerOptions": {
"outDir": "build/dist",
"module": "esnext",
"target": "esnext",
"lib": ["esnext", "dom"],
"sourceMap": true,
"baseUrl": ".",
"jsx": "preserve",
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowJs": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"strict": true,
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./src/.fes/*"]
}
},
"include": [
"src/**/*",
".fes.js",
".fes.*.js"
],
"exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"]
"compilerOptions": {
"target": "esnext",
"jsx": "preserve",
"lib": ["esnext", "dom"],
"experimentalDecorators": true,
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "node",
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./src/.fes/*"]
},
"allowJs": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "build/dist",
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": [
"src/**/*",
".fes.js",
".fes.*.js"
],
"exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"]
}
Loading

0 comments on commit 2e229b8

Please sign in to comment.