Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into rmuller/lazy-friend
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller committed Jul 24, 2023
2 parents 4b6dac1 + cde3db6 commit 8ab3813
Show file tree
Hide file tree
Showing 10 changed files with 280 additions and 244 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"@jest/types": "^28.1.3",
"@types/jest": "^29.5.3",
"@types/node": "^14.18.53",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"all-contributors-cli": "^6.26.1",
"eslint": "^8.44.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-import-resolver-typescript": "^3.5.5",
Expand All @@ -31,7 +31,7 @@
"jest-circus": "^28.1.3",
"jest-config": "^28.1.3",
"jest-expect-message": "^1.1.3",
"lerna": "^7.1.3",
"lerna": "^7.1.4",
"prettier": "^3.0.0",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
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.317"
"pyright": "^1.1.318"
}
}
4 changes: 2 additions & 2 deletions packages/@jsii/python-runtime/src/jsii/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
stats = kernel.stats


if sys.version_info < (3, 7):
if sys.version_info < (3, 8):
from platform import python_version
import warnings

warnings.warn(
f"WARNING: You are using python release {python_version()}, which has reached end-of-life! Support for EOL Python releases may be dropped in the future. Please consider upgrading to Python >= 3.7 as soon as possible.",
f"WARNING: You are using python release {python_version()}, which has reached end-of-life! Support for EOL Python releases may be dropped in the future. Please consider upgrading to Python >= 3.8 as soon as possible.",
)


Expand Down
4 changes: 1 addition & 3 deletions packages/@jsii/python-runtime/tests/test_invoke_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def test_invoke_script(self, silence_node_deprecation_warnings) -> None:

assert result.returncode == 0
assert result.stdout == b"Hello World!\n"
assert result.stderr == b""

@pytest.mark.skipif(
platform.system() == "Windows",
Expand All @@ -56,7 +55,6 @@ def test_invoke_script_with_args(self, silence_node_deprecation_warnings) -> Non

assert result.returncode == 0
assert result.stdout == b"Hello World!\n arguments: arg1, arg2\n"
assert result.stderr == b""

@pytest.mark.skipif(
platform.system() == "Windows",
Expand All @@ -70,7 +68,7 @@ def test_invoke_script_with_failure(

assert result.returncode == 3
assert result.stdout == b"Hello World!\n arguments: arg1, fail\n"
assert result.stderr == b"error message to stderr\n"
assert result.stderr.startswith(b"error message to stderr\n")

@pytest.mark.skipif(
platform.system() == "Windows",
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.88.1",
"webpack": "^5.88.2",
"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.58.1"
"typescript-json-schema": "^0.59.0"
}
}
2 changes: 1 addition & 1 deletion packages/jsii-pacmak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"pyright": "^1.1.317"
"pyright": "^1.1.318"
},
"keywords": [
"jsii",
Expand Down
18 changes: 8 additions & 10 deletions packages/jsii-rosetta/test/jsii/assemblies.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as spec from '@jsii/spec';
import { promises as fs } from 'fs';
import * as mockfs from 'mock-fs';
import * as os from 'os';
import * as path from 'path';

import { allTypeScriptSnippets } from '../../lib/jsii/assemblies';
Expand Down Expand Up @@ -199,11 +199,11 @@ test('Fixture allows use of import statements', async () => {
});

test('Backwards compatibility with literate integ tests', async () => {
mockfs({
'/package/test/integ.example.lit.ts': '# Some literate source file',
});

const directory = await fs.mkdtemp(path.join(os.tmpdir(), 'jsii-rosetta-tests-'));
try {
await fs.mkdir(path.join(directory, 'test'));
await fs.writeFile(path.join(directory, 'test', 'integ.example.lit.ts'), '# Some literate source file');

const snippets = Array.from(
await allTypeScriptSnippets([
{
Expand All @@ -218,18 +218,16 @@ test('Backwards compatibility with literate integ tests', async () => {
].join('\n'),
},
}),
directory: '/package',
directory,
},
]),
);

expect(snippets[0].visibleSource).toEqual('someExample();');
expect(snippets[0].completeSource).toEqual('# Some literate source file');
expect(snippets[0]?.parameters?.[SnippetParameters.$COMPILATION_DIRECTORY]).toEqual(
path.normalize('/package/test'),
);
expect(snippets[0]?.parameters?.[SnippetParameters.$COMPILATION_DIRECTORY]).toEqual(path.join(directory, 'test'));
} finally {
mockfs.restore();
await fs.rm(directory, { force: true, recursive: true });
}
});

Expand Down
1 change: 1 addition & 0 deletions tsconfig-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"moduleResolution": "Node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"lib": ["es2020", "es2021.WeakRef"], /* Specify library files to be included in the compilation: */
"strict": true, /* Enable all strict type-checking options. */
"strictPropertyInitialization": true, /* Require all properties be initialized in the constructor. */
Expand Down
Loading

0 comments on commit 8ab3813

Please sign in to comment.