Skip to content

Conversation

@donavanbecker
Copy link
Collaborator

@donavanbecker donavanbecker commented Feb 5, 2024

2.0.0 (2024-02-05)

What's Changed

  • Rewrite into Typescript and Convert CommonJS to ES Module
  • Fix Linting, Thanks @dnicolson #216
  • Code Cleaup, Thanks @dnicolson #217
  • Housekeeping and update dependencies

Full Changelog: v1.10.0...v2.0.0

@github-actions github-actions bot added enhancement New feature or request dependencies Pull requests that update a dependency file workflow docs latest labels Feb 5, 2024
@donavanbecker
Copy link
Collaborator Author

@dnicolson, do you have any thoughts on this?

@dnicolson
Copy link
Contributor

Nothing comes to mind.

When including it in homebridge-switchbot I wouldn't release it as part of a patch release. I see you ultimately reverted part of the changes, the node-switchbot import is broken though, unfortunately.

@donavanbecker
Copy link
Collaborator Author

Dang, well hopefully we can get this resolved. I will open another beta with a minor change version. To release node-SwitchBot with that.

@donavanbecker donavanbecker added the major major version change label Feb 5, 2024
@donavanbecker donavanbecker marked this pull request as ready for review February 5, 2024 19:20
@donavanbecker donavanbecker merged commit 7a8e59c into latest Feb 5, 2024
@donavanbecker donavanbecker deleted the beta-2.0.0 branch February 5, 2024 19:21
@dnicolson
Copy link
Contributor

@donavanbecker, I'm not sure how you want to solve this, but the problem with this release is an async issue in the constructor. The scanning code gets called before noble has been imported.

You can easily test before making a release, just by running something like test.mjs in the project directory after building:

import { SwitchBot } from './dist/index.js';

const switchbot = new SwitchBot();

(async () => {
  await switchbot.startScan({ id: 'XX:XX:XX:XX:XX:XX' });
  switchbot.onadvertisement = (ad) => {
    console.log(JSON.stringify(ad, null, '  '));
  };
})();

@dnicolson dnicolson mentioned this pull request Feb 6, 2024
@donavanbecker
Copy link
Collaborator Author

import { SwitchBot } from './dist/index.js';

const switchbot = new SwitchBot();

(async () => {
  await switchbot.startScan({ id: 'XX:XX:XX:XX:XX:XX' });
  switchbot.onadvertisement = (ad) => {
    console.log(JSON.stringify(ad, null, '  '));
  };
})();

would you want to add something like this to the repo that can be ran each time before publishing?

@dnicolson
Copy link
Contributor

Maybe, the effectiveness would need to be evaluated though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docs enhancement New feature or request latest major major version change workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants