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

chore(deps): use ws@8.14.1 #12909

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Sep 15, 2023

What it does

  • Use ws@8.14.1
  • Update the typing of the package to 8+ to support new APIs. For example, createWebSocketStream.

How to test

  • The tests on CI pass,
  • Theia works,
  • You can do import { createWebSocketStream } from '@theia/core/shared/ws'; downstream. For example, in the API-samples.

Review checklist

Reminder for reviewers

Update the typing of the package to `8+` to support new APIs.
For example, `createWebSocketStream`.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos
Copy link
Contributor Author

kittaakos commented Sep 15, 2023

For now, it's possible to force a matching type definition version in the (main) package.json:

  "resolutions": {
    "**/@types/ws": "7.4.7"
  },

Or do with inline type definitions

import type { Duplex, DuplexOptions } from 'node:stream';

// before eclipse-theia/theia#12909 is merged
declare module '@theia/core/shared/ws' {
  function createWebSocketStream(
    websocket: WebSocket,
    options?: DuplexOptions
  ): Duplex;
}

import WebSocket, { createWebSocketStream } from '@theia/core/shared/ws';

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks 👍

@msujew msujew merged commit ba3722b into eclipse-theia:master Sep 26, 2023
12 checks passed
@vince-fugnitto vince-fugnitto added the dependencies pull requests that update a dependency file label Sep 28, 2023
@vince-fugnitto vince-fugnitto added this to the 1.42.0 milestone Sep 28, 2023
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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants