fivdi / i2c-bus

I2C serial bus access with Node.js
MIT License
348 stars 57 forks source link

add support for node.js 18 #114

Closed kylerove closed 1 year ago

kylerove commented 1 year ago

Self explantory pull request. Tested on a raspberry pi 4b running ubuntu 20.04.5 LTS. Works correctly with homebridge-shtx3 instance to read temp/humidity value off i2c bus.

mathieuDombrockTAF commented 1 year ago

@fivdi Any chance this PR could get merged?

fivdi commented 1 year ago

@fivdi Any chance this PR could get merged?

@mathieuDombrockTAF why do you need to have this PR merged? It doesn't actually change anything other than the Travis build (which no longer works) and two text files. i2c-bus should work with Node.js v18.x & v20.x even if this is not mentioned in the readme. Here is what I see if I install i2c-bus on a Raspberry Pi with Node.js v20.2.0

pi@raspberrypi:~/test $ node --version
v20.2.0
pi@raspberrypi:~/test $ npm --version
9.6.6
pi@raspberrypi:~/test $ npm install i2c-bus

added 4 packages in 10s
pi@raspberrypi:~/test $ npm list --all
test@ /home/pi/test
└─┬ i2c-bus@5.2.2
  ├─┬ bindings@1.5.0
  │ └── file-uri-to-path@1.0.0
  └── nan@2.17.0

pi@raspberrypi:~/test $ 
fivdi commented 1 year ago

Self explantory pull request. Tested on a raspberry pi 4b running ubuntu 20.04.5 LTS. Works correctly with homebridge-shtx3 instance to read temp/humidity value off i2c bus.

@kylerove i2c-bus should work fine with Node v18.x, even without this PR.

kylerove commented 1 year ago

When I upgraded to node v18, I got a homebridge error on this package. This fixed it.

Perhaps a simple uninstall, reinstall would have corrected the issue?

fivdi commented 1 year ago

When I upgraded to node v18, I got a homebridge error on this package. This fixed it.

Perhaps a simple uninstall, reinstall would have corrected the issue?

Yes, it would have.

fivdi commented 1 year ago

I'll go ahead and close this PR as i2c-bus already supports Node.js v18.