Unverified Commit 8200d896 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

test: fix native addon compilation on Node.js 26 (#100819)

These failed to compiled on Nodejs 26
```
.../node_modules/native-addon install: ../addon.cc:8:35: error: 'class v8::Context' has no member named 'GetIsolate'
.../node_modules/native-addon install:     8 |   v8::Isolate* isolate = context->GetIsolate();
.../node_modules/native-addon install:       |                                   ^~~~~~~~~~
.../node_modules/native-addon install: make: *** [native_addon.target.mk:108: Release/obj.target/native_addon/addon.o] Error 1
.../node_modules/native-addon install: make: Leaving directory '/vercel/path0/node_modules/.pnpm/native-addon@file+native-addon/node_modules/native-addon/build'
.../node_modules/native-addon install: gyp ERR! build error
.../node_modules/native-addon install: gyp ERR! stack Error: `make` failed with exit code: 2
.../node_modules/native-addon install: gyp ERR! stack at ChildProcess.<anonymous> (/vercel/path0/.vercel/cache/corepack/home/v1/pnpm/12.9.1/dist/node_modules/node-gyp/lib/build.js:219:23)
.../node_modules/native-addon install: gyp ERR! System Linux 6.18.49
.../node_modules/native-addon install: gyp ERR! command "/node26/bin/node" "/vercel/path0/.vercel/cache/corepack/home/v1/pnpm/12.9.1/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
```
parent 9da349b7
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <node.h> #include <node.h>
NODE_MODULE_INIT(/* exports, module, context */) { NODE_MODULE_INIT(/* exports, module, context */) {
v8::Isolate* isolate = context->GetIsolate(); v8::Isolate* isolate = v8::Isolate::GetCurrent();
exports exports
->Set(context, ->Set(context,
v8::String::NewFromUtf8(isolate, "CONTEXT_AWARE").ToLocalChecked(), v8::String::NewFromUtf8(isolate, "CONTEXT_AWARE").ToLocalChecked(),
......
// run deploy tests: v1
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
describe('turbopack-reports', () => { describe('turbopack-reports', () => {
......
// run deploy tests: v1
import path from 'path' import path from 'path'
import { isReact18, nextTestSetup, isNextStart } from 'e2e-utils' import { isReact18, nextTestSetup, isNextStart } from 'e2e-utils'
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <node.h> #include <node.h>
NODE_MODULE_INIT(/* exports, module, context */) { NODE_MODULE_INIT(/* exports, module, context */) {
v8::Isolate* isolate = context->GetIsolate(); v8::Isolate* isolate = v8::Isolate::GetCurrent();
exports exports
->Set(context, ->Set(context,
v8::String::NewFromUtf8(isolate, "CONTEXT_AWARE").ToLocalChecked(), v8::String::NewFromUtf8(isolate, "CONTEXT_AWARE").ToLocalChecked(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment