Skip to content

Commit

Permalink
🏡 Javet v4.1.1 (#424)
Browse files Browse the repository at this point in the history
* Upgraded Node.js to `v22.12.0` ([2024-12-03](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.12.0))
* Upgraded V8 to `v13.2.152.16` (2024-12-05)
* Upgraded Visual Studio 2022 to [v17.12.3](https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.12)
* Added `getAbsoluteResourceName()` to `IV8ModuleResolver`
* Fixed memory leaks in function callback in edge cases
* `require(esm)` is enabled by default
* Removed `isExperimentalRequireModule()`, `setExperimentalRequireModule` from `NodeFlags`
* Added `isNoExperimentalRequireModule()`, `setNoExperimentalRequireModule` to `NodeFlags`
  • Loading branch information
caoccao authored Dec 7, 2024
1 parent 20c5edd commit 6b97eb4
Show file tree
Hide file tree
Showing 59 changed files with 380 additions and 261 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android_node_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
workflow_dispatch:

env:
JAVET_NODE_VERSION: 22.11.0
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_VERSION: 4.1.1
ROOT: /home/runner/work/Javet

jobs:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/android_v8_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
workflow_dispatch:

env:
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1
ROOT: /home/runner/work/Javet

jobs:
Expand Down Expand Up @@ -192,12 +192,24 @@ jobs:
mkdir -p android/javet-android/src/main/jniLibs/x86
mkdir -p android/javet-android/src/main/jniLibs/x86_64
- name: Download Javet arm i18n
uses: actions/download-artifact@v4
with:
name: javet-android-v8-arm-${{ env.JAVET_VERSION }}-i18n
path: android/javet-android/src/main/jniLibs/armeabi-v7a

- name: Download Javet arm64 i18n
uses: actions/download-artifact@v4
with:
name: javet-android-v8-arm64-${{ env.JAVET_VERSION }}-i18n
path: android/javet-android/src/main/jniLibs/arm64-v8a

- name: Download Javet x86 i18n
uses: actions/download-artifact@v4
with:
name: javet-android-v8-x86-${{ env.JAVET_VERSION }}-i18n
path: android/javet-android/src/main/jniLibs/x86

- name: Download Javet x86_64 i18n
uses: actions/download-artifact@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux_build_artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ on:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }}
JAVET_NODE_VERSION: 22.11.0
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1

jobs:
javet_linux_x86_64:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux_build_node_v8_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }}
JAVET_NODE_VERSION: 22.11.0
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1

# 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.
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/linux_x86_64_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
workflow_dispatch:

env:
JAVET_NODE_VERSION: 22.11.0
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1
ROOT: /home/runner/work/Javet

jobs:
Expand Down Expand Up @@ -62,6 +62,7 @@ jobs:
gclient sync -D
cd v8
python3 tools/dev/v8gen.py x64.release -- v8_monolithic=true v8_use_external_startup_data=false is_component_build=false ${{ matrix.v8_flag }} v8_enable_pointer_compression=false v8_static_library=true symbol_level=0 use_custom_libcxx=false v8_enable_sandbox=false
gn gen out.gn/x64.release
sed -i '/#include "src\/libplatform\//a #include <cstdlib>' src/libplatform/default-thread-isolated-allocator.cc
sed -i '/bool KernelHasPkruFix()/a const char* env = std::getenv("JAVET_DISABLE_PKU"); if (env && std::strlen(env) > 0) { return false; }' src/libplatform/default-thread-isolated-allocator.cc
ninja -C out.gn/x64.release v8_monolith || python3 ${{ env.ROOT }}/Javet/scripts/python/patch_v8_build.py -p ./
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos_arm64_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
workflow_dispatch:

env:
JAVET_NODE_VERSION: 22.11.0
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1
ROOT: /Users/runner/work/Javet

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos_x86_64_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
workflow_dispatch:

env:
JAVET_NODE_VERSION: 22.11.0
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1
ROOT: /Users/runner/work/Javet

jobs:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/windows_x86_64_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
workflow_dispatch:

env:
JAVET_NODE_VERSION: 22.11.0
JAVET_V8_VERSION: 13.1.201.8
JAVET_VERSION: 4.1.0
JAVET_NODE_VERSION: 22.12.0
JAVET_V8_VERSION: 13.2.152.16
JAVET_VERSION: 4.1.1
ROOT: D:\a\Javet

jobs:
Expand Down Expand Up @@ -93,6 +93,8 @@ jobs:
run: |
cd ../google/v8
sed -i '/static_assert(alignof(Type) <= alignof(decltype(/d' src/objects/tagged-field.h
sed -i 's/__attribute__((tls_model(V8_TLS_MODEL)))/ /g' src/execution/isolate.h
sed -i 's/__attribute__((tls_model(V8_TLS_MODEL)))/ /g' src/heap/local-heap.h
- name: Build Javet JNI
run: |
Expand Down
69 changes: 35 additions & 34 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ arm ✔️ ❌ ❌ ❌
arm64 ✔️ ✔️ ✔️ ❌
=========== ======= ======= ======= =======

* Node.js ``v22.11.0`` + V8 ``v13.1.201.8``
* Node.js ``v22.12.0`` + V8 ``v13.2.152.16``
* i18n and non-i18n
* Dynamic switch between Node.js and V8 mode
* Polyfill V8 mode with `Javenode <https://github.com/caoccao/Javenode>`_
Expand Down Expand Up @@ -80,112 +80,112 @@ Maven
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- Node.js Linux (x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-node-linux-x86_64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- Node.js Linux (arm64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-node-linux-arm64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- Node.js Mac OS (x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-node-macos-x86_64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- Node.js Mac OS (arm64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-node-macos-arm64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- Node.js Windows (x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-node-windows-x86_64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- V8 Linux (x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-v8-linux-x86_64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- V8 Linux (arm64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-v8-linux-arm64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- V8 Mac OS (x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-v8-macos-x86_64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- V8 Mac OS (arm64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-v8-macos-arm64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
<!-- V8 Windows (x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-v8-windows-x86_64</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
Gradle Kotlin DSL
^^^^^^^^^^^^^^^^^

.. code-block:: kotlin
implementation("com.caoccao.javet:javet:4.1.0") // Core (Must-have)
implementation("com.caoccao.javet:javet-node-linux-arm64:4.1.0")
implementation("com.caoccao.javet:javet-node-linux-x86_64:4.1.0")
implementation("com.caoccao.javet:javet-node-macos-arm64:4.1.0")
implementation("com.caoccao.javet:javet-node-macos-x86_64:4.1.0")
implementation("com.caoccao.javet:javet-node-windows-x86_64:4.1.0")
implementation("com.caoccao.javet:javet-v8-linux-arm64:4.1.0")
implementation("com.caoccao.javet:javet-v8-linux-x86_64:4.1.0")
implementation("com.caoccao.javet:javet-v8-macos-arm64:4.1.0")
implementation("com.caoccao.javet:javet-v8-macos-x86_64:4.1.0")
implementation("com.caoccao.javet:javet-v8-windows-x86_64:4.1.0")
implementation("com.caoccao.javet:javet:4.1.1") // Core (Must-have)
implementation("com.caoccao.javet:javet-node-linux-arm64:4.1.1")
implementation("com.caoccao.javet:javet-node-linux-x86_64:4.1.1")
implementation("com.caoccao.javet:javet-node-macos-arm64:4.1.1")
implementation("com.caoccao.javet:javet-node-macos-x86_64:4.1.1")
implementation("com.caoccao.javet:javet-node-windows-x86_64:4.1.1")
implementation("com.caoccao.javet:javet-v8-linux-arm64:4.1.1")
implementation("com.caoccao.javet:javet-v8-linux-x86_64:4.1.1")
implementation("com.caoccao.javet:javet-v8-macos-arm64:4.1.1")
implementation("com.caoccao.javet:javet-v8-macos-x86_64:4.1.1")
implementation("com.caoccao.javet:javet-v8-windows-x86_64:4.1.1")
Gradle Groovy DSL
^^^^^^^^^^^^^^^^^

.. code-block:: groovy
implementation 'com.caoccao.javet:javet:4.1.0' // Core (Must-have)
implementation 'com.caoccao.javet:javet-node-linux-arm64:4.1.0'
implementation 'com.caoccao.javet:javet-node-linux-x86_64:4.1.0'
implementation 'com.caoccao.javet:javet-node-macos-arm64:4.1.0'
implementation 'com.caoccao.javet:javet-node-macos-x86_64:4.1.0'
implementation 'com.caoccao.javet:javet-node-windows-x86_64:4.1.0'
implementation 'com.caoccao.javet:javet-v8-linux-arm64:4.1.0'
implementation 'com.caoccao.javet:javet-v8-linux-x86_64:4.1.0'
implementation 'com.caoccao.javet:javet-v8-macos-arm64:4.1.0'
implementation 'com.caoccao.javet:javet-v8-macos-x86_64:4.1.0'
implementation 'com.caoccao.javet:javet-v8-windows-x86_64:4.1.0'
implementation 'com.caoccao.javet:javet:4.1.1' // Core (Must-have)
implementation 'com.caoccao.javet:javet-node-linux-arm64:4.1.1'
implementation 'com.caoccao.javet:javet-node-linux-x86_64:4.1.1'
implementation 'com.caoccao.javet:javet-node-macos-arm64:4.1.1'
implementation 'com.caoccao.javet:javet-node-macos-x86_64:4.1.1'
implementation 'com.caoccao.javet:javet-node-windows-x86_64:4.1.1'
implementation 'com.caoccao.javet:javet-v8-linux-arm64:4.1.1'
implementation 'com.caoccao.javet:javet-v8-linux-x86_64:4.1.1'
implementation 'com.caoccao.javet:javet-v8-macos-arm64:4.1.1'
implementation 'com.caoccao.javet:javet-v8-macos-x86_64:4.1.1'
implementation 'com.caoccao.javet:javet-v8-windows-x86_64:4.1.1'
For more detail, please visit the `installation <https://www.caoccao.com/Javet/tutorial/basic/installation.html>`_ page.

Expand Down Expand Up @@ -222,6 +222,7 @@ Blog
* `How to Compromise V8 on JVM <https://blog.caoccao.com/how-to-compromise-v8-on-jvm-ceb385572461>`_
* `Is TypeScript a Good Choice for a Script Engine? <https://blog.caoccao.com/is-typescript-a-good-choice-for-a-script-engine-01fe69921ace>`_
* `Run TypeScript Directly in Java <https://blog.caoccao.com/run-typescript-directly-in-java-82b7003b44b8>`_
* `SSR — React + Spring Boot with Javet <https://blog.caoccao.com/ssr-react-spring-boot-with-javet-536282ff0edb>`_

Documents
=========
Expand Down
2 changes: 1 addition & 1 deletion android/javet-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "4.1.0"
const val JAVET = "4.1.1"
const val JUNIT = "5.10.1"
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/javet-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="4.1.0"
android:versionName="4.1.1"
>

</manifest>
4 changes: 2 additions & 2 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>com.caoccao.javet</groupId>
<artifactId>javet-android</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
<name>javet</name>
<packaging>aar</packaging>
<description>Javet is Java + V8 (JAVa + V + EighT). It is an awesome way of embedding V8 in Java.</description>
Expand All @@ -29,7 +29,7 @@
<connection>scm:git:git://github.com/caoccao/Javet.git</connection>
<developerConnection>scm:git:git@github.com:caoccao/caoccao.git</developerConnection>
<url>https://github.com/caoccao/Javet</url>
<tag>4.1.0</tag>
<tag>4.1.1</tag>
</scm>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ object Config {
const val BYTE_BUDDY = "1.15.5"
const val JACKSON_DATABIND = "2.16.0"
const val JAVA_VERSION = "1.8"
const val JAVET = "4.1.0"
const val JAVET = "4.1.1"
const val JAVET_BUDDY = "0.4.0"
const val JETTY_WEBSOCKET = "9.4.53.v20231009"
const val JUNIT = "5.11.3"
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=4.1.0
JAVET_VERSION=4.1.1
rm -rf build_android
mkdir build_android
cd build_android
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-linux-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=4.1.0
JAVET_VERSION=4.1.1
rm -rf build_linux_arm64
mkdir build_linux_arm64
cd build_linux_arm64
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-linux-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=4.1.0
JAVET_VERSION=4.1.1
rm -rf build_linux_x86_64
mkdir build_linux_x86_64
cd build_linux_x86_64
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=4.1.0
JAVET_VERSION=4.1.1
rm -rf build_macos
mkdir build_macos
cd build_macos
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-windows.cmd
Original file line number Diff line number Diff line change
@@ -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=4.1.0
SET JAVET_VERSION=4.1.1
rd /s/q build_windows
mkdir build_windows
cd build_windows
Expand Down
Loading

0 comments on commit 6b97eb4

Please sign in to comment.