Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ jobs:
rosetta:
- latest
- 5.9.x
- 6.0.x
steps:
# Check out the code
- name: Download Artifact
Expand Down
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
nodeLinker: node-modules

npmMinimalAgeGate: 3d

npmPreapprovedPackages:
- "jsii-rosetta@^6.0.0"
- "jsii@^6.0.0"
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@
"@jest/types": "^29.6.3",
"@types/jest": "^30.0.0",
"@types/node": "^18",
"@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2",
"@typescript-eslint/eslint-plugin": "^8.60.1",
"@typescript-eslint/parser": "^8.60.1",
"@yarnpkg/types": "^4.0.1",
"all-contributors-cli": "^6.26.1",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-node": "^0.4.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-prettier": "^5.5.6",
"jest": "^30.4.2",
"jest-circus": "^30.4.2",
"jest-config": "^30.4.2",
"jest-expect-message": "^1.1.3",
"lerna": "^9.0.7",
"npm-check-updates": "^22.2.1",
"npm-check-updates": "^22.2.3",
"prettier": "^3.8.3",
"standard-version": "^9.5.0",
"ts-node": "^10.9.2",
"typescript": "5.9.x"
"typescript": "6.x"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/check-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
},
"dependencies": {
"chalk": "^4.1.2",
"semver": "^7.8.1"
"semver": "^7.8.2"
},
"devDependencies": {
"eslint": "^9.39.4",
"jest": "^30.4.2",
"jsii-build-tools": "^0.0.0",
"typescript": "5.9.x"
"typescript": "6.x"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"@jsii/dotnet-runtime": "^0.0.0",
"jsii-calc": "^3.20.120",
"jsii-pacmak": "^0.0.0",
"typescript": "5.9.x"
"typescript": "6.x"
}
}
4 changes: 2 additions & 2 deletions packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@jsii/runtime": "^0.0.0",
"@types/semver": "^7.7.1",
"jsii-build-tools": "^0.0.0",
"semver": "^7.8.1",
"typescript": "5.9.x"
"semver": "^7.8.2",
"typescript": "6.x"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/go-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "Apache-2.0",
"devDependencies": {
"jsii-pacmak": "^0.0.0",
"typescript": "5.9.x"
"typescript": "6.x"
},
"dependencies": {
"@jsii/go-runtime": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/go-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"fs-extra": "^10.1.0",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"typescript": "5.9.x"
"typescript": "6.x"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/java-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@jsii/runtime": "^0.0.0",
"jsii-build-tools": "^0.0.0",
"typescript": "5.9.x"
"typescript": "6.x"
}
}
4 changes: 2 additions & 2 deletions packages/@jsii/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@jsii/spec": "0.0.0",
"fs-extra": "^10.1.0",
"lockfile": "^1.0.4",
"tar": "^7.5.15"
"tar": "^7.5.16"
},
"devDependencies": {
"@scope/jsii-calc-base": "^0.0.0",
Expand All @@ -46,6 +46,6 @@
"jest-expect-message": "^1.1.3",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"typescript": "5.9.x"
"typescript": "6.x"
}
}
6 changes: 3 additions & 3 deletions packages/@jsii/kernel/src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ export class Kernel {

switch (typeinfo.kind) {
case spec.TypeKind.Class:
const classType = typeinfo as spec.ClassType;
const classType = typeinfo;
this.#validateMethodArguments(classType.initializer, args);
return {
ctor: this.#findSymbol(fqn),
Expand Down Expand Up @@ -1248,11 +1248,11 @@ export class Kernel {
let bases;

if (spec.isClassType(typeInfo)) {
const classTypeInfo = typeInfo as spec.ClassType;
const classTypeInfo = typeInfo;
properties = classTypeInfo.properties;
bases = classTypeInfo.base ? [classTypeInfo.base] : [];
} else if (spec.isInterfaceType(typeInfo)) {
const interfaceTypeInfo = typeInfo as spec.InterfaceType;
const interfaceTypeInfo = typeInfo;
properties = interfaceTypeInfo.properties;
bases = interfaceTypeInfo.interfaces ?? [];
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/kernel/src/objects.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as spec from '@jsii/spec';
import * as assert from 'assert';
import assert from 'assert';
import { inspect } from 'util';

import * as api from './api';
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/kernel/src/on-exit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from 'fs-extra';
import * as process from 'process';
import process from 'process';

const removeSyncPaths = new Array<string>();

Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/kernel/src/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

import * as spec from '@jsii/spec';
import * as assert from 'assert';
import assert from 'assert';
import { inspect } from 'util';

import {
Expand Down Expand Up @@ -1288,12 +1288,12 @@ function describeTypeOf(
return 'an array';
}

const fqn = jsiiTypeFqn(value as object, isVisibleType);
const fqn = jsiiTypeFqn(value, isVisibleType);
if (fqn != null && fqn !== EMPTY_OBJECT_FQN) {
return `an instance of ${fqn}`;
}

const ctorName = (value as object).constructor.name;
const ctorName = value.constructor.name;
if (ctorName != null && ctorName !== Object.name) {
return `an instance of ${ctorName}`;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/@jsii/python-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"jsii-pacmak": "^0.0.0",
"pyright": "^1.1.410"
"pyright": "^1.1.410",
"ts-node": "^10.9.2"
}
}
29 changes: 20 additions & 9 deletions packages/@jsii/python-runtime/tests/test_invoke_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,29 @@ def test_invoke_script_with_line_flush(
current_dt = datetime.utcnow()

delay_s = round((current_dt - last_dt).total_seconds())
timed_lines.append([line, delay_s])
timed_lines.append((line, delay_s))

last_dt = current_dt
exit_code = proc.wait()

assert exit_code == 0
assert timed_lines == [
[b"Hello World!\n", 0],
[b" arguments: arg1, delay\n", 0],
[b"sleeping 1s 1\n", 0],
[b"sleeping 1s 2\n", 1],
[b"sleeping 1s 3\n", 1],
[b"sleeping 1s 4\n", 1],
[b"sleeping 1s 5\n", 1],
expected_lines = [
b"Hello World!\n",
b" arguments: arg1, delay\n",
b"sleeping 1s 1\n",
b"sleeping 1s 2\n",
b"sleeping 1s 3\n",
b"sleeping 1s 4\n",
b"sleeping 1s 5\n",
]

# Check we got the right lines
assert [item[0] for item in timed_lines] == expected_lines

# Check that we didn't receive all lines at once (which would happen if they were buffered)
# The first 3 lines are printed immediately, so their delays should be around 0.
# The subsequent lines should have delays > 0 since they sleep for 1s.
for line, delay in timed_lines[3:]:
assert (
int(delay) >= 1
), f"Expected line {line!r} to be delayed, but got delay of {delay}s"
2 changes: 1 addition & 1 deletion packages/@jsii/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"source-map-loader": "^5.0.0",
"typescript": "5.9.x",
"typescript": "6.x",
"webpack": "^5.107.2",
"webpack-cli": "^7.0.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint": "^9.39.4",
"jest": "^30.4.2",
"jsii-build-tools": "^0.0.0",
"typescript": "5.9.x",
"typescript": "6.x",
"typescript-json-schema": "^0.67.4"
}
}
6 changes: 3 additions & 3 deletions packages/@scope/jsii-calc-base-of-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"test:update": "yarn build && UPDATE_DIFF=1 yarn test"
},
"devDependencies": {
"jsii": "5.9.28",
"jsii": "6.0.1",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^5.9.32",
"typescript": "5.9.x"
"jsii-rosetta": "^6.0.0",
"typescript": "6.x"
},
"jsii": {
"outdir": "dist",
Expand Down
4 changes: 2 additions & 2 deletions packages/@scope/jsii-calc-base-of-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"description": "An example transitive dependency for jsii-calc.",
"homepage": "https://github.com/aws/jsii",
"jsiiVersion": "5.9.28",
"jsiiVersion": "6.0.1",
"license": "Apache-2.0",
"metadata": {
"jsii": {
Expand Down Expand Up @@ -169,5 +169,5 @@
}
},
"version": "2.1.1",
"fingerprint": "BjSsTpfAZrUOLnC8ASj2CZzF3hk7An9dtBfSV5UCVQQ="
"fingerprint": "n/Wnr2S8ZAsMAtxUqhEZ5jnX5qNcXyPhHAO1nWXclOM="
}
6 changes: 3 additions & 3 deletions packages/@scope/jsii-calc-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"@scope/jsii-calc-base-of-base": "^2.1.1"
},
"devDependencies": {
"jsii": "5.9.28",
"jsii": "6.0.1",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^5.9.32",
"typescript": "5.9.x"
"jsii-rosetta": "^6.0.0",
"typescript": "6.x"
},
"jsii": {
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@scope/jsii-calc-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"description": "An example direct dependency for jsii-calc.",
"homepage": "https://github.com/aws/jsii",
"jsiiVersion": "5.9.28",
"jsiiVersion": "6.0.1",
"license": "Apache-2.0",
"metadata": {
"jsii": {
Expand Down Expand Up @@ -210,5 +210,5 @@
}
},
"version": "0.0.0",
"fingerprint": "6KIUIA93Vgu+WbV0lkhiIW7AzQP8IaESaRI8HrnLF5E="
"fingerprint": "OQw7pozGKvEAFpZzGYsGWDf1TP3ZajLf75a3XbmCQzY="
}
6 changes: 3 additions & 3 deletions packages/@scope/jsii-calc-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"@scope/jsii-calc-base-of-base": "^2.1.1"
},
"devDependencies": {
"jsii": "5.9.28",
"jsii": "6.0.1",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^5.9.32",
"typescript": "5.9.x"
"jsii-rosetta": "^6.0.0",
"typescript": "6.x"
},
"jsii": {
"outdir": "dist",
Expand Down
4 changes: 2 additions & 2 deletions packages/@scope/jsii-calc-lib/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"stability": "deprecated"
},
"homepage": "https://github.com/aws/jsii",
"jsiiVersion": "5.9.28",
"jsiiVersion": "6.0.1",
"license": "Apache-2.0",
"metadata": {
"jsii": {
Expand Down Expand Up @@ -1164,5 +1164,5 @@
}
},
"version": "0.0.0",
"fingerprint": "ggZ93wBIOHmjgXQQQJM2Ue2y3Hvh9OeTZxbyOyJRR40="
"fingerprint": "XupMZaY5jv/mSCaBUFt0DZT8ppuKuHvY1rEAQodH2Ys="
}
2 changes: 1 addition & 1 deletion packages/codemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"@types/fs-extra": "^9.0.13",
"eslint": "^9.39.4",
"jest": "^30.4.2",
"typescript": "5.9.x"
"typescript": "6.x"
}
}
2 changes: 1 addition & 1 deletion packages/codemaker/src/case-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as camelcase from 'camelcase';
import camelcase from 'camelcase';
// eslint-disable-next-line @typescript-eslint/no-require-imports
import decamelize = require('decamelize');

Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-calc/lib/cdk16625/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'assert';
import assert from 'assert';

import { IRandomNumberGenerator } from '../calculator';
import { UnimportedSubmoduleType } from './donotimport';
Expand Down
3 changes: 2 additions & 1 deletion packages/jsii-calc/lib/compliance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ export class SyncOverrideExtraArgs {
public callProduceWithExtraArg(): string {
// Cast to bypass TypeScript's parameter-count check — we deliberately
// pass an argument that the declared signature does not accept.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
return (this.produce as (...args: unknown[]) => string)({
ignoredExtra: true,
});
Expand Down Expand Up @@ -1833,7 +1834,7 @@ export class ImplementsInterfaceWithInternalSubclass extends ImplementsInterface
/**
* @internal
*/
public _propertiesToo?: string;
declare public _propertiesToo: string | undefined;
}

//
Expand Down
6 changes: 3 additions & 3 deletions packages/jsii-calc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
},
"devDependencies": {
"eslint": "^9.39.4",
"jsii": "5.9.28",
"jsii": "6.0.1",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^5.9.32",
"typescript": "5.9.x"
"jsii-rosetta": "^6.0.0",
"typescript": "6.x"
},
"jsii": {
"outdir": "dist",
Expand Down
Loading
Loading