From 0d010f56e9a8634e4f54f167cef146435f6b9473 Mon Sep 17 00:00:00 2001 From: Rasmus Porsager Date: Thu, 28 Nov 2024 14:21:47 +0100 Subject: [PATCH] Replace import path for release --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 1 + src/uws.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 764b4686..faa93e3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: build-windows: strategy: matrix: - os: [windows-latest, windows-arm64] + os: [windows-arm64, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: ilammy/msvc-dev-cmd@v1 @@ -25,7 +25,7 @@ jobs: git status git config --global user.email "alexhultman@gmail.com" git config --global user.name "Alex Hultman" - git commit -a -m "[GitHub Actions] Updated windows-latest binaries" + git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/${{ github.repository }}" binaries git checkout master -- tests/smoke.js npm install ws diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c107fcd..08c1788b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,7 @@ jobs: sed -i "s|\"optionalDependencies\": {}|\"optionalDependencies\": {\n $deps\n}|" package.json sed -i "s|\"version\": \"[^\"]*\"|\"version\": \"${version}\"|g" package.json + sed -i "s|uws_|@uws/uws_|g" uws.js git checkout --detach git add package.json diff --git a/src/uws.js b/src/uws.js index 9432f5ee..15ca529b 100644 --- a/src/uws.js +++ b/src/uws.js @@ -17,7 +17,7 @@ module.exports = (() => { try { - return require('@uws/uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules); + return require('uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules); } catch (e) { throw new Error('This version of uWS.js (v20.51.0) supports only Node.js versions 18, 20, 22 and 23 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString()); }