mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-10 07:28:06 -05:00
Before this change, the following error would be thrown when compiling
with TypeScript:
```
node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts:12:101 - error TS1340: Module 'ws' does not refer to a type, but is used as a type here. Did you mean 'typeof import('ws')'?
12 createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): import("ws");
~~~~~~~~~~~~
```
This behavior was introduced in [1], included in version `6.6.0`.
The return type is forced as `any`, so that the `@types/ws` dependency
is optional.
[1]: f4d898ee96
Related: https://github.com/socketio/socket.io/issues/5202
46 lines
996 B
YAML
46 lines
996 B
YAML
name: Build examples
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * 0'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-examples:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example:
|
|
- custom-parsers
|
|
- typescript-example/cjs
|
|
- typescript-example/esm
|
|
- typescript-client-example/cjs
|
|
- typescript-client-example/esm
|
|
- webpack-build
|
|
- webpack-build-server
|
|
- basic-crud-application/angular-client
|
|
- basic-crud-application/vue-client
|
|
- nextjs-pages-router
|
|
- nextjs-app-router
|
|
- nuxt-example
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Build ${{ matrix.example }}
|
|
run: |
|
|
cd examples/${{ matrix.example }}
|
|
npm install
|
|
npm run build
|