diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d75ad4e..91cc311 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,13 +15,13 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [24.x, 22.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 2ed902b..2656ac2 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,16 +11,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 22 + cache: 'npm' - run: npm ci - run: npm run lint - run: npm run test - run: npm run build - name: Cache build - uses: actions/cache@v2 + uses: actions/cache@v4 id: restore-build with: path: ./lib @@ -30,13 +31,13 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 22 registry-url: https://registry.npmjs.org/ - name: Restore build cache - uses: actions/cache@v2 + uses: actions/cache@v4 id: restore-build with: path: ./lib diff --git a/.github/workflows/typedoc-gh-pages.yml b/.github/workflows/typedoc-gh-pages.yml index 4653e02..173c103 100644 --- a/.github/workflows/typedoc-gh-pages.yml +++ b/.github/workflows/typedoc-gh-pages.yml @@ -25,15 +25,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Pages - uses: actions/configure-pages@v2 + uses: actions/configure-pages@v5 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'npm' - name: Build with typedoc run: | npm ci npm run gen-docs - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 # Deployment job deploy: @@ -45,4 +50,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 diff --git a/package-lock.json b/package-lock.json index 428bc6c..8b3a443 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "swampyer", - "version": "1.4.3", + "version": "1.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "swampyer", - "version": "1.4.3", + "version": "1.5.2", "license": "MIT", "devDependencies": { "@types/jest": "^27.0.2", diff --git a/package.json b/package.json index 66ac583..1957755 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swampyer", - "version": "1.5.1", + "version": "1.5.2", "description": "A lightweight WAMP client implementing the WAMP v2 basic profile", "main": "lib/index.js", "module": "lib/index.js", @@ -41,4 +41,4 @@ "typedoc": "^0.22.10", "typescript": "^4.4.3" } -} +} \ No newline at end of file diff --git a/src/errors.ts b/src/errors.ts index 16c6ecc..cbb10f1 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,10 +1,4 @@ -export class SwampyerError { - constructor(public readonly message?: string) {} - - toString() { - return this.message; - } -} +export class SwampyerError extends Error {} export class SwampyerOperationError extends SwampyerError { constructor(