Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update depencencies, update testing and remove legacy code form main #20

Merged
merged 19 commits into from
Apr 24, 2024

Conversation

mcm1957
Copy link
Contributor

@mcm1957 mcm1957 commented Apr 24, 2024

This PR updates testing and dependencies to the currently required level fro ioBroker adapters.

  • Node 18 is now required as minimum
  • node 16 has been removed from test-and-release workflow
  • @iobroker/testing and adapter-core have been updated
  • general dependencies have been uopdated
  • tier attribute has been added to io-pacakge.json

This PR updates main.js to satisfy linter standards

  • indentions and mixed space/tabs have been fixed to satisfy linter rules
  • a few single quotes have been changed to double quotes as this adapter has choosen to use double quote style
  • test scrips (using singel quotes) have been excluded from linter tests

Linter tests and general tests now pass
Integration tests still fail with adapter already running. I will investigate the reason


This PR fixes duplicate class problem at main.js

  • adapter is written using class mode (class Notificationforandroidtv extends utils.Adapter {...}). Thats ok and current style.
  • BUT adapter also created a second adapter class by utils.adapter. This method is an alternative method for older legacy code not using classes. The existence of two classes collided.

So the following changes have been performed:

  • //const adapter = utils.adapter("notificationforandroidtv"); -> use this has been deactivated. Feel free to completly remove the line
  • all usages of adapter.xxx have been replace by this.xxx to reference and use the adapter class created

ALL tests now pass
Please check functionality as the last fix changed your code and I do not have the hardware to verify functionality.


The following code sequences are suspect and possibly still erronous.

  • Line 576::

      		const triggeredEvent = id.split(".", 4);
      		const event = triggeredEvent.slice(-1);
    
      		if (event == "payload")
      		{
    

    event is an array (slice retruns an array) which should not be compared with a string.

  • Line 666:

      this.log.error(`Notify failed for :${ip}`, error.message);
    

    is for sure erronous

Please check PR and merge.

dependabot bot and others added 19 commits April 24, 2024 08:44
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@iobroker/adapter-core](https://github.com/ioBroker/adapter-core) from 3.0.4 to 3.1.4.
- [Release notes](https://github.com/ioBroker/adapter-core/releases)
- [Commits](ioBroker/adapter-core@v3.0.4...v3.1.4)

---
updated-dependencies:
- dependency-name: "@iobroker/adapter-core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@iobroker/testing](https://github.com/AlCalzone/testing) from 4.1.0 to 4.1.3.
- [Changelog](https://github.com/ioBroker/testing/blob/master/CHANGELOG.md)
- [Commits](ioBroker/testing@v4.1.0...v4.1.3)

---
updated-dependencies:
- dependency-name: "@iobroker/testing"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [mocha](https://github.com/mochajs/mocha) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](mochajs/mocha@v10.3.0...v10.4.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.4 to 5.4.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.0.4...v5.4.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…esting-4.1.3

chore(deps-dev): bump @iobroker/testing from 4.1.0 to 4.1.3
…dapter-core-3.1.4

chore(deps): bump @iobroker/adapter-core from 3.0.4 to 3.1.4
…checkout-4

chore(deps): bump actions/checkout from 2 to 4
…-5.4.5

chore(deps-dev): bump typescript from 5.0.4 to 5.4.5
Bumps [@tsconfig/node16](https://github.com/tsconfig/bases/tree/HEAD/bases) from 16.1.1 to 16.1.3.
- [Commits](https://github.com/tsconfig/bases/commits/HEAD/bases)

---
updated-dependencies:
- dependency-name: "@tsconfig/node16"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
chore(deps-dev): bump mocha from 10.3.0 to 10.4.0
…ode16-16.1.3

chore(deps-dev): bump @tsconfig/node16 from 16.1.1 to 16.1.3
@mcm1957 mcm1957 changed the title Update depencencies and update testing Update depencencies, update testing and remove legacy code form main Apr 24, 2024
@DNAngelX DNAngelX merged commit 933a5d4 into DNAngelX:main Apr 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants