Skip to content

Commit 43b3d7d

Browse files
authored
fix: loader utils proto pollution (#1373)
* fix: upgrade packages * feat: yarnlock * fix: load utiles proto pulltion * fix: chunk sort mode * fix: cobra command * fix: unit tests * fix: python3 * fix: e2e tests --------- Co-authored-by: Pablo <pjestradac@gmail.com>
1 parent f4208c9 commit 43b3d7d

11 files changed

Lines changed: 2753 additions & 3704 deletions

File tree

.github/workflows/e2e_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
# run copies of the current job in parallel
1616
containers: [1,2,3,4,5,6, 7]
1717
container:
18-
image: diffgram/walrus:latest
18+
image: diffgram/cypress-e2e:latest
1919
options: --user root --shm-size 4gb
2020
env:
2121
NODE_ENV: development
@@ -111,7 +111,7 @@ jobs:
111111
# - run: yarn --cwd frontend/ run cypress install
112112
- run: yarn --cwd frontend/ build
113113
# Populate DB
114-
- run: cd default/play_and_scripts/scripts; python setup_database_e2e_tests.py
114+
- run: cd default/play_and_scripts/scripts; python3 setup_database_e2e_tests.py
115115
- name: "UI Tests - Chrome"
116116
uses: cypress-io/github-action@v4.0.0
117117
with:

frontend/build/webpack.prod.conf.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const webpackConfig = merge(baseWebpackConfig, {
4646
apparently uglify has been deprecated?
4747
https://github.com/webpack-contrib/terser-webpack-plugin
4848
*/
49-
49+
5050
/*
5151
new UglifyJsPlugin({
5252
uglifyOptions: {
@@ -60,7 +60,7 @@ const webpackConfig = merge(baseWebpackConfig, {
6060
nameCache: null,
6161
ie8: false,
6262
keep_fnames: false,
63-
63+
6464
},
6565
sourceMap: config.build.productionSourceMap,
6666
parallel: true
@@ -71,7 +71,7 @@ const webpackConfig = merge(baseWebpackConfig, {
7171

7272
// extract css into its own file
7373
new ExtractTextPlugin({
74-
74+
7575
filename: utils.assetsPath('css/[name].[hash].css') ,
7676

7777
allChunks: true
@@ -104,14 +104,12 @@ const webpackConfig = merge(baseWebpackConfig, {
104104
// more options:
105105
// https://github.com/kangax/html-minifier#options-quick-reference
106106
},
107-
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
108-
chunksSortMode: 'dependency'
109107
}),
110108
// keep module.id stable when vendor modules does not change
111109
new webpack.HashedModuleIdsPlugin(),
112110
// enable scope hoisting
113111
new webpack.optimize.ModuleConcatenationPlugin(),
114-
112+
115113

116114
// https://stackoverflow.com/questions/49017682/webpack-4-migration-commonschunkplugin
117115

frontend/cypress/support/commands.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,6 @@ Cypress.Commands.add('upload_3d_file', function (project_string_id, file_name =
862862

863863
xhr.open("POST", `/api/walrus/project/${store.state.project.current.project_string_id}/upload/large`,);
864864

865-
xhr.setRequestHeader("Authorization", `Bearer ${window.testToken}`);
866865

867866
await xhr.send(data);
868867
})

frontend/jest.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
module.exports = {
22
moduleDirectories: ["node_modules", "<rootDir>"],
33
moduleFileExtensions: ["js", "ts", "json", "vue"],
4+
45
transform: {
56
"^.+\\.js$": "babel-jest",
6-
".*\\.(vue)$": "vue-jest",
7+
".*\\.(vue)$": "@vue/vue2-jest",
78
"^.+\\.tsx?$": "ts-jest",
89
},
9-
10+
"testEnvironment": "jsdom",
1011
transformIgnorePatterns: [
1112
"node_modules/(?!(three"
1213
+ "|ol"

frontend/package.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@
3030
"@storybook/addon-a11y": "^6.5.12",
3131
"@types/three": "^0.134.0",
3232
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
33-
"@vue/cli-plugin-typescript": "^4.5.15",
34-
"@vue/cli-service": "^4.5.15",
33+
"@vue/cli-plugin-typescript": "^5.0.8",
34+
"@vue/cli-service": "^5.0.8",
35+
"@vue/vue2-jest": "^27.0.0",
3536
"axios": "^0.21.2",
3637
"bezier-js": "^2.6.1",
3738
"chart.js": "^2.9.4",
3839
"codemirror": "^5.60.0",
39-
"cypress": "12.10.0",
40+
"cypress": "12.12.0",
4041
"cypress-real-events": "^1.7.0",
4142
"debounce": "^1.2.0",
4243
"filesize": "^6.3.0",
@@ -75,7 +76,6 @@
7576
"vue-confetti": "^2.3.0",
7677
"vue-highlight.js": "^4.0.1-beta",
7778
"vue-intercom": "^1.0.14",
78-
"vue-jest": "^4.0.1",
7979
"vue-markdown": "^2.2.4",
8080
"vue-moment": "^4.1.0",
8181
"vue-qriously": "^1.1.1",
@@ -116,15 +116,14 @@
116116
"@typescript-eslint/parser": "^2.34.0",
117117
"@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
118118
"@vue/babel-preset-jsx": "^1.2.4",
119-
"@vue/cli": "^4.5.14",
120-
"@vue/cli-plugin-babel": "^4.5.15",
121-
"@vue/cli-plugin-unit-jest": "^4.5.15",
122-
"@vue/cli-service-global": "^4.5.14",
119+
"@vue/cli": "^5.0.8",
120+
"@vue/cli-plugin-babel": "^5.0.8",
121+
"@vue/cli-plugin-unit-jest": "^5.0.8",
123122
"@vue/eslint-config-typescript": "^5.1.0",
124123
"@vue/test-utils": "^1.3.0",
125124
"autoprefixer": "^9.8.6",
126125
"babel-eslint": "^10.1.0",
127-
"babel-jest": "^26.3.1",
126+
"babel-jest": "^27.5.1",
128127
"babel-loader": "^8.2.1",
129128
"babel-polyfill": "^6.26.0",
130129
"babel-register": "^6.26.0",
@@ -156,10 +155,10 @@
156155
"file-loader": "^5.1.0",
157156
"flush-promises": "^1.0.2",
158157
"friendly-errors-webpack-plugin": "^1.7.0",
159-
"html-webpack-plugin": "^3.2",
158+
"html-webpack-plugin": "^4.5.2",
160159
"http-server": "^0.12.3",
161-
"jest": "^26.3.1",
162-
"jest-runner": "^26.3.1",
160+
"jest": "^27.5.1",
161+
"jest-runner": "^27.5.1",
163162
"jsdoc": "^3.6.6",
164163
"jsdoc-vuejs": "^3.0.9",
165164
"jsdom": "^16.4.0",
@@ -182,15 +181,13 @@
182181
"semver": "^7.3.2",
183182
"shelljs": "^0.8.5",
184183
"storybook-addon-mock": "^3.2.0",
185-
"strip-loader": "^0.1.2",
186-
"ts-jest": "^26.0.7",
184+
"ts-jest": "^27.1.5",
187185
"ts-loader": "^6.2.2",
188186
"uglifyjs-webpack-plugin": "^2.2.0",
189187
"url-loader": "^3.0.0",
190188
"vue-loader": "^15.9.5",
191189
"vue-style-loader": "^4.1.2",
192190
"vue-template-compiler": "2.6.14",
193-
"vue-ts-loader": "0.0.3",
194191
"webpack": "^4.44.2",
195192
"webpack-bundle-analyzer": "^3.9.0",
196193
"webpack-cli": "^3.3.12",

frontend/src/vue-canvas.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import Vue from 'vue'
2222
});
2323

2424
drawFuncs[uid] = children.map(function (child) {
25+
console.log('AAAAA', child)
2526
return child.componentInstance.draw;
2627
});
2728
}

frontend/tests/unit/3d_annotation/sensor_fusion_editor.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ describe("Test sensor_fusion_editor.vue", () => {
3939
actions,
4040
mutations: {
4141
'set_user_is_typing_or_menu_open': jest.fn(),
42+
'set_instance_select_for_merge': jest.fn(),
4243
},
4344
state: {
4445
project: {
@@ -64,6 +65,7 @@ describe("Test sensor_fusion_editor.vue", () => {
6465
}
6566
};
6667
},
68+
6769
localVue: localVue,
6870
store: store,
6971
propsData: {

0 commit comments

Comments
 (0)