Skip to content

Commit 02de5e2

Browse files
committed
Merge branch 'release/0.19.0'
2 parents 1f08e25 + 3b6c06e commit 02de5e2

File tree

90 files changed

+248
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+248
-185
lines changed

.github/workflows/graalvm-dev.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: GraalVM CI (dev)
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
pull_request:
7+
branches:
8+
- develop
9+
jobs:
10+
build:
11+
name: ${{ matrix.version }} on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
version: [dev]
16+
os: [macos-latest, windows-latest, ubuntu-latest]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
- name: Cache JVM
21+
id: cache-java
22+
uses: actions/cache@v2
23+
with:
24+
path: |
25+
${{ runner.temp }}/java_package.tar.gz
26+
~/.m2/repository
27+
key: ${{ runner.os }}-java-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-java-
30+
- name: Setup GraalVM
31+
uses: graalvm/setup-graalvm@v1
32+
with:
33+
version: ${{ matrix.version }}
34+
java-version: '11'
35+
components: 'js'
36+
- name: Run tests (UNIX)
37+
run: ./mvnw clean verify
38+
if: runner.os != 'Windows'
39+
- name: Run tests (Windows)
40+
run: .\mvnw.cmd clean verify
41+
if: runner.os == 'Windows'

.github/workflows/graalvm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
version: ['22.1.0', dev]
15+
version: ['22.1.0']
1616
os: [macos-latest, windows-latest, ubuntu-latest]
1717
steps:
1818
- name: Checkout

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [0.18.0] -
8+
## [0.19.0] -
9+
* Bumped vertx to 4.3.2
10+
* Fixed bug where spaces were not allowed on CWD
11+
* Update CI as latest graal will not include `js` by default
12+
* Update docs for latest graal
13+
14+
## [0.18.0] - 2022-04-28
915
* Added new module `@vertx/uri-template`
1016
* Force commonjs loader to be synchronized
1117
* Bumped graal to 22.1.0

codegen/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<parent>
55
<groupId>io.reactiverse</groupId>
66
<artifactId>es4x-parent</artifactId>
7-
<version>0.18.0</version>
7+
<version>0.19.0</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>
1212

1313
<artifactId>es4x-codegen</artifactId>
14-
<version>0.18.0</version>
14+
<version>0.19.0</version>
1515

1616
<dependencies>
1717
<dependency>

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ npm start # OR yarn start
3535
```
3636

3737
::: tip COMPATIBILITY NOTE
38-
ES4X requires [GraalVM](https://www.graalvm.org) or Java >= 11. If you're not sure which version is installed on your
39-
system, consider using [jabba](https://github.com/shyiko/jabba).
38+
ES4X requires [GraalVM](https://www.graalvm.org) or Java >= 11. GraalVM 22.2 and up will require the installation of the
39+
JavaScript module with `gu install js`.
4040
:::

docs/advanced/vertx.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,15 @@ Can be used as a `Thenable`:
8585

8686
```js
8787
try {
88-
let server = await vertx
89-
.createHttpServer()
90-
.listen(0);
91-
92-
console.log('Server Ready!');
88+
(async function futureTest1 () {
89+
let server = await vertx
90+
.createHttpServer()
91+
.requestHandler(req => {
92+
})
93+
.listen(0);
94+
95+
console.log('Server Ready!');
96+
})();
9397
} catch (err) {
9498
console.log('Server startup failed!')
9599
}

es4x/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<parent>
55
<groupId>io.reactiverse</groupId>
66
<artifactId>es4x-parent</artifactId>
7-
<version>0.18.0</version>
7+
<version>0.19.0</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>
1212

1313
<artifactId>es4x</artifactId>
14-
<version>0.18.0</version>
14+
<version>0.19.0</version>
1515

1616
<properties>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

es4x/src/main/java/io/reactiverse/es4x/impl/ImportMapper.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ public class ImportMapper {
2222
private static final Logger LOGGER = LoggerFactory.getLogger(ImportMapper.class);
2323

2424
public ImportMapper(JsonObject config) throws MalformedURLException {
25-
this(config, new File(VertxFileSystem.getCWD()).toURI());
26-
}
27-
28-
public ImportMapper(JsonObject config, URI baseURI) throws MalformedURLException {
29-
this(config, baseURI.toURL());
25+
this(
26+
config,
27+
new URL("file", "", Utils.slashify(VertxFileSystem.getCWD(), true)));
3028
}
3129

3230
public ImportMapper(JsonObject config, URL baseURL) {

es4x/src/main/java/io/reactiverse/es4x/impl/Utils.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package io.reactiverse.es4x.impl;
22

33
import java.io.*;
4-
import java.net.HttpURLConnection;
5-
import java.net.URI;
6-
import java.net.URISyntaxException;
7-
import java.net.URL;
4+
import java.net.*;
85
import java.nio.charset.StandardCharsets;
6+
import java.nio.file.Files;
97
import java.security.MessageDigest;
108
import java.security.NoSuchAlgorithmException;
119
import java.util.Enumeration;
@@ -61,7 +59,7 @@ public static void downloadTo(URL url, File target) throws IOException {
6159
throw new RuntimeException("Failed to mkdirs: " + parent);
6260
}
6361
}
64-
try (BufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(target))) {
62+
try (BufferedOutputStream writer = new BufferedOutputStream(Files.newOutputStream(target.toPath()))) {
6563
byte[] buffer = new byte[4096];
6664
int bytesRead;
6765
while ((bytesRead = reader.read(buffer)) != -1) {
@@ -93,10 +91,10 @@ public static String getManifestAttribute(String attribute) throws IOException {
9391
return null;
9492
}
9593

96-
public static URI fileToURI(File file) {
94+
public static URL fileToURL(File file) {
9795
try {
98-
return new URI("file://" + slashify(file.getPath(), file.isDirectory()));
99-
} catch (URISyntaxException e) {
96+
return new URL("file://" + slashify(file.getPath(), file.isDirectory()));
97+
} catch (MalformedURLException e) {
10098
throw new IllegalArgumentException("Cannot convert to URI: " + file, e);
10199
}
102100
}

es4x/src/main/java/io/reactiverse/es4x/impl/VertxFileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public VertxFileSystem(final Vertx vertx, String importMap, String... extensions
8080
// resolve the well known roots
8181
try {
8282
cwd = getCWD();
83-
URI cwdUrl = fileToURI(new File(this.cwd).getCanonicalFile());
83+
URL cwdUrl = fileToURL(new File(this.cwd).getCanonicalFile());
8484

8585
if (importMap == null) {
8686
mapper = new ImportMapper(

0 commit comments

Comments
 (0)