Skip to content

Commit

Permalink
Javet v0.9.2 (#49)
Browse files Browse the repository at this point in the history
* Upgraded Node.js to `v14.17.1` [(2021-06-15)](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.17.1)
* Updated `JavetObjectConverter` to handle anonymous functions more efficiently
* Added `V8ValueBuiltInObject#assign`
  • Loading branch information
caoccao authored Jun 24, 2021
1 parent 9b54b12 commit 57210c8
Show file tree
Hide file tree
Showing 57 changed files with 3,666 additions and 3,361 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Major Features
==============

* 🐧Linux + 🖥️Windows
* Node.js ``v14.17.0`` + V8 ``v9.1.269.28``
* Node.js ``v14.17.1`` + V8 ``v9.1.269.28``
* Dynamic switch between Node.js and V8
* Exposure of the majority of V8 API in JVM
* JS function interception
Expand All @@ -40,22 +40,22 @@ Maven
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet</artifactId>
<version>0.9.1</version>
<version>0.9.2</version>
</dependency>
Gradle Kotlin DSL
^^^^^^^^^^^^^^^^^

.. code-block:: kotlin
implementation("com.caoccao.javet:javet:0.9.1")
implementation("com.caoccao.javet:javet:0.9.2")
Gradle Groovy DSL
^^^^^^^^^^^^^^^^^

.. code-block:: groovy
implementation 'com.caoccao.javet:javet:0.9.1'
implementation 'com.caoccao.javet:javet:0.9.2'
Hello Javet
-----------
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
}

group = "com.caoccao.javet"
version = "0.9.1"
version = "0.9.2"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion cpp/build.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=0.9.1
SET JAVET_VERSION=0.9.2
rd /s/q build
mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion cpp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Usage for V8: build -DV8_DIR=~/v8
# Usage for Node: build -DNODE_DIR=~/node
JAVET_VERSION=0.9.1
JAVET_VERSION=0.9.2
rm -rf build
mkdir build
cd build
Expand Down
12 changes: 6 additions & 6 deletions cpp/jni/javet_resource_node.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,1,0
PRODUCTVERSION 0,9,1,0
FILEVERSION 0,9,2,0
PRODUCTVERSION 0,9,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "caoccao.com"
VALUE "FileDescription", "caoccao.com"
VALUE "FileVersion", "0.9.1.0"
VALUE "InternalName", "libjavet-node-windows-x86_64.v.0.9.1.dll"
VALUE "FileVersion", "0.9.2.0"
VALUE "InternalName", "libjavet-node-windows-x86_64.v.0.9.2.dll"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "libjavet-node-windows-x86_64.v.0.9.1.dll"
VALUE "OriginalFilename", "libjavet-node-windows-x86_64.v.0.9.2.dll"
VALUE "ProductName", "Javet Windows"
VALUE "ProductVersion", "0.9.1.0"
VALUE "ProductVersion", "0.9.2.0"
END
END
BLOCK "VarFileInfo"
Expand Down
12 changes: 6 additions & 6 deletions cpp/jni/javet_resource_v8.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,1,0
PRODUCTVERSION 0,9,1,0
FILEVERSION 0,9,2,0
PRODUCTVERSION 0,9,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "caoccao.com"
VALUE "FileDescription", "caoccao.com"
VALUE "FileVersion", "0.9.1.0"
VALUE "InternalName", "libjavet-v8-windows-x86_64.v.0.9.1.dll"
VALUE "FileVersion", "0.9.2.0"
VALUE "InternalName", "libjavet-v8-windows-x86_64.v.0.9.2.dll"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "libjavet-v8-windows-x86_64.v.0.9.1.dll"
VALUE "OriginalFilename", "libjavet-v8-windows-x86_64.v.0.9.2.dll"
VALUE "ProductName", "Javet Windows"
VALUE "ProductVersion", "0.9.1.0"
VALUE "ProductVersion", "0.9.2.0"
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion docs/development/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Windows Environment
Download Pre-built Node.js and V8
=================================

I have prepared pre-built Linux and Windows version of Node.js ``v14.17.0`` and V8 ``v9.1.269.28``. Please download the zipped headers and binaries from this `drive <https://drive.google.com/drive/folders/18wcF8c-zjZg9iZeGfNSL8-bxqJwDZVEL?usp=sharing>`_ and unzip them to local folders respectively.
I have prepared pre-built Linux and Windows version of Node.js ``v14.17.1`` and V8 ``v9.1.269.28``. Please download the zipped headers and binaries from this `drive <https://drive.google.com/drive/folders/18wcF8c-zjZg9iZeGfNSL8-bxqJwDZVEL?usp=sharing>`_ and unzip them to local folders respectively.

