From bce26719e264de3b4148bc69e4b25399ad810431 Mon Sep 17 00:00:00 2001 From: Trent Houliston Date: Mon, 29 Jul 2024 12:49:38 +1000 Subject: [PATCH] Fix issues building with node 22 (#14) NAPI include was masking a missing include which prevented it building --- .github/workflows/formatting.yml | 2 +- .github/workflows/node.js.yml | 2 +- .github/workflows/publish-to-npm.yml | 2 +- package.json | 2 +- src/Hash.cpp | 3 ++- src/Hash.hpp | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index ea18559..0758fad 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -18,7 +18,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: '20.x' + node-version: '22.x' cache: 'yarn' - run: yarn install diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 33d02a3..47d4ccc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,7 +26,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - node-version: [18.x, 20.x, 21.x] + node-version: [18.x, 20.x, 22.x] steps: - name: Checkout Code diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml index 9ec1c50..3552ef5 100644 --- a/.github/workflows/publish-to-npm.yml +++ b/.github/workflows/publish-to-npm.yml @@ -17,7 +17,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: '22.x' registry-url: 'https://registry.npmjs.org' cache: 'yarn' diff --git a/package.json b/package.json index f2c84ae..846090a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nbsdecoder.js", - "version": "0.4.4", + "version": "0.4.5", "description": "Node.js module for interacting with NUClear Binary Stream files", "main": "nbsdecoder.js", "types": "nbsdecoder.d.ts", diff --git a/src/Hash.cpp b/src/Hash.cpp index 5a98a5e..515365e 100644 --- a/src/Hash.cpp +++ b/src/Hash.cpp @@ -1,6 +1,7 @@ - #include "Hash.hpp" +#include + namespace nbs { namespace hash { diff --git a/src/Hash.hpp b/src/Hash.hpp index 892eb7c..0436ef8 100644 --- a/src/Hash.hpp +++ b/src/Hash.hpp @@ -1,6 +1,7 @@ #ifndef HASH_HPP #define HASH_HPP +#include #include #include "third-party/xxhash/xxhash.h"