Skip to content

Commit cc021d6

Browse files
authored
chore(release): 1.111.0 (#4809)
See [CHANGELOG](https://github.com/aws/jsii/blob/bump/1.111.0/CHANGELOG.md)
2 parents 336b265 + f6ff583 commit cc021d6

File tree

7 files changed

+54
-6
lines changed

7 files changed

+54
-6
lines changed

.mergify/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,8 @@ pull_request_rules:
133133
[Conventional Commits]: https://www.conventionalcommits.org
134134
conditions:
135135
- status-failure=Validate PR Title
136+
priority_rules:
137+
- name: priority for queue `default-squash`
138+
conditions:
139+
- queue-name=default-squash
140+
priority: 2250

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.111.0](https://github.com/aws/jsii/compare/v1.110.0...v1.111.0) (2025-04-02)
6+
7+
8+
### Bug Fixes
9+
10+
* **java-runtime:** `ErrorStreamSink` crashes with `NullPointerException` ([#4803](https://github.com/aws/jsii/issues/4803)) ([b20be37](https://github.com/aws/jsii/commit/b20be373f55a972155242b7b3893b9e7b49b5006))
11+
* **pacmak:** Find the tarball location on windows even if prepack is run ([#4795](https://github.com/aws/jsii/issues/4795)) ([15f748d](https://github.com/aws/jsii/commit/15f748d9c0f8ccbae418f9e22378b7d4d4c5ed85))
12+
513
## [1.110.0](https://github.com/aws/jsii/compare/v1.109.0...v1.110.0) (2025-03-19)
614

715

gh-pages/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mkdocs~=1.6.1
22
mkdocs-awesome-pages-plugin~=2.10.1
3-
mkdocs-material~=9.6.9
3+
mkdocs-material~=9.6.10
44
mkdocs-git-revision-date-plugin~=0.3.2

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"rejectCycles": true
1313
}
1414
},
15-
"version": "1.110.0",
15+
"version": "1.111.0",
1616
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
1717
}

packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiRuntime.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,10 @@ private void acceptData(final boolean uninterruptible) throws IOException {
516516
this.buffer.write(read);
517517
}
518518
if (read == '\n' || this.eof) {
519-
processLine(new String(buffer.toByteArray(), StandardCharsets.UTF_8));
519+
// don't print an empty line if we're at the end of the file and the buffer is empty.
520+
if (!this.eof || buffer.size() > 0) {
521+
processLine(new String(buffer.toByteArray(), StandardCharsets.UTF_8));
522+
}
520523
buffer.reset();
521524
}
522525
}
@@ -526,6 +529,13 @@ private void processLine(final String line) {
526529
try {
527530
final JsonNode tree = objectMapper.readTree(line);
528531
final ConsoleOutput consoleOutput = objectMapper.treeToValue(tree, ConsoleOutput.class);
532+
if (consoleOutput == null) {
533+
// null means the line was empty, but the above objectMapper calls will return null
534+
// We would throw JsonProcessingException to avoid duplication, but the constructors
535+
// are protected, and the subclasses need too much information
536+
System.err.println(line);
537+
return;
538+
}
529539
if (consoleOutput.stderr != null) {
530540
System.err.write(consoleOutput.stderr, 0, consoleOutput.stderr.length);
531541
}

packages/@jsii/java-runtime/project/src/test/java/software/amazon/jsii/JsiiRuntimeTest.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@
99
import java.util.Collections;
1010

1111
public final class JsiiRuntimeTest {
12+
13+
@Test
14+
public void errorSteamSinkDoesntCrash() {
15+
16+
ByteArrayOutputStream err = new ByteArrayOutputStream();
17+
PrintStream originalErr = System.err;
18+
19+
// to capture writes to System.err, which happen when the error stream
20+
// sink crashes. kind of a silly...but simple, and works.
21+
System.setErr(new PrintStream(err));
22+
23+
try {
24+
final JsiiRuntime runtime = new JsiiRuntime(null, null);
25+
runtime.getClient().createObject("Object", Collections.emptyList(), Collections.emptyList(),
26+
Collections.emptyList());
27+
runtime.terminate();
28+
Assertions.assertFalse(err.toString().contains(
29+
"Unexpected error in background thread \"software.amazon.jsii.JsiiRuntime.ErrorStreamSink\""));
30+
} finally {
31+
System.setErr(originalErr);
32+
}
33+
}
34+
1235
@Test
1336
public void withNoCustomization() {
1437
final JsiiRuntime runtime = new JsiiRuntime(null, null);

packages/jsii-pacmak/lib/packaging.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as fs from 'fs-extra';
22
import type { Assembly, TypeSystem } from 'jsii-reflect';
3-
import * as os from 'os';
43
import * as path from 'path';
54

65
import { Scratch, shell } from './util';
@@ -79,14 +78,17 @@ export class JsiiModule {
7978
// Take only the last line of npm pack which should contain the
8079
// tarball name. otherwise, there can be a lot of extra noise there
8180
// from scripts that emit to STDOUT.
82-
const lines = out.trim().split(os.EOL);
81+
// Since we are interested in the text *after* the last newline, splitting on '\n' is correct
82+
// both on Linux/Mac (EOL = '\n') and Windows (EOL = '\r\n'), and also for UNIX tools running
83+
// on Windows (expected EOL = '\r\n', actual EOL = '\n').
84+
const lines = out.trim().split('\n');
8385
const lastLine = lines[lines.length - 1].trim();
8486

8587
if (!lastLine.endsWith('.tgz') && !lastLine.endsWith('.tar.gz')) {
8688
throw new Error(
8789
`${packCommand} did not produce tarball from ${
8890
this.moduleDirectory
89-
} into ${tmpdir} (output was ${JSON.stringify(lines)})`,
91+
} into ${tmpdir} (output was ${JSON.stringify(lines.map((l) => l.trimEnd()))})`,
9092
);
9193
}
9294

0 commit comments

Comments
 (0)