Skip to content

Commit 41e06f1

Browse files
committed
Update versions and chagelog
Signed-off-by: Paulo Lopes <[email protected]>
2 parents 62680dc + 0a7007e commit 41e06f1

File tree

10 files changed

+80
-23
lines changed

10 files changed

+80
-23
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [0.19.0] -
99
* Bumped vertx to 4.3.2
10-
* Allow spaces in CWD
10+
* Fixed bug where spaces were not allowed on CWD
1111
* Update CI as latest graal will not include `js` by default
1212
* Update docs for latest graal
1313

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/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(
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package io.reactiverse.es4x;
2+
3+
import io.reactiverse.es4x.impl.Utils;
4+
import org.junit.Test;
5+
6+
import java.io.File;
7+
import java.net.URL;
8+
9+
public class UtilsTest {
10+
11+
@Test
12+
public void testFileToURI() {
13+
URL url = Utils.fileToURL(new File("C:/Program Files/REST Service/bin/"));
14+
System.out.println(url);
15+
}
16+
}

generator/io.vertx/vertx-micrometer-metrics/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<npm-name>@vertx/micrometer-metrics</npm-name>
2121
<npm-version>${stack.version}</npm-version>
2222
<npm-skip>false</npm-skip>
23-
<micrometer.version>1.6.6</micrometer.version>
23+
<micrometer.version>1.8.1</micrometer.version>
2424
<!-- language=json -->
2525
<npm-dev-dependencies>
2626
{

pm/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ else
2020
echo "login as es4x"
2121
npm adduser --registry "$REGISTRY"
2222
fi
23-
TAG=${2:-release}
23+
TAG=${2:-latest}
2424

2525
# publish
2626
npm publish --registry $REGISTRY --tag=${TAG}

0 commit comments

Comments
 (0)