Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update dependencies #138

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint -e
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx nano-staged
6,620 changes: 3,492 additions & 3,128 deletions package-lock.json

Large diffs are not rendered by default.

137 changes: 66 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"homepage": "https://github.com/gravity-ui/app-builder#readme",
"scripts": {
"prepare": "husky install",
"prepare": "husky",
"lint": "run-p lint:*",
"lint:js": "eslint --ext .js,.ts --report-unused-disable-directives .",
"lint:other": "npm run prettier -- --check",
Expand All @@ -58,113 +58,111 @@
},
"dependencies": {
"@aws-sdk/client-s3": "^3.353.0",
"@babel/core": "^7.23.4",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/plugin-transform-dynamic-import": "^7.22.0",
"@babel/plugin-transform-modules-commonjs": "^7.23.4",
"@babel/plugin-transform-private-methods": "^7.24.1",
"@babel/plugin-transform-runtime": "^7.22.0",
"@babel/preset-env": "^7.22.0",
"@babel/preset-react": "^7.22.0",
"@babel/preset-typescript": "^7.23.4",
"@babel/runtime": "^7.23.4",
"@okikio/sharedworker": "^1.0.4",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@statoscope/webpack-plugin": "^5.27.0",
"@babel/core": "^7.24.0",
"@babel/helper-plugin-utils": "^7.24.0",
"@babel/plugin-transform-class-properties": "^7.24.0",
"@babel/plugin-transform-dynamic-import": "^7.24.0",
"@babel/plugin-transform-modules-commonjs": "^7.24.0",
"@babel/plugin-transform-private-methods": "^7.24.0",
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.24.0",
"@babel/preset-typescript": "^7.24.0",
"@babel/runtime": "^7.24.0",
"@okikio/sharedworker": "^1.0.7",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@statoscope/webpack-plugin": "^5.28.2",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
"@svgr/webpack": "^8.1.0",
"babel-loader": "^9.1.3",
"babel-plugin-import": "^1.13.8",
"babel-plugin-inline-react-svg": "^2.0.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"browserslist": "^4.21.10",
"browserslist": "^4.23.0",
"chalk": "^4.1.2",
"circular-dependency-plugin": "^5.2.2",
"clean-webpack-plugin": "^4.0.0",
"clear": "^0.1.0",
"common-tags": "^1.8.2",
"cosmiconfig": "^8.1.3",
"cosmiconfig": "^8.3.6",
"cosmiconfig-typescript-loader": "^5.0.0",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"dotenv": "^16.3.1",
"execa": "^5.1.1",
"fast-glob": "^3.3.1",
"file-type": "^16.5.3",
"find-cache-dir": "^3.3.2",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"fs-extra": "^11.1.1",
"get-port": "^7.0.0",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"dotenv": "^16.4.5",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
"file-type": "^19.0.0",
"find-cache-dir": "^5.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"fs-extra": "^11.2.0",
"get-port": "^7.1.0",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"mini-css-extract-plugin": "^2.8.1",
"mini-css-extract-plugin": "^2.9.0",
"moment-timezone-data-webpack-plugin": "^1.5.1",
"nodemon": "^3.0.1",
"p-map": "^4.0.0",
"p-queue": "^6.6.2",
"pino-pretty": "^10.2.0",
"postcss": "^8.4.23",
"postcss-loader": "^7.3.3",
"nodemon": "^3.1.0",
"p-map": "^7.0.2",
"p-queue": "^8.0.1",
"pino-pretty": "^11.2.0",
"postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^9.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-refresh": "^0.14.2",
"resolve-url-loader": "^5.0.0",
"rimraf": "^5.0.1",
"sass": "^1.69.0",
"sass-loader": "^13.3.2",
"semver": "^7.5.4",
"rimraf": "^5.0.7",
"sass": "^1.77.5",
"sass-loader": "^14.2.1",
"semver": "^7.6.2",
"signal-exit": "^4.1.0",
"source-map-loader": "^4.0.1",
"source-map-loader": "^5.0.0",
"strip-ansi": "^6.0.1",
"style-loader": "^3.3.3",
"svgo": "^3.0.2",
"style-loader": "^4.0.0",
"svgo": "^3.3.2",
"terser-webpack-plugin": "5.3.10",
"ts-node": "10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"webpack": "^5.91.0",
"typescript": "~5.5.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ~?

"webpack": "^5.92.0",
"webpack-assets-manifest": "^5.2.1",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-dev-server": "^4.15.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-dev-server": "^5.0.4",
"webpack-manifest-plugin": "^5.0.0",
"worker-loader": "^3.0.8",
"yargs": "^17.7.2"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@gravity-ui/eslint-config": "^3.0.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@gravity-ui/eslint-config": "^3.2.0",
"@gravity-ui/prettier-config": "^1.1.0",
"@gravity-ui/tsconfig": "^1.0.0",
"@sentry/webpack-plugin": "^2.7.1",
"@types/babel__helper-plugin-utils": "^7.10.1",
"@types/circular-dependency-plugin": "^5.0.6",
"@types/common-tags": "^1.8.2",
"@types/find-cache-dir": "^3.2.1",
"@types/fs-extra": "^11.0.2",
"@types/babel__helper-plugin-utils": "^7.10.3",
"@types/circular-dependency-plugin": "^5.0.8",
"@types/common-tags": "^1.8.4",
"@types/fs-extra": "^11.0.4",
"@types/jest": "^29.5.2",
"@types/lodash": "^4.14.198",
"@types/mime-types": "^2.1.1",
"@types/lodash": "^4.17.6",
"@types/mime-types": "^2.1.4",
"@types/node": "^18",
"@types/nodemon": "^1.19.2",
"@types/semver": "^7.5.2",
"@types/webpack-assets-manifest": "^5.1.0",
"@types/webpack-bundle-analyzer": "^4.6.0",
"@types/webpack-manifest-plugin": "^3.0.5",
"@types/nodemon": "^1.19.6",
"@types/semver": "^7.5.8",
"@types/webpack-assets-manifest": "^5.1.4",
"@types/webpack-bundle-analyzer": "^4.7.0",
"@types/webpack-manifest-plugin": "^3.0.8",
"@types/yargs": "17.0.11",
"babel-plugin-tester": "^11.0.4",
"eslint": "^8.49.0",
"husky": "^8.0.3",
"eslint": "^8.57.0",
"husky": "^9.0.11",
"jest": "^29.5.0",
"lightningcss": "^1.21.5",
"monaco-editor-webpack-plugin": "^6.0.0",
"nano-staged": "^0.8.0",
"npm-run-all": "^4.1.5",
"prettier": "3.0.3",
"ts-jest": "^29.1.0"
"prettier": "3.3.2",
"ts-jest": "^29.1.2"
},
"peerDependencies": {
"@sentry/webpack-plugin": "^2.7.1",
Expand All @@ -189,8 +187,5 @@
"*.{md,yaml,yml,json}": [
"prettier --write"
]
},
"overrides": {
"cosmiconfig-typescript-loader": "^5.0.0"
}
}
8 changes: 3 additions & 5 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {createCli} from './create-cli';

