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

Upgrading to Typescript 5.x #1313

Open
egekorkan opened this issue Aug 8, 2024 · 7 comments
Open

Upgrading to Typescript 5.x #1313

egekorkan opened this issue Aug 8, 2024 · 7 comments

Comments

@egekorkan
Copy link
Member

Should we update to version 5 (or newer) of TypeScript? We have noticed this in test-things due to discrepancy in the versions (not a huge deal) and I wasn't sure if there is a blocker.

I could not find an exact issue and asked @danielpeintner and we both remember something but not an issue it seems.

@danielpeintner
Copy link
Member

Some questions/aspects

  • why are we pinpointing the version to a fixed version "typescript": "4.7.4" in the first place?
  • out of curiosity I tried to update to [email protected] and npm run build fails with errors (e.g., node_modules/@types/node/globals.d.ts:73:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' must be of typ)
    • Hence, I updated @types/node also which leads to even more issues with eventsource etc etc ... so it seems this requires more work :-(

@relu91
Copy link
Member

relu91 commented Aug 21, 2024

I think it might have some consequences with #1267 too.

@erossignon
Copy link
Contributor

upgradeing to the latest version of node-opcua uses nodejs16 package definition convention and thefore requires a bump of typescript.

I have fix, to some extend, the issue that daniel pointed out in PR #1335. (see first commit)

As a general rules, some modern version of nodejs packages are using more and more the Node16 or NodeNext convention and it would be a good thing to switch to this so you can upgrade package version more easily.

@danielpeintner
Copy link
Member

@relu91 @egekorkan @JKRhb what is your feeling.
I know, browserify blocked us from updating. Since it will be replaced soon, shall we make the change?

Note: maybe it makes sense to push a node-wot version without the change (also without the proposed changes from @erossignon) and afterward move to node-wot 1.0.0 and update NodeJS version?

@relu91
Copy link
Member

relu91 commented Dec 2, 2024

if it is possible I would wait to merge #1335 until the new PR about moving from browserify has landed. I can open it later this afternoon but mostly as a draft. Than we can understand additional changes needed to make opcua work as @erossignon did in his PR.

@relu91
Copy link
Member

relu91 commented Dec 4, 2024

Note: maybe it makes sense to push a node-wot version without the change (also without the proposed changes from @erossignon) and afterward move to node-wot 1.0.0 and update NodeJS version?

Do we have substantial changes to be published? otherwise, I'd wait for the new re-vamped node-wot.

@danielpeintner
Copy link
Member

Mhh, probably not really...
v0.8.16...master

Let's wait 👍

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

No branches or pull requests

4 participants