update minimist npm dependency (#34)

* updated mininist package and removed dts-bundle-webpack dependency

* updated webpak to v5
added bundle-declarations-webpack-plugin to bundle *.d.ts files for cvat-canvas and cvat-canvas3d

* fixed rest_api tests

* update changelog

* fixed e2e fileshare test in case of zsh use
main
Andrey Zhavoronkov 4 years ago committed by GitHub
parent 30cc541ae0
commit f10f655859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed Python dependency ``open3d`` which brought different issues to the building process
- Analytics not accessible when https is enabled (<https://github.com/cvat-ai/cvat/pull/20>)
- Dataset import in an organization (<https://github.com/cvat-ai/cvat/pull/18>)
- Updated minimist npm package to v1.2.6 (<https://github.com/cvat-ai/cvat/pull/34>)
### Security
- TDB

@ -6,7 +6,7 @@
const path = require('path');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const DtsBundleWebpack = require('dts-bundle-webpack');
const BundleDeclarationsWebpackPlugin = require('bundle-declarations-webpack-plugin');
const styleLoaders = [
'style-loader',
@ -64,10 +64,8 @@ const nodeConfig = {
],
},
plugins: [
new DtsBundleWebpack({
name: 'cvat-canvas.node',
main: 'dist/declaration/src/typescript/canvas.d.ts',
out: '../cvat-canvas.node.d.ts',
new BundleDeclarationsWebpackPlugin({
outFile: "declaration/src/cvat-canvas.d.ts",
}),
],
};
@ -116,10 +114,8 @@ const webConfig = {
],
},
plugins: [
new DtsBundleWebpack({
name: 'cvat-canvas',
main: 'dist/declaration/src/typescript/canvas.d.ts',
out: '../cvat-canvas.d.ts',
new BundleDeclarationsWebpackPlugin({
outFile: "declaration/src/cvat-canvas.d.ts",
}),
],
};

@ -6,7 +6,7 @@
const path = require('path');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const DtsBundleWebpack = require('dts-bundle-webpack');
const BundleDeclarationsWebpackPlugin = require('bundle-declarations-webpack-plugin');
const styleLoaders = [
'style-loader',
@ -64,10 +64,8 @@ const nodeConfig = {
],
},
plugins: [
new DtsBundleWebpack({
name: 'cvat-canvas3d.node',
main: 'dist/declaration/src/typescript/canvas3d.d.ts',
out: '../cvat-canvas3d.node.d.ts',
new BundleDeclarationsWebpackPlugin({
outFile: "declaration/src/cvat-canvas.d.ts",
}),
],
};
@ -116,10 +114,8 @@ const webConfig = {
],
},
plugins: [
new DtsBundleWebpack({
name: 'cvat-canvas3d',
main: 'dist/declaration/src/typescript/canvas3d.d.ts',
out: '../cvat-canvas3d.d.ts',
new BundleDeclarationsWebpackPlugin({
outFile: "declaration/src/cvat-canvas.d.ts",
}),
],
};

@ -63,7 +63,8 @@ const webConfig = {
loader: 'worker-loader',
options: {
publicPath: '/static/engine/js/3rdparty/',
name: '[name].[contenthash].js',
filename: '[name].[contenthash].js',
esModule: false,
},
},
},
@ -74,7 +75,8 @@ const webConfig = {
loader: 'worker-loader',
options: {
publicPath: '/static/engine/js/',
name: '[name].[contenthash].js',
filename: '[name].[contenthash].js',
esModule: false,
},
},
},

@ -41,7 +41,8 @@ const cvatData = {
loader: 'worker-loader',
options: {
publicPath: '/',
name: '[name].[contenthash].js',
filename: '[name].[contenthash].js',
esModule: false,
},
},
},
@ -51,7 +52,8 @@ const cvatData = {
loader: 'worker-loader',
options: {
publicPath: '/3rdparty/',
name: '3rdparty/[name].[contenthash].js',
filename: '3rdparty/[name].[contenthash].js',
esModule: false,
},
},
},

@ -5,7 +5,7 @@
"main": "src/index.tsx",
"scripts": {
"build": "webpack --config ./webpack.config.js",
"start": "webpack-dev-server --env.API_URL=http://localhost:7000 --config ./webpack.config.js --mode=development",
"start": "webpack serve --env API_URL=http://localhost:7000 --config ./webpack.config.js --mode=development",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"lint": "eslint './src/**/*.{ts,tsx}'",
@ -38,7 +38,7 @@
"cvat-canvas": "file:../cvat-canvas",
"cvat-canvas3d": "file:../cvat-canvas3d",
"cvat-core": "file:../cvat-core",
"dotenv-webpack": "^1.8.0",
"dotenv-webpack": "^7.1.0",
"error-stack-parser": "^2.0.6",
"lodash": "^4.17.21",
"moment": "^2.29.2",

@ -46,6 +46,9 @@ module.exports = (env) => ({
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js', '.json'],
plugins: [new TsconfigPathsPlugin({ configFile: './tsconfig.json' })],
fallback: {
fs: false,
},
},
module: {
rules: [
@ -95,7 +98,7 @@ module.exports = (env) => ({
'babel-loader',
{
loader: 'react-svg-loader',
query: {
options: {
svgo: {
plugins: [{ pretty: true }, { cleanupIDs: false }],
},
@ -109,7 +112,8 @@ module.exports = (env) => ({
loader: 'worker-loader',
options: {
publicPath: '/',
name: 'assets/3rdparty/[name].[contenthash].js',
filename: 'assets/3rdparty/[name].[contenthash].js',
esModule: false,
},
},
},
@ -120,7 +124,8 @@ module.exports = (env) => ({
loader: 'worker-loader',
options: {
publicPath: '/',
name: 'assets/[name].[contenthash].js',
filename: 'assets/[name].[contenthash].js',
esModule: false,
},
},
},
@ -141,5 +146,4 @@ module.exports = (env) => ({
},
]),
],
node: { fs: 'empty' },
});

6378
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -13,7 +13,6 @@
"cvat-canvas3d",
"cvat-ui"
],
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.13.16",
"@babel/core": "^7.6.0",
@ -33,10 +32,10 @@
"babel-plugin-import": "^1.12.2",
"babel-plugin-istanbul": "^6.0.0",
"babel-register": "^6.26.0",
"bundle-declarations-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.2",
"coveralls": "^3.1.0",
"css-loader": "^3.4.2",
"dts-bundle-webpack": "^1.0.2",
"eslint": "^7.11.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "14.2.1",
@ -50,7 +49,7 @@
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-security": "^1.4.0",
"html-webpack-plugin": "^3.2.0",
"html-webpack-plugin": "^5.5.0",
"husky": "^6.0.0",
"lint-staged": "^10.4.2",
"micromatch": "^4.0.2",
@ -83,10 +82,10 @@
"tsconfig-paths-webpack-plugin": "^3.2.0",
"typescript": "^3.7.3",
"vfile-reporter-json": "^2.0.2",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^3.11.0",
"worker-loader": "^2.0.0"
"worker-loader": "^3.0.8"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",

@ -77,7 +77,7 @@ context('Connected file share.', () => {
expect(fileRenameCommand.code).to.be.eq(0);
},
);
cy.exec('docker exec -i cvat /bin/bash -c "find ~/share -name "*.png" -type f"').then(
cy.exec('docker exec -i cvat /bin/bash -c "find ~/share -name *.png -type f"').then(
(findFilesCommand) => {
// [image_case_107_2.png, image_case_107_3.png]
expect(findFilesCommand.stdout.split('\n').length).to.be.eq(2);

@ -10,7 +10,7 @@ class TestCachePolicy:
@staticmethod
def _get_js_bundle_url(response):
match = re.search(r'<script type="text/javascript" src="(/assets/cvat-ui.\w+.min.js)"></script>', response)
match = re.search(r'<script.* src="(/assets/cvat-ui.\w+.min.js)".*></script>', response)
if match:
return match.group(1)

Loading…
Cancel
Save