diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6097a31..a166964 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,10 +139,36 @@ jobs: run: pnpm --filter @agentscript/docs validate-code-blocks continue-on-error: true + node24-install: + name: Node 24 Install + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + + - name: Setup pnpm + uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: '24' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + build: name: Build runs-on: ubuntu-latest - needs: [lint-and-typecheck, test, server-security-test, validate-docs] + needs: + [ + lint-and-typecheck, + test, + server-security-test, + validate-docs, + node24-install, + ] steps: - name: Checkout code uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 @@ -179,4 +205,3 @@ jobs: - name: Build packages run: pnpm build - diff --git a/package.json b/package.json index 5a67b5e..e20ca3e 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,9 @@ "pnpm": { "overrides": { "vite": "^7.3.2" + }, + "patchedDependencies": { + "tree-sitter@0.25.0": "patches/tree-sitter@0.25.0.patch" } }, "packageManager": "pnpm@10.28.0", diff --git a/patches/tree-sitter@0.25.0.patch b/patches/tree-sitter@0.25.0.patch new file mode 100644 index 0000000..a0d478e --- /dev/null +++ b/patches/tree-sitter@0.25.0.patch @@ -0,0 +1,47 @@ +diff --git a/binding.gyp b/binding.gyp +index bb40aa7e8d41644ba690761e9064fc1d0f2dcd6b..724b177f43bf6ed7cf60add3f23317be2018f6ff 100644 +--- a/binding.gyp ++++ b/binding.gyp +@@ -24,14 +24,11 @@ + "defines": [ + "NAPI_VERSION=<(napi_build_version)", + ], +- "cflags_cc": [ +- "-std=c++17" +- ], + "conditions": [ + ["OS=='mac'", { + "xcode_settings": { + "GCC_SYMBOLS_PRIVATE_EXTERN": "YES", # -fvisibility=hidden +- "CLANG_CXX_LANGUAGE_STANDARD": "c++17", ++ "CLANG_CXX_LANGUAGE_STANDARD": "<(cxxstd)", + "MACOSX_DEPLOYMENT_TARGET": "10.9", + }, + }], +@@ -39,15 +36,17 @@ + "msvs_settings": { + "VCCLCompilerTool": { + "AdditionalOptions": [ +- "/std:c++17", ++ "/std:<(cxxstd)", + ], + "RuntimeLibrary": 0, + }, + }, + }], + ["OS == 'linux'", { + "cflags_cc": [ +- "-Wno-cast-function-type" ++ "-std=<(cxxstd)", ++ "-fvisibility=hidden", ++ "-Wno-cast-function-type", + ] + }], + ] +@@ -75,5 +74,6 @@ + "openssl_fips": "", + "v8_enable_pointer_compression%": 0, + "v8_enable_31bit_smis_on_64bit_arch%": 0, ++ "cxxstd%": "=0.22.0' version: 0.25.10 @@ -630,7 +635,7 @@ importers: version: 6.2.1 tree-sitter: specifier: ^0.25.0 - version: 0.25.0 + version: 0.25.0(patch_hash=1126ded4a25fbe2a39815134004bbdcca908eef4a66a01e2932386126ec59aac) vitest: specifier: ^3.0.0 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.3) @@ -645,7 +650,7 @@ importers: version: 4.8.4 tree-sitter: specifier: ^0.25.0 - version: 0.25.0 + version: 0.25.0(patch_hash=1126ded4a25fbe2a39815134004bbdcca908eef4a66a01e2932386126ec59aac) devDependencies: node-gyp: specifier: ^11.5.0 @@ -20197,7 +20202,7 @@ snapshots: dependencies: tslib: 2.8.1 - tree-sitter@0.25.0: + tree-sitter@0.25.0(patch_hash=1126ded4a25fbe2a39815134004bbdcca908eef4a66a01e2932386126ec59aac): dependencies: node-addon-api: 8.5.0 node-gyp-build: 4.8.4