Skip to content

Commit

Permalink
- Getting rid of unused packages
Browse files Browse the repository at this point in the history
- Adding quasar extra package back since npm run build-spa was not working without it
- Getting rid of more dev packages which are not needed
- Adding quasar extensions for testing and testing e2e-cypress. This is used by the npm run build-spa. It was throwing App Quasar App Extension @quasar/testing is missing... and doing quasar ext add quasar/testing-e2e-cypress and quasar ext add quasar/testing solved it.
- Updating the cypress and eslint cypress plugin package
- Adding license checker since that is used by npm run lic
- Adding quasar extensions for testing and testing e2e-cypress. This is used by the npm run build-spa. It was throwing App Quasar App Extension @quasar/testing is missing... and doing quasar ext add quasar/testing-e2e-cypress and quasar ext add quasar/testing solved it.
- Updating the cypress and eslint cypress plugin package
- Adding license checker since that is used by npm run lic
- No need to import @jest/globals as these are automatically provided by jest globally.
- Adding autoprofixer package because it is required in .postcssrc.js
- Adding test-utils package because it is required by test/jest/utils/index.js
- Adding tough-cookie package which is required by src-script/gen-test-runner.js
- Adding 7zip-bin package because it is required by src-script/pack-apack-mac.js
- Adding cross-spawn package because it is required by src-script/script-util.js
- Adding fs-extra package which is used by src-script/zap-combine-reports.js
- Cleaning up the relative paths in src/router/routes.js because the import paths had the wrong relative paths
- Adding a node module package dependency test for unused packages in github workflows
- Getting rid of webpack-cli, webpack-node-externals
- Requiring license-checker module properly in license-check.js such that the npm package dependencies are analyzed correctly by something like npm-check or depcheck
- Updating jest-junit which is used to get code coverage

- Getting rid of file-loader and devtron packages
- Commenting out the depcheck workflow for now

- Getting rid of the unused packages caught from depcheck:
Unused devDependencies
 types/bytebuffer
 types/node-ipc
 types/sqlite3
 types/underscore
 babel-plugin-istanbul
 eslint-plugin-cypress
 eslint-plugin-node
 eslint-plugin-promise
 eslint-plugin-quasar
- Updating a bunch of packages reported from npm-check

- downgrading typescript package upgrade and adding queryString package because npm run build-spa fails without these 2 changes
- Reverting the package upgrade to node-ipc
- Reverting the changes made to quasar extentions json file
- Downgrading the Vue tour package because upgrading it breaks the vue tour
- Downgrading some of the packages because they are causing notifications pane to not work properly
- Updating sqlite3 and rmeoving the github actions for now
- fixing ui.test.js for undefined this.endpointId and component not defined
- Reverting the changes to the relative path in the routes
- Adding a router for the ui.test.js because the ui tests are not picking up the new router information and therefore throwing a Component not defined error which was happening due to the Vue packages and their dependencies being updated
- Downgrading axios since Github CI is runnning into axios issues on matter regen
- updating node-gyp and cypress code coverage npm pacakges
- JIRA: ZAPP-1138
  • Loading branch information
brdandu committed Aug 14, 2024
1 parent dca1ad0 commit acec3cd
Show file tree
Hide file tree
Showing 10 changed files with 4,492 additions and 6,076 deletions.
2 changes: 0 additions & 2 deletions cypress/e2e/devtools/devtools.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/// <reference types="cypress" />

const { contains } = require('underscore')

Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
Expand Down
10,264 changes: 4,344 additions & 5,920 deletions package-lock.json

Large diffs are not rendered by default.

