Skip to content

Commit

Permalink
Merge branch 'release/0.19.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmlopes committed Jul 13, 2022
2 parents 1f08e25 + 3b6c06e commit 02de5e2
Show file tree
Hide file tree
Showing 90 changed files with 248 additions and 185 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/graalvm-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: GraalVM CI (dev)
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build:
name: ${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: [dev]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache JVM
id: cache-java
uses: actions/cache@v2
with:
path: |
${{ runner.temp }}/java_package.tar.gz
~/.m2/repository
key: ${{ runner.os }}-java-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-java-
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: ${{ matrix.version }}
java-version: '11'
components: 'js'
- name: Run tests (UNIX)
run: ./mvnw clean verify
if: runner.os != 'Windows'
- name: Run tests (Windows)
run: .\mvnw.cmd clean verify
if: runner.os == 'Windows'
2 changes: 1 addition & 1 deletion .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: ['22.1.0', dev]
version: ['22.1.0']
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.18.0] -
## [0.19.0] -
* Bumped vertx to 4.3.2
* Fixed bug where spaces were not allowed on CWD
* Update CI as latest graal will not include `js` by default
* Update docs for latest graal

## [0.18.0] - 2022-04-28
* Added new module `@vertx/uri-template`
* Force commonjs loader to be synchronized
* Bumped graal to 22.1.0
Expand Down
4 changes: 2 additions & 2 deletions codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>io.reactiverse</groupId>
<artifactId>es4x-parent</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>es4x-codegen</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ npm start # OR yarn start
```

::: tip COMPATIBILITY NOTE
ES4X requires [GraalVM](https://www.graalvm.org) or Java >= 11. If you're not sure which version is installed on your
system, consider using [jabba](https://github.com/shyiko/jabba).
ES4X requires [GraalVM](https://www.graalvm.org) or Java >= 11. GraalVM 22.2 and up will require the installation of the
JavaScript module with `gu install js`.
:::
14 changes: 9 additions & 5 deletions docs/advanced/vertx.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ Can be used as a `Thenable`:

```js
try {
let server = await vertx
.createHttpServer()
.listen(0);

console.log('Server Ready!');
(async function futureTest1 () {
let server = await vertx
.createHttpServer()
.requestHandler(req => {
})
.listen(0);

console.log('Server Ready!');
})();
} catch (err) {
console.log('Server startup failed!')
}
Expand Down
4 changes: 2 additions & 2 deletions es4x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>io.reactiverse</groupId>
<artifactId>es4x-parent</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>es4x</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
8 changes: 3 additions & 5 deletions es4x/src/main/java/io/reactiverse/es4x/impl/ImportMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ public class ImportMapper {
private static final Logger LOGGER = LoggerFactory.getLogger(ImportMapper.class);

public ImportMapper(JsonObject config) throws MalformedURLException {
this(config, new File(VertxFileSystem.getCWD()).toURI());
}

public ImportMapper(JsonObject config, URI baseURI) throws MalformedURLException {
this(config, baseURI.toURL());
this(
config,
new URL("file", "", Utils.slashify(VertxFileSystem.getCWD(), true)));
}

public ImportMapper(JsonObject config, URL baseURL) {
Expand Down
14 changes: 6 additions & 8 deletions es4x/src/main/java/io/reactiverse/es4x/impl/Utils.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package io.reactiverse.es4x.impl;

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Enumeration;
Expand Down Expand Up @@ -61,7 +59,7 @@ public static void downloadTo(URL url, File target) throws IOException {
throw new RuntimeException("Failed to mkdirs: " + parent);
}
}
try (BufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(target))) {
try (BufferedOutputStream writer = new BufferedOutputStream(Files.newOutputStream(target.toPath()))) {
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = reader.read(buffer)) != -1) {
Expand Down Expand Up @@ -93,10 +91,10 @@ public static String getManifestAttribute(String attribute) throws IOException {
return null;
}

public static URI fileToURI(File file) {
public static URL fileToURL(File file) {
try {
return new URI("file://" + slashify(file.getPath(), file.isDirectory()));
} catch (URISyntaxException e) {
return new URL("file://" + slashify(file.getPath(), file.isDirectory()));
} catch (MalformedURLException e) {
throw new IllegalArgumentException("Cannot convert to URI: " + file, e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public VertxFileSystem(final Vertx vertx, String importMap, String... extensions
// resolve the well known roots
try {
cwd = getCWD();
URI cwdUrl = fileToURI(new File(this.cwd).getCanonicalFile());
URL cwdUrl = fileToURL(new File(this.cwd).getCanonicalFile());

if (importMap == null) {
mapper = new ImportMapper(
Expand Down
16 changes: 16 additions & 0 deletions es4x/src/test/java/io/reactiverse/es4x/UtilsTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.reactiverse.es4x;

import io.reactiverse.es4x.impl.Utils;
import org.junit.Test;

import java.io.File;
import java.net.URL;

public class UtilsTest {

@Test
public void testFileToURI() {
URL url = Utils.fileToURL(new File("C:/Program Files/REST Service/bin/"));
System.out.println(url);
}
}
4 changes: 2 additions & 2 deletions generator/io.reactiverse/elasticsearch-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>elasticsearch-client</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>reactiverse-contextual-logging</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<packaging>jar</packaging>

Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<parent>
<groupId>io.reactiverse</groupId>
<artifactId>es4x-parent</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>es4x-vertx-stack</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-amqp-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-amqp-client</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-common</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-htdigest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-htdigest</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-htpasswd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-htpasswd</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-jdbc</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-jwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-jwt</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-ldap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-ldap</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
4 changes: 2 additions & 2 deletions generator/io.vertx/vertx-auth-mongo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>vertx-auth-mongo</artifactId>
<version>0.18.0</version>
<version>0.19.0</version>

<properties>
<maven.groupId>io.vertx</maven.groupId>
Expand Down
Loading

0 comments on commit 02de5e2

Please sign in to comment.