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

Upgrade serialport #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Upgrade serialport #13

wants to merge 5 commits into from

Conversation

nicolasmsg
Copy link

@nicolasmsg nicolasmsg commented Dec 20, 2023

Checklist

  • Changelog updated
  • Reference to automated issues tests
  • Tested by a V&V

How was it done

Upgrade serialport version to v11.0.1

⚠️ DO NOT MERGE THIS PR YET.

  • Todo : upgrade node to v18.17

  • For now serialport has a bug in it's types see that causes compilation to fail:

Error: node_modules/@serialport/stream/dist/index.d.ts(101,5): error TS2416: Property '_write' in type 'SerialPortStream<T>' is not assignable to the same property in base type 'Duplex'.
  Type '(data: Buffer, encoding: BufferEncoding | undefined, callback: (error: Error | null) => void) => void' is not assignable to type '(chunk: any, encoding: string, callback: (error?: Error | null | undefined) => void) => void'.
    Types of parameters 'encoding' and 'encoding' are incompatible.
      Type 'string' is not assignable to type 'BufferEncoding | undefined'.

A pull request has been created to fix it but has not been merged yet.

For now, we have to manually change a file in flow-analyzer-com-communicator/node_modules/@serialport/stream/dist/index.d.ts
Replace:

_write(data: Buffer, encoding: BufferEncoding | undefined, callback: (error: Error | null) => void): void;

with:

_write(data: Buffer, encoding: BufferEncoding, callback: (error: Error | null) => void): void;

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.

None yet

1 participant