Build Javet JNI Library
=======================
Expand Down
2 changes: 1 addition & 1 deletion docs/development/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For now, Gradle v6.7 + Kotlin DSL constructs the build system.
Node.js
=================

Node.js 14.17.0+ is supported.
Node.js 14.17.1+ is supported.

Maven (Optional)
================
Expand Down
7 changes: 7 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Release Notes
=============

0.9.2
-----

* Upgraded Node.js to ``v14.17.1`` `(2021-06-15) <https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.17.1>`_
* Updated ``JavetObjectConverter`` to handle anonymous functions more efficiently
* Added ``V8ValueBuiltInObject#assign``

0.9.1
-----

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ Maven
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet</artifactId>
<version>0.9.1</version>
<version>0.9.2</version>
</dependency>
Gradle Kotlin DSL
-----------------

.. code-block:: kotlin
implementation("com.caoccao.javet:javet:0.9.1")
implementation("com.caoccao.javet:javet:0.9.2")
Gradle Groovy DSL
-----------------

.. code-block:: groovy
implementation 'com.caoccao.javet:javet:0.9.1'
implementation 'com.caoccao.javet:javet:0.9.2'
OS Compatibility
================
Expand Down
4 changes: 2 additions & 2 deletions 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</artifactId>
<version>0.9.1</version>
<version>0.9.2</version>
<name>javet</name>
<description>Javet is Java + V8 (JAVa + V + EighT). It is a way of embedding V8 in Java.</description>
<url>https://github.com/caoccao/Javet</url>
Expand All @@ -28,7 +28,7 @@
<connection>scm:git:git://github.com/caoccao/Javet.git</connection>
<developerConnection>scm:git:[email protected]:caoccao/caoccao.git</developerConnection>
<url>https://github.com/caoccao/Javet</url>
<tag>javet-0.9.1</tag>
<tag>javet-0.9.2</tag>
</scm>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion scripts/node/javet-rebuild/rebuild.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
SET NODE_LIB_FILE="..\..\..\..\..\..\build\libs\libjavet-node-windows-x86_64.v.0.9.1.lib"
SET NODE_LIB_FILE="..\..\..\..\..\..\build\libs\libjavet-node-windows-x86_64.v.0.9.2.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%
Expand Down
2 changes: 1 addition & 1 deletion scripts/node/javet-rebuild/rebuild.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
patchelf --add-needed libjavet-node-linux-x86_64.v.0.9.1.so ${NODE_MODULE_FILE}
patchelf --add-needed libjavet-node-linux-x86_64.v.0.9.2.so ${NODE_MODULE_FILE}
2 changes: 1 addition & 1 deletion scripts/python/change_javet_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _update(self, relative_file_path: str, line_separator: str, *patterns: list)
logging.info(' Updated.')

def main():
change_javet_version = ChangeJavetVersion('0.9.1')
change_javet_version = ChangeJavetVersion('0.9.2')
change_javet_version.update()
return 0

Expand Down
30 changes: 15 additions & 15 deletions src/main/java/com/caoccao/javet/annotations/CheckReturnValue.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.caoccao.javet.annotations;

import java.lang.annotation.*;

/**
* This annotation is for IDE to warn application developers to consume the return value.
* Memory leak may occur if the return value is not consumed.
*
* @since 0.8.10
*/
@Documented
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, ElementType.PACKAGE})
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckReturnValue {
}
package com.caoccao.javet.annotations;

import java.lang.annotation.*;

/**
* This annotation is for IDE to warn application developers to consume the return value.
* Memory leak may occur if the return value is not consumed.
*
* @since 0.8.10
*/
@Documented
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, ElementType.PACKAGE})
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckReturnValue {
}
62 changes: 31 additions & 31 deletions src/main/java/com/caoccao/javet/annotations/V8RuntimeSetter.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
/*
* Copyright 2021. caoccao.com Sam Cao
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.caoccao.javet.annotations;

import java.lang.annotation.*;

/**
* The interface V8 runtime setter.
*
* @since 0.8.1
*/
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface V8RuntimeSetter {
}
/*
* Copyright 2021. caoccao.com Sam Cao
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.caoccao.javet.annotations;

import java.lang.annotation.*;

/**
* The interface V8 runtime setter.
*
* @since 0.8.1
*/
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface V8RuntimeSetter {
}
Loading

0 comments on commit 57210c8

Please sign in to comment.