Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/packages/jsii-pacmak/test/gen…
Browse files Browse the repository at this point in the history
…erated-code/pip-23.2
  • Loading branch information
mergify[bot] committed Jul 17, 2023
2 parents d2fe5c6 + c1fca2a commit aa8d5f2
Show file tree
Hide file tree
Showing 45 changed files with 1,267 additions and 1,195 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
},
"devDependencies": {
"@jest/types": "^28.1.3",
"@types/jest": "^29.5.2",
"@types/node": "^14.18.51",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"all-contributors-cli": "^6.26.0",
"eslint": "^8.42.0",
"@types/jest": "^29.5.3",
"@types/node": "^14.18.53",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"all-contributors-cli": "^6.26.1",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.6.1",
"jest-circus": "^28.1.3",
"jest-config": "^28.1.3",
"jest-expect-message": "^1.1.3",
"lerna": "^7.0.1",
"prettier": "^2.8.8",
"lerna": "^7.1.3",
"prettier": "^3.0.0",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
"typescript": "~4.7.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/benchmarks/lib/benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Benchmark<C> {
#profile = false;

public constructor(private readonly name: string) {}
#setup: () => C | Promise<C> = () => ({} as C);
#setup: () => C | Promise<C> = () => ({}) as C;
#subject: (ctx: C) => void | Promise<void> = () => undefined;
#beforeEach: (ctx: C) => void | Promise<void> = () => undefined;
#afterEach: (ctx: C) => void | Promise<void> = () => undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"@types/glob": "^8.1.0",
"glob": "^10.2.7"
"glob": "^10.3.3"
},
"scripts": {
"build": "yarn --silent tsc --build && npm run lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/check-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
},
"dependencies": {
"chalk": "^4.1.2",
"semver": "^7.5.1"
"semver": "^7.5.4"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"@jsii/runtime": "^0.0.0",
"@types/semver": "^7.5.0",
"jsii-build-tools": "^0.0.0",
"semver": "^7.5.1"
"semver": "^7.5.4"
}
}
7 changes: 2 additions & 5 deletions packages/@jsii/kernel/src/kernel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ afterAll(() => {

function defineTest(
name: string,
method: (sandbox: Kernel) => Promise<any> | any,
method: (sandbox: Kernel) => any,
testFunc = test,
) {
const recording = name.replace(/[^A-Za-z]/g, '_');
Expand All @@ -71,10 +71,7 @@ function defineTest(
});
}

defineTest.skip = function (
name: string,
method: (sandbox: Kernel) => Promise<any> | any,
) {
defineTest.skip = function (name: string, method: (sandbox: Kernel) => any) {
return defineTest(name, method, test.skip);
};

Expand Down
1 change: 1 addition & 0 deletions packages/@jsii/kernel/src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ export class Kernel {
const sandoxResult = this._toSandbox(
result,
cb.expectedReturnType ?? 'void',
// eslint-disable-next-line @typescript-eslint/no-base-to-string
`returned by callback ${cb.toString()}`,
);
this._debug('completed with result:', sandoxResult);
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/python-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"jsii-pacmak": "^0.0.0",
"pyright": "^1.1.314"
"pyright": "^1.1.317"
}
}
15 changes: 12 additions & 3 deletions packages/@jsii/python-runtime/tests/test_runtime_type_checking.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import pytest
import re
from typing import Optional

from scope.jsii_calc_lib.custom_submodule_name import NestingClass
from scope.jsii_calc_lib import Number
import jsii_calc
import jsii


class TestRuntimeTypeChecking:
Expand Down Expand Up @@ -35,12 +37,19 @@ def test_constructor_decorated(self):
),
):
orig_init = jsii_calc.Calculator.__init__

# For toy, swap initial_value and maximum_values here
jsii_calc.Calculator.__init__ = (
lambda self, *, initial_value=None, maximum_value=None: orig_init(
def decorated(
self,
*,
initial_value: Optional[jsii.Number] = None,
maximum_value: Optional[jsii.Number] = None,
):
orig_init(
self, initial_value=maximum_value, maximum_value=initial_value
)
)

jsii_calc.Calculator.__init__ = decorated
try:
jsii_calc.Calculator(initial_value="nope") # type:ignore
finally:
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"source-map-loader": "^4.0.1",
"webpack": "^5.87.0",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"devDependencies": {
"fs-extra": "^10.1.0",
"jsii-build-tools": "^0.0.0",
"typescript-json-schema": "^0.57.0"
"typescript-json-schema": "^0.58.1"
}
}
6 changes: 4 additions & 2 deletions packages/jsii-calc/lib/compliance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1597,12 +1597,14 @@ export class JsiiAgent {

// To support module augmentation classes must support multiple declaration sites
// (the tail of which must be interfaces)
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class AugmentableClass {
public methodOne(): void {
console.log('methodOne');
}
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export interface AugmentableClass {
methodTwo(): void;
}
Expand Down Expand Up @@ -2013,7 +2015,7 @@ export class SingletonString {
private constructor() {}

public isSingletonString(value: string): boolean {
return value === SingletonStringEnum.SINGLETON_STRING;
return value === SingletonStringEnum.SINGLETON_STRING.valueOf();
}
}
/** A singleton string */
Expand All @@ -2029,7 +2031,7 @@ export enum SingletonStringEnum {
export class SingletonInt {
private constructor() {}
public isSingletonInt(value: number): boolean {
return value === SingletonIntEnum.SINGLETON_INT;
return value === SingletonIntEnum.SINGLETON_INT.valueOf();
}
}
/** A singleton integer. */
Expand Down
Loading

0 comments on commit aa8d5f2

Please sign in to comment.