export type {ProjectConfig} from './common/models';

const MIN_NODE_VERSION = '14.15.0';
const MIN_NODE_VERSION = '18.0.0';

const {version} = process;

Expand Down Expand Up @@ -41,11 +41,9 @@ process.on('unhandledRejection', (reason) => {

// reason can be anything, it can be a message, an object, ANYTHING!
// we convert it to an error object
if (!(reason instanceof Error)) {
reason = new Error(util.format(reason));
}
const error = reason instanceof Error ? reason : new Error(util.format(reason));

logger.panic('UNHANDLED REJECTION', reason as Error);
logger.panic('UNHANDLED REJECTION', error);
});

process.on('uncaughtException', (error) => {
Expand Down
44 changes: 25 additions & 19 deletions src/commands/build/build-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,33 @@ export default function (config: LibraryConfig) {
null,
);

build.start();
build.onExit((code) => {
if (code) {
reject(new Error('Error build library'));
} else {
resolve(true);
}
});
build.start().then(
() => {
build.onExit((code) => {
if (code) {
reject(new Error('Error build library'));
} else {
resolve(true);
}
});

process.on('SIGINT', async () => {
await build.stop('SIGINT');
process.exit(1);
});
process.on('SIGINT', async () => {
await build.stop('SIGINT');
process.exit(1);
});

process.on('SIGTERM', async () => {
await build.stop('SIGTERM');
process.exit(1);
});
process.on('SIGTERM', async () => {
await build.stop('SIGTERM');
process.exit(1);
});

onExit((_code, signal) => {
build.stop(signal as any);
});
onExit((_code, signal) => {
build.stop(signal);
});
},
(error) => {
reject(error);
},
);
});
}
44 changes: 25 additions & 19 deletions src/commands/build/build-service/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,33 @@ export function buildServer(config: NormalizedServiceConfig): Promise<void> {
null,
);

build.start();
build.onExit((code) => {
if (code) {
reject(new Error('Error compile server'));
} else {
resolve();
}
});
build.start().then(
() => {
build.onExit((code) => {
if (code) {
reject(new Error('Error compile server'));
} else {
resolve();
}
});

process.on('SIGINT', async () => {
await build.stop('SIGINT');
process.exit(1);
});
process.on('SIGINT', async () => {
await build.stop('SIGINT');
process.exit(1);
});

process.on('SIGTERM', async () => {
await build.stop('SIGTERM');
process.exit(1);
});
process.on('SIGTERM', async () => {
await build.stop('SIGTERM');
process.exit(1);
});

onExit((_code, signal) => {
build.stop(signal as any);
});
onExit((_code, signal) => {
build.stop(signal);
});
},
(error) => {
reject(error);
},
);
});
}
Loading