From 7e5ba66df32480f29eafac0ef37b0a5bebc5abc0 Mon Sep 17 00:00:00 2001 From: Sam Cao Date: Thu, 19 Sep 2024 08:31:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=BA=20Javet=20v3.1.8=20(#394)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Upgraded V8 to `v12.9.202.18` (2024-09-13) * Upgraded Visual Studio 2022 to `v17.11.3` --- .github/workflows/android_node_build.yml | 2 +- .github/workflows/android_v8_build.yml | 4 +- .github/workflows/linux_build_artifact.yml | 4 +- .../workflows/linux_build_node_v8_image.yml | 4 +- .github/workflows/linux_x86_64_build.yml | 4 +- .github/workflows/macos_arm64_build.yml | 4 +- .github/workflows/macos_x86_64_build.yml | 4 +- .github/workflows/windows_x86_64_build.yml | 4 +- README.rst | 28 ++++----- android/javet-android/build.gradle.kts | 2 +- .../src/main/AndroidManifest.xml | 2 +- android/pom.xml | 4 +- build.gradle.kts | 2 +- cpp/build-android.sh | 2 +- cpp/build-linux-arm64.sh | 2 +- cpp/build-linux-x86_64.sh | 2 +- cpp/build-macos.sh | 2 +- cpp/build-windows.cmd | 2 +- cpp/jni/javet_jni_function.cpp | 63 ++++++++++--------- cpp/jni/javet_resource_node.rc | 12 ++-- cpp/jni/javet_resource_v8.rc | 12 ++-- docker/android/base.Dockerfile | 4 +- docker/android/build.Dockerfile | 2 +- docker/linux-arm64/base_all_in_one.Dockerfile | 4 +- docker/linux-arm64/base_gradle.Dockerfile | 2 +- docker/linux-arm64/base_v8.Dockerfile | 6 +- docker/linux-arm64/build_artifact.Dockerfile | 4 +- .../linux-x86_64/base_all_in_one.Dockerfile | 4 +- docker/linux-x86_64/base_gradle.Dockerfile | 2 +- docker/linux-x86_64/base_v8.Dockerfile | 6 +- docker/linux-x86_64/build.env | 4 +- .../linux-x86_64/build_all_in_one.Dockerfile | 2 +- docker/linux-x86_64/build_artifact.Dockerfile | 4 +- docker/windows-x86_64/base.Dockerfile | 4 +- docker/windows-x86_64/build.Dockerfile | 2 +- docs/conf.py | 2 +- docs/release_notes/release_notes_3_1.rst | 6 ++ docs/tutorial/basic/installation.rst | 34 +++++----- scripts/node/javet-rebuild/rebuild.cmd | 2 +- scripts/node/javet-rebuild/rebuild.sh | 2 +- scripts/python/change_javet_version.py | 2 +- scripts/python/change_node_v8_version.py | 2 +- .../caoccao/javet/enums/JSRuntimeType.java | 2 +- .../javet/interop/loader/JavetLibLoader.java | 2 +- 44 files changed, 140 insertions(+), 129 deletions(-) diff --git a/.github/workflows/android_node_build.yml b/.github/workflows/android_node_build.yml index 36be9bc60..9fe32ebb1 100644 --- a/.github/workflows/android_node_build.yml +++ b/.github/workflows/android_node_build.yml @@ -9,7 +9,7 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_VERSION: 3.1.7 + JAVET_VERSION: 3.1.8 ROOT: /home/runner/work/Javet jobs: diff --git a/.github/workflows/android_v8_build.yml b/.github/workflows/android_v8_build.yml index 8527a8949..26ba1c96a 100644 --- a/.github/workflows/android_v8_build.yml +++ b/.github/workflows/android_v8_build.yml @@ -8,8 +8,8 @@ on: workflow_dispatch: env: - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 ROOT: /home/runner/work/Javet jobs: diff --git a/.github/workflows/linux_build_artifact.yml b/.github/workflows/linux_build_artifact.yml index 61dc15350..8c1a4a657 100644 --- a/.github/workflows/linux_build_artifact.yml +++ b/.github/workflows/linux_build_artifact.yml @@ -18,8 +18,8 @@ env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }} JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 jobs: javet_linux_x86_64: diff --git a/.github/workflows/linux_build_node_v8_image.yml b/.github/workflows/linux_build_node_v8_image.yml index c13078650..66a32b236 100644 --- a/.github/workflows/linux_build_node_v8_image.yml +++ b/.github/workflows/linux_build_node_v8_image.yml @@ -22,8 +22,8 @@ env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }} JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 # if we skip a job using a job level `if` condition, then any dependent jobs also don't run. # we can skip a step of the job, using a step level `if` condition. diff --git a/.github/workflows/linux_x86_64_build.yml b/.github/workflows/linux_x86_64_build.yml index 8331b32a1..751cc5467 100644 --- a/.github/workflows/linux_x86_64_build.yml +++ b/.github/workflows/linux_x86_64_build.yml @@ -8,8 +8,8 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 ROOT: /home/runner/work/Javet jobs: diff --git a/.github/workflows/macos_arm64_build.yml b/.github/workflows/macos_arm64_build.yml index ac10ec84f..5c70c1204 100644 --- a/.github/workflows/macos_arm64_build.yml +++ b/.github/workflows/macos_arm64_build.yml @@ -8,8 +8,8 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 ROOT: /Users/runner/work/Javet jobs: diff --git a/.github/workflows/macos_x86_64_build.yml b/.github/workflows/macos_x86_64_build.yml index 4851fd960..3b3452859 100644 --- a/.github/workflows/macos_x86_64_build.yml +++ b/.github/workflows/macos_x86_64_build.yml @@ -8,8 +8,8 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 ROOT: /Users/runner/work/Javet jobs: diff --git a/.github/workflows/windows_x86_64_build.yml b/.github/workflows/windows_x86_64_build.yml index 1273628f8..0e83e3752 100644 --- a/.github/workflows/windows_x86_64_build.yml +++ b/.github/workflows/windows_x86_64_build.yml @@ -8,8 +8,8 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 - JAVET_VERSION: 3.1.7 + JAVET_V8_VERSION: 12.9.202.18 + JAVET_VERSION: 3.1.8 ROOT: D:\a\Javet jobs: diff --git a/README.rst b/README.rst index 1d32ce440..8bbbe544e 100644 --- a/README.rst +++ b/README.rst @@ -50,7 +50,7 @@ arm ✔️ ❌ ❌ ❌ arm64 ✔️ ✔️ ✔️ ❌ =========== ======= ======= ======= ======= -* Node.js ``v20.17.0`` + V8 ``v12.8.374.17`` +* Node.js ``v20.17.0`` + V8 ``v12.9.202.18`` * Dynamic switch between Node.js and V8 mode * Polyfill V8 mode with `Javenode `_ * V8 API exposure in JVM @@ -78,21 +78,21 @@ Maven com.caoccao.javet javet - 3.1.7 + 3.1.8 com.caoccao.javet javet-linux-arm64 - 3.1.7 + 3.1.8 com.caoccao.javet javet-macos - 3.1.7 + 3.1.8 Gradle Kotlin DSL @@ -100,22 +100,22 @@ Gradle Kotlin DSL .. code-block:: kotlin - implementation("com.caoccao.javet:javet:3.1.7") // Linux and Windows (x86_64) - implementation("com.caoccao.javet:javet-linux-arm64:3.1.7") // Linux (arm64) - implementation("com.caoccao.javet:javet-macos:3.1.7") // Mac OS (x86_64 and arm64) - implementation("com.caoccao.javet:javet-android-node:3.1.7") // Android Node (arm, arm64, x86 and x86_64) - implementation("com.caoccao.javet:javet-android-v8:3.1.7") // Android V8 (arm, arm64, x86 and x86_64) + implementation("com.caoccao.javet:javet:3.1.8") // Linux and Windows (x86_64) + implementation("com.caoccao.javet:javet-linux-arm64:3.1.8") // Linux (arm64) + implementation("com.caoccao.javet:javet-macos:3.1.8") // Mac OS (x86_64 and arm64) + implementation("com.caoccao.javet:javet-android-node:3.1.8") // Android Node (arm, arm64, x86 and x86_64) + implementation("com.caoccao.javet:javet-android-v8:3.1.8") // Android V8 (arm, arm64, x86 and x86_64) Gradle Groovy DSL ^^^^^^^^^^^^^^^^^ .. code-block:: groovy - implementation 'com.caoccao.javet:javet:3.1.7' // Linux and Windows (x86_64) - implementation 'com.caoccao.javet:javet-linux-arm64:3.1.7' // Linux (arm64) - implementation 'com.caoccao.javet:javet-macos:3.1.7' // Mac OS (x86_64 and arm64) - implementation 'com.caoccao.javet:javet-android-node:3.1.7' // Android Node (arm, arm64, x86 and x86_64) - implementation 'com.caoccao.javet:javet-android-v8:3.1.7' // Android V8 (arm, arm64, x86 and x86_64) + implementation 'com.caoccao.javet:javet:3.1.8' // Linux and Windows (x86_64) + implementation 'com.caoccao.javet:javet-linux-arm64:3.1.8' // Linux (arm64) + implementation 'com.caoccao.javet:javet-macos:3.1.8' // Mac OS (x86_64 and arm64) + implementation 'com.caoccao.javet:javet-android-node:3.1.8' // Android Node (arm, arm64, x86 and x86_64) + implementation 'com.caoccao.javet:javet-android-v8:3.1.8' // Android V8 (arm, arm64, x86 and x86_64) Hello Javet ----------- diff --git a/android/javet-android/build.gradle.kts b/android/javet-android/build.gradle.kts index 7067053d5..553f7ed17 100644 --- a/android/javet-android/build.gradle.kts +++ b/android/javet-android/build.gradle.kts @@ -73,7 +73,7 @@ object Config { const val ANDROIDX_TEST = "1.1.5" const val APPCOMPAT = "1.3.1" const val DESUGAR_JDK_LIBS = "2.0.4" - const val JAVET = "3.1.7" + const val JAVET = "3.1.8" const val JUNIT = "5.10.1" } } diff --git a/android/javet-android/src/main/AndroidManifest.xml b/android/javet-android/src/main/AndroidManifest.xml index e26a9a91c..a1dc8778a 100644 --- a/android/javet-android/src/main/AndroidManifest.xml +++ b/android/javet-android/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/android/pom.xml b/android/pom.xml index 422ead196..0b4e5c019 100644 --- a/android/pom.xml +++ b/android/pom.xml @@ -3,7 +3,7 @@ com.caoccao.javet javet-android - 3.1.7 + 3.1.8 javet aar Javet is Java + V8 (JAVa + V + EighT). It is an awesome way of embedding V8 in Java. @@ -29,7 +29,7 @@ scm:git:git://github.com/caoccao/Javet.git scm:git:git@github.com:caoccao/caoccao.git https://github.com/caoccao/Javet - 3.1.7 + 3.1.8 diff --git a/build.gradle.kts b/build.gradle.kts index 55f876152..2075f5d00 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -72,7 +72,7 @@ object Config { const val BYTE_BUDDY = "1.14.10" const val JACKSON_DATABIND = "2.16.0" const val JAVA_VERSION = "1.8" - const val JAVET = "3.1.7" + const val JAVET = "3.1.8" const val JETTY_WEBSOCKET = "9.4.53.v20231009" const val JUNIT = "5.10.1" } diff --git a/cpp/build-android.sh b/cpp/build-android.sh index 9611c6369..9bb60016c 100755 --- a/cpp/build-android.sh +++ b/cpp/build-android.sh @@ -2,7 +2,7 @@ # Usage for V8: sh build-android.sh -DV8_DIR=${HOME}/v8 -DCMAKE_ANDROID_NDK=${HOME}/android -DCMAKE_ANDROID_ARCH=arm64 # Usage for Node: sh build-android.sh -DNODE_DIR=${HOME}/node -DCMAKE_ANDROID_NDK=${HOME}/android -DCMAKE_ANDROID_ARCH=arm64 -JAVET_VERSION=3.1.7 +JAVET_VERSION=3.1.8 rm -rf build_android mkdir build_android cd build_android diff --git a/cpp/build-linux-arm64.sh b/cpp/build-linux-arm64.sh index 1e951d625..68b5ccc26 100644 --- a/cpp/build-linux-arm64.sh +++ b/cpp/build-linux-arm64.sh @@ -2,7 +2,7 @@ # Usage for V8: sh build-linux-arm64.sh -DV8_DIR=${HOME}/v8 # Usage for Node: sh build-linux-arm64.sh -DNODE_DIR=${HOME}/node -JAVET_VERSION=3.1.7 +JAVET_VERSION=3.1.8 rm -rf build_linux_arm64 mkdir build_linux_arm64 cd build_linux_arm64 diff --git a/cpp/build-linux-x86_64.sh b/cpp/build-linux-x86_64.sh index 48beaa8d5..dad650e75 100644 --- a/cpp/build-linux-x86_64.sh +++ b/cpp/build-linux-x86_64.sh @@ -2,7 +2,7 @@ # Usage for V8: sh build-linux-x86_64.sh -DV8_DIR=${HOME}/v8 # Usage for Node: sh build-linux-x86_64.sh -DNODE_DIR=${HOME}/node -JAVET_VERSION=3.1.7 +JAVET_VERSION=3.1.8 rm -rf build_linux_x86_64 mkdir build_linux_x86_64 cd build_linux_x86_64 diff --git a/cpp/build-macos.sh b/cpp/build-macos.sh index 031745d0e..5ed953bfd 100755 --- a/cpp/build-macos.sh +++ b/cpp/build-macos.sh @@ -2,7 +2,7 @@ # Usage for V8: sh build-macos.sh -DV8_DIR=${HOME}/v8 # Usage for Node: sh build-macos.sh -DNODE_DIR=${HOME}/node -JAVET_VERSION=3.1.7 +JAVET_VERSION=3.1.8 rm -rf build_macos mkdir build_macos cd build_macos diff --git a/cpp/build-windows.cmd b/cpp/build-windows.cmd index e12b8ae06..07877b419 100644 --- a/cpp/build-windows.cmd +++ b/cpp/build-windows.cmd @@ -1,7 +1,7 @@ @echo off REM Usage for V8: build -DV8_DIR=C:\v8 REM Usage for Node: build -DNODE_DIR=C:\node -SET JAVET_VERSION=3.1.7 +SET JAVET_VERSION=3.1.8 rd /s/q build_windows mkdir build_windows cd build_windows diff --git a/cpp/jni/javet_jni_function.cpp b/cpp/jni/javet_jni_function.cpp index fa60158d9..3ae334e99 100644 --- a/cpp/jni/javet_jni_function.cpp +++ b/cpp/jni/javet_jni_function.cpp @@ -158,16 +158,21 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionCopyS // Clone the scope info #ifdef ENABLE_NODE auto sourceScopeInfo = sourceV8InternalShared.scope_info(); -#else - auto sourceScopeInfo = sourceV8InternalShared->scope_info(); -#endif auto emptyBlocklistHandle = V8InternalStringSet::New(v8InternalIsolate); auto targetScopeInfo = *V8InternalScopeInfo::RecreateWithBlockList( v8InternalIsolate, v8::internal::handle(sourceScopeInfo, v8InternalIsolate), emptyBlocklistHandle); -#ifdef ENABLE_NODE targetV8InternalShared.set_raw_scope_info(targetScopeInfo); #else - targetV8InternalShared->set_raw_scope_info(targetScopeInfo); + auto sourceScopeInfo = sourceV8InternalShared->scope_info(); + const int length = (sourceScopeInfo->AllocatedSize() - V8InternalHeapObject::kHeaderSize) / v8::internal::kTaggedSize; + auto targetScopeInfo = v8InternalIsolate->factory()->NewScopeInfo(length); + v8InternalIsolate->heap()->CopyRange( + *targetScopeInfo, + targetScopeInfo->data_start(), + sourceScopeInfo->data_start(), + length, + V8InternalWriteBarrierMode::UPDATE_WRITE_BARRIER); + targetV8InternalShared->set_raw_scope_info(*targetScopeInfo); #endif targetV8InternalFunction.set_shared(targetV8InternalShared, V8InternalWriteBarrierMode::UPDATE_WRITE_BARRIER); success = true; @@ -223,13 +228,13 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionDisca V8InternalSharedFunctionInfo::DiscardCompiled(v8InternalIsolate, v8::internal::handle(v8InternalShared, v8InternalIsolate)); return true; } + } } - } return false; -} + } JNIEXPORT jobjectArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetArguments -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -261,10 +266,10 @@ JNIEXPORT jobjectArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionG } } return nullptr; -} + } JNIEXPORT jbyteArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetCachedData -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { if (IS_V8_FUNCTION(v8ValueType)) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -288,13 +293,13 @@ JNIEXPORT jbyteArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionGet return Javet::Converter::ToJavaByteArray(jniEnv, cachedDataPointer.get()); } } + } } - } return nullptr; } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetContext -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalIsolate = reinterpret_cast(v8Context->GetIsolate()); @@ -307,7 +312,7 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetCon } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetInternalProperties -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { // This feature is not enabled yet. @@ -328,7 +333,7 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetInt } JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSFunctionType -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); using namespace Javet::Enums::JSFunctionType; if (IS_V8_FUNCTION(v8ValueType)) { @@ -352,7 +357,7 @@ JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSFunc } JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSScopeType -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -369,7 +374,7 @@ JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSScop } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetScopeInfos -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jboolean includeGlobalVariables, jboolean includeScopeTypeGlobal) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); V8LocalArray v8LocalArray = v8::Array::New(v8Context->GetIsolate()); @@ -403,12 +408,12 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetSco v8LocalArray->Set(v8Context, index, innerV8LocalArray).ToChecked(); ++index; } - } +} return v8Runtime->SafeToExternalV8Value(jniEnv, v8Context, v8LocalArray); } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetScriptSource -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { V8InternalDisallowGarbageCollection disallowGarbageCollection; @@ -440,13 +445,13 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetScr Javet::Converter::ToJavaString(jniEnv, sourceCode.get()), startPosition, endPosition); - } - } +} +} return nullptr; } JNIEXPORT jstring JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetSourceCode -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -470,13 +475,13 @@ JNIEXPORT jstring JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetSou startPosition, endPosition - startPosition); #endif return Javet::Converter::ToJavaString(jniEnv, sourceCode.get()); - } } +} return nullptr; } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsCompiled -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -493,7 +498,7 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsCom } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsWrapped -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -510,7 +515,7 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsWra } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetContext -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mV8ContextValue) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mV8ContextValue) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); jboolean success = false; if (IS_V8_FUNCTION(v8ValueType)) { @@ -525,7 +530,7 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetCo } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetScriptSource -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mScriptSource, jboolean mCloneScript) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mScriptSource, jboolean mCloneScript) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); jboolean success = false; if (IS_V8_FUNCTION(v8ValueType)) { @@ -600,13 +605,13 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetSc } DELETE_LOCAL_REF(jniEnv, mSourceCode); } + } } - } return success; } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetSourceCode -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jstring mSourceCode, jboolean mCloneScript) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jstring mSourceCode, jboolean mCloneScript) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); jboolean success = false; if (IS_V8_FUNCTION(v8ValueType)) { @@ -755,8 +760,8 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetSo success = true; } break; - } } +} } return success; } diff --git a/cpp/jni/javet_resource_node.rc b/cpp/jni/javet_resource_node.rc index 814c1bf48..32a62983c 100644 --- a/cpp/jni/javet_resource_node.rc +++ b/cpp/jni/javet_resource_node.rc @@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,7,0 - PRODUCTVERSION 3,1,7,0 + FILEVERSION 3,1,8,0 + PRODUCTVERSION 3,1,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -79,12 +79,12 @@ BEGIN BEGIN VALUE "CompanyName", "caoccao.com" VALUE "FileDescription", "caoccao.com" - VALUE "FileVersion", "3.1.7.0" - VALUE "InternalName", "libjavet-node-windows-x86_64.v.3.1.7.dll" + VALUE "FileVersion", "3.1.8.0" + VALUE "InternalName", "libjavet-node-windows-x86_64.v.3.1.8.dll" VALUE "LegalCopyright", "Copyright (c) 2021-2024." - VALUE "OriginalFilename", "libjavet-node-windows-x86_64.v.3.1.7.dll" + VALUE "OriginalFilename", "libjavet-node-windows-x86_64.v.3.1.8.dll" VALUE "ProductName", "Javet Windows" - VALUE "ProductVersion", "3.1.7.0" + VALUE "ProductVersion", "3.1.8.0" END END BLOCK "VarFileInfo" diff --git a/cpp/jni/javet_resource_v8.rc b/cpp/jni/javet_resource_v8.rc index 085460617..6f518d9d6 100644 --- a/cpp/jni/javet_resource_v8.rc +++ b/cpp/jni/javet_resource_v8.rc @@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,7,0 - PRODUCTVERSION 3,1,7,0 + FILEVERSION 3,1,8,0 + PRODUCTVERSION 3,1,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -79,12 +79,12 @@ BEGIN BEGIN VALUE "CompanyName", "caoccao.com" VALUE "FileDescription", "caoccao.com" - VALUE "FileVersion", "3.1.7.0" - VALUE "InternalName", "libjavet-v8-windows-x86_64.v.3.1.7.dll" + VALUE "FileVersion", "3.1.8.0" + VALUE "InternalName", "libjavet-v8-windows-x86_64.v.3.1.8.dll" VALUE "LegalCopyright", "Copyright (c) 2021-2024." - VALUE "OriginalFilename", "libjavet-v8-windows-x86_64.v.3.1.7.dll" + VALUE "OriginalFilename", "libjavet-v8-windows-x86_64.v.3.1.8.dll" VALUE "ProductName", "Javet Windows" - VALUE "ProductVersion", "3.1.7.0" + VALUE "ProductVersion", "3.1.8.0" END END BLOCK "VarFileInfo" diff --git a/docker/android/base.Dockerfile b/docker/android/base.Dockerfile index feb8e4b26..fa615f082 100644 --- a/docker/android/base.Dockerfile +++ b/docker/android/base.Dockerfile @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Usage: docker build -t sjtucaocao/javet-android:3.1.7 -f docker/android/base.Dockerfile . +# Usage: docker build -t sjtucaocao/javet-android:3.1.8 -f docker/android/base.Dockerfile . -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ubuntu:20.04 WORKDIR / diff --git a/docker/android/build.Dockerfile b/docker/android/build.Dockerfile index af814f9dd..8e88f9337 100644 --- a/docker/android/build.Dockerfile +++ b/docker/android/build.Dockerfile @@ -15,7 +15,7 @@ # Usage: docker build -t javet-android:local -f docker/android/build.Dockerfile . -FROM sjtucaocao/javet-android:3.1.7 +FROM sjtucaocao/javet-android:3.1.8 WORKDIR / # Copy Javet diff --git a/docker/linux-arm64/base_all_in_one.Dockerfile b/docker/linux-arm64/base_all_in_one.Dockerfile index ad644a65a..6c338a487 100644 --- a/docker/linux-arm64/base_all_in_one.Dockerfile +++ b/docker/linux-arm64/base_all_in_one.Dockerfile @@ -13,10 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Usage: docker build -t sjtucaocao/javet-arm64:3.1.7 -f docker/linux-arm64/base_all_in_one.Dockerfile . +# Usage: docker build -t sjtucaocao/javet-arm64:3.1.8 -f docker/linux-arm64/base_all_in_one.Dockerfile . ARG JAVET_NODE_VERSION=18.15.0 -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ubuntu:20.04 WORKDIR / diff --git a/docker/linux-arm64/base_gradle.Dockerfile b/docker/linux-arm64/base_gradle.Dockerfile index 8927e28f4..842a07067 100644 --- a/docker/linux-arm64/base_gradle.Dockerfile +++ b/docker/linux-arm64/base_gradle.Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # Usage: docker build \ -# -t sjtucaocao/javet:arm64-3.1.7 \ +# -t sjtucaocao/javet:arm64-3.1.8 \ # --build-arg JAVET_REPO=sjtucaocao/javet \ # -f docker/linux-arm64/base_gradle.Dockerfile . diff --git a/docker/linux-arm64/base_v8.Dockerfile b/docker/linux-arm64/base_v8.Dockerfile index bf25271eb..2ce2848f6 100644 --- a/docker/linux-arm64/base_v8.Dockerfile +++ b/docker/linux-arm64/base_v8.Dockerfile @@ -14,13 +14,13 @@ # limitations under the License. # Usage: docker build \ -# -t sjtucaocao/javet:arm64-base-v8_12.8.374.17 \ +# -t sjtucaocao/javet:arm64-base-v8_12.9.202.18 \ # --build-arg JAVET_REPO=sjtucaocao/javet \ -# --build-arg JAVET_V8_VERSION=12.8.374.17 \ +# --build-arg JAVET_V8_VERSION=12.9.202.18 \ # -f docker/linux-arm64/base_v8.Dockerfile . ARG JAVET_REPO=sjtucaocao/javet -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ${JAVET_REPO}:arm64-base-jvm diff --git a/docker/linux-arm64/build_artifact.Dockerfile b/docker/linux-arm64/build_artifact.Dockerfile index 9df9c1262..0c63f73a9 100644 --- a/docker/linux-arm64/build_artifact.Dockerfile +++ b/docker/linux-arm64/build_artifact.Dockerfile @@ -18,13 +18,13 @@ # --build-arg JAVET_REPO=sjtucaocao/javet \ # --build-arg JAVET_NODE_VERSION=18.12.1 \ # --build-arg JAVET_V8_VERSION=10.8.168.20 \ -# --build-arg JAVET_VERSION=3.1.7 \ +# --build-arg JAVET_VERSION=3.1.8 \ # -f docker/linux-arm64/build_artifact.Dockerfile . ARG JAVET_REPO=sjtucaocao/javet ARG JAVET_NODE_VERSION=18.12.1 ARG JAVET_V8_VERSION=10.8.168.20 -ARG JAVET_VERSION=3.1.7 +ARG JAVET_VERSION=3.1.8 FROM ${JAVET_REPO}:arm64-base-node_${JAVET_NODE_VERSION} as base-node diff --git a/docker/linux-x86_64/base_all_in_one.Dockerfile b/docker/linux-x86_64/base_all_in_one.Dockerfile index 42816a10a..060fa6650 100644 --- a/docker/linux-x86_64/base_all_in_one.Dockerfile +++ b/docker/linux-x86_64/base_all_in_one.Dockerfile @@ -13,13 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Usage: docker build -t sjtucaocao/javet:3.1.7 -f docker/linux-x86_64/base_all_in_one.Dockerfile . +# Usage: docker build -t sjtucaocao/javet:3.1.8 -f docker/linux-x86_64/base_all_in_one.Dockerfile . FROM ubuntu:20.04 WORKDIR / ARG JAVET_NODE_VERSION=20.17.0 -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 # Update Ubuntu ENV DEBIAN_FRONTEND=noninteractive diff --git a/docker/linux-x86_64/base_gradle.Dockerfile b/docker/linux-x86_64/base_gradle.Dockerfile index 414f696d8..ad4939afc 100644 --- a/docker/linux-x86_64/base_gradle.Dockerfile +++ b/docker/linux-x86_64/base_gradle.Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # Usage: docker build \ -# -t sjtucaocao/javet:x86_64-3.1.7 \ +# -t sjtucaocao/javet:x86_64-3.1.8 \ # --build-arg JAVET_REPO=sjtucaocao/javet \ # -f docker/linux-x86_64/base_gradle.Dockerfile . diff --git a/docker/linux-x86_64/base_v8.Dockerfile b/docker/linux-x86_64/base_v8.Dockerfile index 040841a77..4590d9484 100644 --- a/docker/linux-x86_64/base_v8.Dockerfile +++ b/docker/linux-x86_64/base_v8.Dockerfile @@ -14,13 +14,13 @@ # limitations under the License. # Usage: docker build \ -# -t sjtucaocao/javet:x86_64-base-v8_12.8.374.17 \ +# -t sjtucaocao/javet:x86_64-base-v8_12.9.202.18 \ # --build-arg JAVET_REPO=sjtucaocao/javet \ -# --build-arg JAVET_V8_VERSION=12.8.374.17 \ +# --build-arg JAVET_V8_VERSION=12.9.202.18 \ # -f docker/linux-x86_64/base_v8.Dockerfile . ARG JAVET_REPO=sjtucaocao/javet -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ${JAVET_REPO}:x86_64-base-jvm diff --git a/docker/linux-x86_64/build.env b/docker/linux-x86_64/build.env index b7d739277..c2dee0970 100644 --- a/docker/linux-x86_64/build.env +++ b/docker/linux-x86_64/build.env @@ -1,4 +1,4 @@ JAVET_REPO=sjtucaocao/javet -JAVET_VERSION=3.1.7 -JAVET_V8_VERSION=12.8.374.17 +JAVET_VERSION=3.1.8 +JAVET_V8_VERSION=12.9.202.18 JAVET_NODE_VERSION=20.17.0 diff --git a/docker/linux-x86_64/build_all_in_one.Dockerfile b/docker/linux-x86_64/build_all_in_one.Dockerfile index 7a085dcd4..3838e320b 100644 --- a/docker/linux-x86_64/build_all_in_one.Dockerfile +++ b/docker/linux-x86_64/build_all_in_one.Dockerfile @@ -15,7 +15,7 @@ # Usage: docker build -t javet:local -f docker/linux-x86_64/build_all_in_one.Dockerfile . -FROM sjtucaocao/javet:3.1.7 +FROM sjtucaocao/javet:3.1.8 WORKDIR / # Copy Javet diff --git a/docker/linux-x86_64/build_artifact.Dockerfile b/docker/linux-x86_64/build_artifact.Dockerfile index 1c46a24ce..6cc5b5a5f 100644 --- a/docker/linux-x86_64/build_artifact.Dockerfile +++ b/docker/linux-x86_64/build_artifact.Dockerfile @@ -18,13 +18,13 @@ # --build-arg JAVET_REPO=sjtucaocao/javet \ # --build-arg JAVET_NODE_VERSION=18.12.1 \ # --build-arg JAVET_V8_VERSION=10.8.168.20 \ -# --build-arg JAVET_VERSION=3.1.7 \ +# --build-arg JAVET_VERSION=3.1.8 \ # -f docker/linux-x86_64/build_artifact.Dockerfile . ARG JAVET_REPO=sjtucaocao/javet ARG JAVET_NODE_VERSION=18.12.1 ARG JAVET_V8_VERSION=10.8.168.20 -ARG JAVET_VERSION=3.1.7 +ARG JAVET_VERSION=3.1.8 FROM ${JAVET_REPO}:x86_64-base-node_${JAVET_NODE_VERSION} as base-v8 diff --git a/docker/windows-x86_64/base.Dockerfile b/docker/windows-x86_64/base.Dockerfile index 61470a8ce..a010d3827 100644 --- a/docker/windows-x86_64/base.Dockerfile +++ b/docker/windows-x86_64/base.Dockerfile @@ -29,10 +29,10 @@ # The following dockerfile has been out of date because it still uses # Visual Studio 2019 Community. Please contact the maintainer if you want an upgrade. -# Usage: docker build -t sjtucaocao/javet-windows:3.1.7 -m 4G -f docker/windows-x86_64/base.Dockerfile . +# Usage: docker build -t sjtucaocao/javet-windows:3.1.8 -m 4G -f docker/windows-x86_64/base.Dockerfile . ARG JAVET_NODE_VERSION=20.17.0 -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 # https://hub.docker.com/_/microsoft-windows FROM mcr.microsoft.com/windows:20H2-amd64 diff --git a/docker/windows-x86_64/build.Dockerfile b/docker/windows-x86_64/build.Dockerfile index 0ed1b1ed0..0ae85516b 100644 --- a/docker/windows-x86_64/build.Dockerfile +++ b/docker/windows-x86_64/build.Dockerfile @@ -15,7 +15,7 @@ # Usage: docker build -t javet:local -f docker/windows-x86_64/build.Dockerfile . -FROM sjtucaocao/javet-windows:3.1.7 +FROM sjtucaocao/javet-windows:3.1.8 SHELL ["cmd", "/S", "/C"] WORKDIR / diff --git a/docs/conf.py b/docs/conf.py index 22a027af2..b85404084 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Sam Cao' # The full version, including alpha/beta/rc tags -release = '3.1.7' +release = '3.1.8' # -- General configuration --------------------------------------------------- diff --git a/docs/release_notes/release_notes_3_1.rst b/docs/release_notes/release_notes_3_1.rst index a8fdc22d1..ff8d3ec38 100644 --- a/docs/release_notes/release_notes_3_1.rst +++ b/docs/release_notes/release_notes_3_1.rst @@ -2,6 +2,12 @@ Release Notes 3.1.x =================== +3.1.8 +----- + +* Upgraded V8 to ``v12.9.202.18`` (2024-09-13) +* Upgraded Visual Studio 2022 to `v17.11.3 `_ + 3.1.7 ----- diff --git a/docs/tutorial/basic/installation.rst b/docs/tutorial/basic/installation.rst index 60e50ad2a..5c4230855 100644 --- a/docs/tutorial/basic/installation.rst +++ b/docs/tutorial/basic/installation.rst @@ -16,21 +16,21 @@ Maven com.caoccao.javet javet - 3.1.7 + 3.1.8 com.caoccao.javet javet-linux-arm64 - 3.1.7 + 3.1.8 com.caoccao.javet javet-macos - 3.1.7 + 3.1.8 .. tab:: Complete @@ -38,7 +38,7 @@ Maven .. code-block:: xml - 3.1.7 + 3.1.8 @@ -115,11 +115,11 @@ Gradle Kotlin DSL .. code-block:: kotlin - implementation("com.caoccao.javet:javet:3.1.7") // Linux and Windows (x86_64) - implementation("com.caoccao.javet:javet-linux-arm64:3.1.7") // Linux (arm64) - implementation("com.caoccao.javet:javet-macos:3.1.7") // Mac OS (x86_64 and arm64) - implementation("com.caoccao.javet:javet-android-node:3.1.7") // Android Node (arm, arm64, x86 and x86_64) - implementation("com.caoccao.javet:javet-android-v8:3.1.7") // Android V8 (arm, arm64, x86 and x86_64) + implementation("com.caoccao.javet:javet:3.1.8") // Linux and Windows (x86_64) + implementation("com.caoccao.javet:javet-linux-arm64:3.1.8") // Linux (arm64) + implementation("com.caoccao.javet:javet-macos:3.1.8") // Mac OS (x86_64 and arm64) + implementation("com.caoccao.javet:javet-android-node:3.1.8") // Android Node (arm, arm64, x86 and x86_64) + implementation("com.caoccao.javet:javet-android-v8:3.1.8") // Android V8 (arm, arm64, x86 and x86_64) .. tab:: Complete @@ -130,11 +130,11 @@ Gradle Kotlin DSL val os = OperatingSystem.current() val cpuArch = System.getProperty("os.arch") if (os.isMacOsX) { - implementation("com.caoccao.javet:javet:3.1.7") + implementation("com.caoccao.javet:javet:3.1.8") } else if (os.isLinux && (cpuArch == "aarch64" || cpuArch == "arm64")) { - implementation("com.caoccao.javet:javet-linux-arm64:3.1.7") + implementation("com.caoccao.javet:javet-linux-arm64:3.1.8") } else { - implementation("com.caoccao.javet:javet-macos:3.1.7") + implementation("com.caoccao.javet:javet-macos:3.1.8") } Gradle Groovy DSL @@ -142,11 +142,11 @@ Gradle Groovy DSL .. code-block:: groovy - implementation 'com.caoccao.javet:javet:3.1.7' // Linux and Windows (x86_64) - implementation 'com.caoccao.javet:javet-linux-arm64:3.1.7' // Linux (arm64) - implementation 'com.caoccao.javet:javet-macos:3.1.7' // Mac OS (x86_64 and arm64) - implementation 'com.caoccao.javet:javet-android-node:3.1.7' // Android Node (arm, arm64, x86 and x86_64) - implementation 'com.caoccao.javet:javet-android-v8:3.1.7' // Android V8 (arm, arm64, x86 and x86_64) + implementation 'com.caoccao.javet:javet:3.1.8' // Linux and Windows (x86_64) + implementation 'com.caoccao.javet:javet-linux-arm64:3.1.8' // Linux (arm64) + implementation 'com.caoccao.javet:javet-macos:3.1.8' // Mac OS (x86_64 and arm64) + implementation 'com.caoccao.javet:javet-android-node:3.1.8' // Android Node (arm, arm64, x86 and x86_64) + implementation 'com.caoccao.javet:javet-android-v8:3.1.8' // Android V8 (arm, arm64, x86 and x86_64) OS Compatibility ================ diff --git a/scripts/node/javet-rebuild/rebuild.cmd b/scripts/node/javet-rebuild/rebuild.cmd index b0a0d570a..70d92ecbb 100644 --- a/scripts/node/javet-rebuild/rebuild.cmd +++ b/scripts/node/javet-rebuild/rebuild.cmd @@ -1,5 +1,5 @@ @echo off -SET NODE_LIB_FILE="..\..\..\..\..\..\build\libs\libjavet-node-windows-x86_64.v.3.1.7.lib" +SET NODE_LIB_FILE="..\..\..\..\..\..\build\libs\libjavet-node-windows-x86_64.v.3.1.8.lib" cd %NODE_MODULE_ROOT% call node-gyp clean call node-gyp configure --module_name=%NODE_MODULE_NAME% --module_path=%NODE_MODULE_PATH% --node_lib_file=%NODE_LIB_FILE% diff --git a/scripts/node/javet-rebuild/rebuild.sh b/scripts/node/javet-rebuild/rebuild.sh index 8195394b6..f201e9c37 100755 --- a/scripts/node/javet-rebuild/rebuild.sh +++ b/scripts/node/javet-rebuild/rebuild.sh @@ -1 +1 @@ -patchelf --add-needed libjavet-node-linux-x86_64.v.3.1.7.so ${NODE_MODULE_FILE} +patchelf --add-needed libjavet-node-linux-x86_64.v.3.1.8.so ${NODE_MODULE_FILE} diff --git a/scripts/python/change_javet_version.py b/scripts/python/change_javet_version.py index ac3805746..e64172fac 100644 --- a/scripts/python/change_javet_version.py +++ b/scripts/python/change_javet_version.py @@ -189,7 +189,7 @@ def _update(self, relative_file_path: str, line_separator: str, *patterns: list) logging.info(' Updated.') def main(): - change_javet_version = ChangeJavetVersion('3.1.7') + change_javet_version = ChangeJavetVersion('3.1.8') change_javet_version.update() return 0 diff --git a/scripts/python/change_node_v8_version.py b/scripts/python/change_node_v8_version.py index c283f1695..c84bd94f3 100644 --- a/scripts/python/change_node_v8_version.py +++ b/scripts/python/change_node_v8_version.py @@ -172,7 +172,7 @@ def update(self) -> None: def main(): change_node_version = ChangeNodeVersion('20.17.0') change_node_version.update() - change_v8_version = ChangeV8Version('12.8.374.17') + change_v8_version = ChangeV8Version('12.9.202.18') change_v8_version.update() return 0 diff --git a/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java b/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java index d0c258274..d506d6315 100644 --- a/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java +++ b/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java @@ -47,7 +47,7 @@ public enum JSRuntimeType { */ V8( "v8", - "12.8.374.17", + "12.9.202.18", V8RuntimeOptions::new, o -> o instanceof V8RuntimeOptions); diff --git a/src/main/java/com/caoccao/javet/interop/loader/JavetLibLoader.java b/src/main/java/com/caoccao/javet/interop/loader/JavetLibLoader.java index 3d636b6f9..914b0d77f 100644 --- a/src/main/java/com/caoccao/javet/interop/loader/JavetLibLoader.java +++ b/src/main/java/com/caoccao/javet/interop/loader/JavetLibLoader.java @@ -45,7 +45,7 @@ public final class JavetLibLoader { * * @since 0.8.0 */ - public static final String LIB_VERSION = "3.1.7"; + public static final String LIB_VERSION = "3.1.8"; private static final String ANDROID_ABI_ARM = "armeabi-v7a"; private static final String ANDROID_ABI_ARM64 = "arm64-v8a"; private static final String ANDROID_ABI_X86 = "x86";