119 changes: 46 additions & 73 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,116 +119,89 @@
},
"dependencies": {
"@globalhive/vuejs-tour": "^1.3.4",
"@quasar/extras": "^1.15.6",
"@quasar/extras": "^1.16.12",
"@types/yargs": "^15.0.5",
"axios": "^0.28.0",
"axios-cookiejar-support": "^4.0.6",
"body-parser": "^1.19.0",
"axios-cookiejar-support": "^5.0.2",
"bufferutil": "^4.0.7",
"bytebuffer": "^5.0.1",
"cookie-parser": "^1.4.5",
"core-js": "^3.21.1",
"corejs": "^1.0.0",
"crc": "^4.1.0",
"express": "^4.17.3",
"express-session": "^1.17.2",
"express": "^4.19.2",
"express-session": "^1.18.0",
"fast-glob": "^3.2.11",
"file-loader": "^6.2.0",
"find": "^0.3.0",
"glob": "^8.0.3",
"fs-extra": "^11.2.0",
"handlebars": "^4.7.7",
"http-status-codes": "^2.1.4",
"lodash": "^4.17.21",
"node-cache": "^5.1.2",
"node-gyp": "^8.4.1",
"node-ipc": "^9.2.1",
"pino": "^7.9.2",
"pino": "^9.3.2",
"promised-handlebars": "^2.0.1",
"properties": "^1.2.1",
"quasar": "^2.10.2",
"quasar": "^2.16.7",
"single-instance": "^0.0.1",
"source-map-support": "^0.5.19",
"sqlite3": "5.1.4",
"sqlite3": "^5.1.4",
"toposort": "^2.0.2",
"tough-cookie": "^4.1.4",
"utf-8-validate": "^5.0.5",
"uuid": "^8.3.2",
"vue": "^3.2.45",
"vue-router": "^4.1.6",
"uuid": "^10.0.0",
"vue": "^3.4.36",
"vue-router": "^4.4.3",
"vuex": "^4.1.0",
"ws": "^8.5.0",
"xml2js": "^0.4.23",
"xsdlibrary": "^1.3.6",
"yaml": "^1.10.2",
"ws": "^8.18.0",
"xml2js": "^0.6.2",
"yaml": "^2.5.0",
"yargs": "^17.4.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-regenerator": "^7.14.5",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime-corejs2": "^7.14.6",
"@cypress/code-coverage": "^3.9.12",
"@quasar/app-webpack": "^3.6.2",
"@quasar/quasar-app-extension-testing": "^2.0.6",
"@quasar/quasar-app-extension-testing-e2e-cypress": "^5.1.1",
"@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-beta.5",
"@types/bytebuffer": "^5.0.42",
"@types/node-ipc": "^9.2.0",
"@types/sqlite3": "^3.1.7",
"@types/underscore": "^1.11.3",
"@vue/eslint-config-standard": "^8.0.1",
"@vue/test-utils": "^2.2.0",
"babel-plugin-istanbul": "^6.1.1",
"copy-webpack-plugin": "^6.3.2",
"copyfiles": "^2.4.1",
"@babel/eslint-parser": "^7.25.1",
"@babel/preset-typescript": "^7.24.7",
"@cypress/code-coverage": "^3.12.45",
"@quasar/app-webpack": "^3.13.3",
"@quasar/quasar-app-extension-testing": "^2.2.0",
"@quasar/quasar-app-extension-testing-e2e-cypress": "^6.1.0",
"@quasar/quasar-app-extension-testing-unit-jest": "^3.0.2",
"@vue/test-utils": "^2.4.6",
"7zip-bin": "^5.2.0",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"cypress": "^12.2.0",
"date-fns": "^2.28.0",
"devtron": "^1.4.0",
"electron": "^27.0.0",
"cross-spawn": "^7.0.3",
"cypress": "^13.6.6",
"date-fns": "^3.6.0",
"electron": "^31.3.1",
"electron-builder": "^24.0.0",
"electron-debug": "^3.2.0",
"electron-debug": "^4.0.0",
"electron-devtools-installer": "^3.2.0",
"electron-installer-dmg": "^3.0.0",
"electron-packager": "^15.2.0",
"electron-installer-dmg": "^5.0.1",
"electron-packager": "^17.1.2",
"electron-rebuild": "^3.0.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^27.1.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-quasar": "^1.1.0",
"eslint-plugin-vue": "^9.8.0",
"eslint-webpack-plugin": "^3.2.0",
"file-loader": "^6.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-vue": "^9.27.0",
"eslint-webpack-plugin": "^4.2.0",
"folder-hash": "^4.0.1",
"husky": "^7.0.1",
"husky": "^9.1.4",
"is-reachable": "^5.2.1",
"jest": "^29.2.2",
"jest-environment-jsdom": "^29.3.1",
"jest-junit": "^15.0.0",
"jest-junit": "^16.0.0",
"jest-sonar-reporter": "^2.0.0",
"jsdoc": "^3.6.6",
"jsdoc-to-markdown": "^7.0.1",
"jsdom": "^16.6.0",
"jsdom-global": "^3.0.2",
"jsdoc": "^4.0.3",
"jsdoc-to-markdown": "^8.0.3",
"license-checker": "^25.0.1",
"node-7z": "^3.0.0",
"node-abi": "^2.30.0",
"node-gyp": "^8.4.1",
"node-pre-gyp": "^0.17.0",
"node-gyp": "^10.2.0",
"nodejs-file-downloader": "^4.9.3",
"octokit": "^1.7.2",
"pkg": "^5.8.1",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1",
"ts-loader": "^8.0.17",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"test-utils": "^1.1.1",
"typescript": "4.6",
"webpack-cli": "^4.7.2",
"webpack-node-externals": "^2.5.2",
"workbox-webpack-plugin": "^6.5.4"
"workbox-webpack-plugin": "^7.1.0"
},
"engines": {
"node": ">= 8.9.0",
Expand Down
2 changes: 1 addition & 1 deletion quasar.extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"options": ["scripts"]
},
"@quasar/testing-e2e-cypress": {
"options": ["scripts", "typescript"]
"options": ["scripts", "typescript", "code-coverage"]
}
}
3 changes: 2 additions & 1 deletion src-script/license-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

let fs = require('fs')
let path = require('path')
let checker = require('../node_modules/license-checker/lib/index')
let checker = require('license-checker')
// The following line is needs to be looked at. We should not be extracting from under node modules.
let args = require('../node_modules/license-checker/lib/args').parse()
let whiteList = fs
.readFileSync(path.join(__dirname, 'license-whitelist.txt'))
Expand Down
24 changes: 16 additions & 8 deletions src-script/zap-combine-reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,35 @@
*/

const scriptUtil = require('./script-util.js')
const fs = require('fs')
const fsExtra = require('fs-extra')

//workaround: executeCmd()/spawn() fails silently without complaining about missing path to electron
process.env.PATH = process.env.PATH + ':/usr/local/bin/'


async function executeScript() {
try {
// Create directory if it does not exist
await fsExtra.ensureDir('reports')

if (fsExtra.existsSync('cypress-coverage/coverage-final.json')) {
await fsExtra.copy('cypress-coverage/coverage-final.json', 'reports/from-cypress.json')
await fsExtra.copy(
'cypress-coverage/coverage-final.json',
'reports/from-cypress.json'
)
}

if (fsExtra.existsSync('jest-coverage/coverage-final.json')) {
await fsExtra.copy('jest-coverage/coverage-final.json', 'reports/from-jest.json')
await fsExtra.copy(
'jest-coverage/coverage-final.json',
'reports/from-jest.json'
)
}

scriptUtil.executeCmd({}, 'npx', ['nyc', 'merge', 'reports'])

await fsExtra.move('coverage.json', '.nyc_output/out.json', { overwrite: true });
await fsExtra.move('coverage.json', '.nyc_output/out.json', {
overwrite: true,
})

scriptUtil.executeCmd(
{},
Expand All @@ -52,10 +58,12 @@ async function executeScript() {
console.log(
`✅ Please find the combined report (Jest & Cypress) at ./coverage/lcov-report/index.html`
)

} catch (err) {
console.log("Error in generating reports at zap-combine-reports.js file and executeScript function: " + err)
console.log(
'Error in generating reports at zap-combine-reports.js file and executeScript function: ' +
err
)
}
}

executeScript()
executeScript()
15 changes: 9 additions & 6 deletions src/components/ZclClusterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,14 @@ export default {
},
category: {
get() {
return this.getDeviceCategory(
this.zclDeviceTypes[
this.endpointDeviceTypeRef[this.selectedEndpointId][0]
]?.packageRef
)
if (this.selectedEndpointId) {
return this.getDeviceCategory(
this.zclDeviceTypes[
this.endpointDeviceTypeRef[this.selectedEndpointId][0]
]?.packageRef,
)
}
return ''
},
},
enableEventsTab: {
Expand Down Expand Up @@ -219,7 +222,7 @@ export default {
this.$store.state.zap.genericOptions[
dbEnum.sessionOption.clusterSpecification
][0]['optionLabel'],
'_blank'
'_blank',
)
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ export default {
this.maxIndex > this.index
) {
this.index = this.index + 1
this.$serverGet(
let filePreview =
restApi.uri.preview + this.currentFile + '/' + this.index
)
this.$serverGet(filePreview)
.then((result) => {
this.generationData = this.generationData + result.data['result']
})
Expand Down
Loading

0 comments on commit acec3cd

Please sign in to comment.