Skip to content

Commit

Permalink
Respect mandatory CCs defined for the device class (#681)
Browse files Browse the repository at this point in the history
* feat(config): define device classes as JSON

* build: change a bunch of tsconfig files to make TypeScript happy

* feat: move Z-Wave device classes to config file, respect mandatory CCs

* fix(driver): load device classes at the start

* build: run watch task in parallel

* feat: add mandatory CCs after the interview and deserialization

* chore: update changelog [skip ci]

* test: fix test setup

* test: fix Node tests

* test: add test for adding mandatory CCs in Node constructor
  • Loading branch information
AlCalzone committed Jun 22, 2020
1 parent 28a1b61 commit f1f7b42
Show file tree
Hide file tree
Showing 40 changed files with 1,334 additions and 1,133 deletions.
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
-->

## __WORK IN PROGRESS__
This project has been converted to a monorepo and split into the following packages:
* `zwave-js`: As before, this is the main entry point for consumers
* `@zwave-js/config`: The configuration files and methods to access them
* `@zwave-js/core`: The core modules, which are shared between `zwave-js` and `@zwave-js/config`
* `@zwave-js/shared`: Utility methods that are shared between all other packages
### Breaking changes
See "Changes under the hood". I don't expect anything to break, but to be safe, I'll declare this as a major version.

### Features
* Mandatory supported CCs that are defined in the device class config are now respected. This should improve support for legacy devices that don't include all CCs in the NIF.

It is likely that other packages will be added in the future.
### Changes under the hood
* Moved the definition of legacy Z-Wave device classes to a config file.
* This project has been converted to a monorepo and split into the following packages:
* `zwave-js`: As before, this is the main entry point for consumers
* `@zwave-js/config`: The configuration files and methods to access them
* `@zwave-js/core`: The core modules, which are shared between `zwave-js` and `@zwave-js/config`
* `@zwave-js/shared`: Utility methods that are shared between all other packages

It is likely that other packages will be added in the future.

## 3.8.5 (2020-06-18)
### Bugfixes
Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ module.exports = {
],
testRegex: "(\\.|/)test\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"^@zwave-js/config(.*)": "<rootDir>/packages/config/src$1",
"^@zwave-js/core(.*)": "<rootDir>/packages/core/src$1",
"^@zwave-js/shared(.*)": "<rootDir>/packages/shared/src$1",
},
setupFilesAfterEnv: ["jest-extended"],
setupFiles: ["reflect-metadata"],
extraGlobals: ["Reflect"],
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
"@types/yargs": "^15.0.4",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"@zwave-js/config": "^1.0.0",
"@zwave-js/core": "^3.8.5",
"@zwave-js/shared": "^3.8.5",
"axios": "^0.19.2",
"clipboardy": "^2.3.0",
"commitizen": "^4.0.4",
Expand Down Expand Up @@ -92,7 +89,7 @@
"zwave-js": "file:packages\\zwave-js"
},
"scripts": {
"watch": "cd packages/zwave-js && lerna run watch --scope=zwave-js",
"watch": "lerna run watch --parallel",
"test:reset": "jest --clear-cache",
"test:ts": "jest",
"test:ci": "npm run test:ts -- --runInBand",
Expand Down
Loading

0 comments on commit f1f7b42

Please sign in to comment.