Skip to content

Commit 01ae9d4

Browse files
authored
Vue update to v3 (#60)
* Vue and related packages update, app and router init * Migrate Buckets components to vue 3 * Replace vue-popperjs with floating-vue * Migrate Notifications components to vue 3 * Migrate Reports components to vue 3 * Migrate ReportStatsGraph component to vue 3 * Replace vue-spinner with a spinner component * Update tests to support vue 3 * Update eslint and some cleanup * Remove unused js and css, fix warnings
1 parent 8e08e57 commit 01ae9d4

52 files changed

Lines changed: 11501 additions & 13149 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

server/frontend/.babelrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"browsers": ["> 1%", "last 2 versions"],
8+
"node": "current"
9+
}
10+
}
11+
]
12+
],
13+
"env": {
14+
"test": {
15+
"presets": [
16+
[
17+
"@babel/preset-env",
18+
{
19+
"targets": {
20+
"node": "current"
21+
},
22+
"modules": "commonjs"
23+
}
24+
]
25+
]
26+
}
27+
}
28+
}

server/frontend/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
## Common operations
99

1010
> Run following commands in `WebCompatManager/server/frontend` folder
11-
* `npm run build`: Build for development
12-
* `npm run start`: Continuously build for development (watching for changes)
13-
* `npm run production`: Build for production
11+
12+
- `npm run build`: Build for development
13+
- `npm run start`: Continuously build for development (watching for changes)
14+
- `npm run production`: Build for production

server/frontend/eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default [
1616
},
1717
},
1818
pluginJs.configs.recommended,
19-
...pluginVue.configs["flat/vue2-strongly-recommended"],
19+
...pluginVue.configs["flat/strongly-recommended"],
2020
pluginPrettier,
2121
{
2222
rules: {
@@ -32,7 +32,7 @@ export default [
3232
"vue/max-attributes-per-line": 0,
3333
"vue/multi-word-component-names": 0,
3434
"vue/singleline-html-element-content-newline": 0,
35-
"vue/v-on-style": [2, "longform"],
35+
"vue/require-explicit-emits": 0,
3636
},
3737
},
3838
];

server/frontend/jest.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = {
2+
testEnvironment: "jsdom",
3+
moduleFileExtensions: ["vue", "js", "json", "node"],
4+
collectCoverageFrom: [
5+
"**/*.{js,jsx}",
6+
"**/*.vue",
7+
"!**/tests/**",
8+
"!**/coverage/**",
9+
"!**/dist/**",
10+
"!**/webpack.*.js",
11+
],
12+
moduleNameMapper: {
13+
"^@/(.*)$": "<rootDir>/src/$1",
14+
d3: "<rootDir>/node_modules/d3/dist/d3.min.js",
15+
"\\.(css|less|scss|sass)$": "jest-transform-stub",
16+
},
17+
transformIgnorePatterns: ["/node_modules/(?!floating-vue)"],
18+
transform: {
19+
"^.+\\.vue$": "@vue/vue3-jest",
20+
"^.+\\.(js)$": "babel-jest",
21+
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
22+
"jest-transform-stub",
23+
},
24+
testMatch: ["**/tests/**/*.[jt]s", "**/?(*.)+(spec|test).[jt]s"],
25+
testPathIgnorePatterns: [
26+
"<rootDir>/tests/setup.js",
27+
"<rootDir>/tests/fixtures.js",
28+
],
29+
setupFiles: ["<rootDir>/tests/setup.js"],
30+
testEnvironmentOptions: {
31+
customExportConditions: ["node", "node-addons"],
32+
},
33+
};

0 commit comments

Comments
 (0)