Skip to content

Commit

Permalink
Merge pull request #1451 from aws/bump/1.2.0
Browse files Browse the repository at this point in the history
chore(release): 1.2.0
  • Loading branch information
MrArnoldPalmer authored Apr 1, 2020
2 parents 316b3a4 + 975da5d commit dda2bc0
Show file tree
Hide file tree
Showing 180 changed files with 6,639 additions and 4,426 deletions.
3 changes: 3 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ update_configs:
package_manager: javascript
update_schedule: live
version_requirement_updates: increase_versions
allowed_updates:
- match:
update_type: 'all'
default_labels:
- dependencies

Expand Down
5 changes: 5 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"skip": { "tag": true },
"packageFiles": [ { "filename": "lerna.json", "type": "json" } ],
"bumpFiles": [ { "filename": "lerna.json", "type": "json" } ]
}
1 change: 0 additions & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--install.check-files true # install will verify file tree of packages for consistency
--install.audit true # Run vulnerability audit on installed packages
25 changes: 22 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
# Change Log
# Changelog

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
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.

## [1.2.0](https://github.com/aws/jsii/compare/v1.0.0...v1.2.0) (2020-03-31)


### Features

* **jsii:** introduce submodules feature ([#1297](https://github.com/aws/jsii/issues/1297)) ([2df5d90](https://github.com/aws/jsii/commit/2df5d90f831808d02a4d697946a18065f3ae5ef2)), closes [#1286](https://github.com/aws/jsii/issues/1286)
* add autobump script ([#1335](https://github.com/aws/jsii/issues/1335)) ([bdda569](https://github.com/aws/jsii/commit/bdda569729db83abe09edb9f9d922ba4194cd847))


### Bug Fixes

* **diff:** check super types ([#1354](https://github.com/aws/jsii/issues/1354)) ([b08f65f](https://github.com/aws/jsii/commit/b08f65feab97133ead27857233384d788676ce80))
* **dotnet:** missing ? on nullable interface members ([#1287](https://github.com/aws/jsii/issues/1287)) ([9299db2](https://github.com/aws/jsii/commit/9299db25348504a4e413a047ce9ba914fb0f8856)), closes [#1285](https://github.com/aws/jsii/issues/1285)
* **dotnet-analyzers:** unit test null reference ([#1341](https://github.com/aws/jsii/issues/1341)) ([6b88509](https://github.com/aws/jsii/commit/6b88509ef84891005d6dc904828bbce9c81a9cc3))
* **jsii:** missing context on "Message" diagnostics ([#1298](https://github.com/aws/jsii/issues/1298)) ([c44f5f3](https://github.com/aws/jsii/commit/c44f5f30b77225e463d80c2e01e519e40d5601c5))
* **jsii:** out-of-source builds are broken ([#1344](https://github.com/aws/jsii/issues/1344)) ([aecdc5e](https://github.com/aws/jsii/commit/aecdc5eecc540e11f91c761de41bcf36c2f88f20)), closes [#1273](https://github.com/aws/jsii/issues/1273)
* **jsii:** single-valued enums are not processed correctly ([#1406](https://github.com/aws/jsii/issues/1406)) ([39425a4](https://github.com/aws/jsii/commit/39425a4caabcfe3d199f0dc04ee507b57905071d)), closes [aws/aws-cdk#6712](https://github.com/aws/aws-cdk/issues/6712) [aws/aws-cdk#6948](https://github.com/aws/aws-cdk/issues/6948)
* **kernel:** "any" serialization breaks private type instances ([#1347](https://github.com/aws/jsii/issues/1347)) ([655adeb](https://github.com/aws/jsii/commit/655adeb9f3e9617049fbbe9160b9ef15218790be)), closes [aws/aws-cdk#6746](https://github.com/aws/aws-cdk/issues/6746)
* **python-runtime:** KernelResponse missing types ([#1332](https://github.com/aws/jsii/issues/1332)) ([fcafab4](https://github.com/aws/jsii/commit/fcafab48c97e14ba76585d186041b0e8af79cf3a))

# [1.1.0](https://github.com/aws/jsii/compare/v1.0.0...v1.1.0) (2020-03-10)

Expand Down
2 changes: 2 additions & 0 deletions buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ phases:
build:
commands:
- yarn build && yarn test
- /bin/bash ./scripts/align-version.sh
- yarn build
post_build:
commands:
- '[ ${CODEBUILD_BUILD_SUCCEEDING} = 1 ] && yarn package'
Expand Down
85 changes: 84 additions & 1 deletion docs/specifications/2-type-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ term *primitive* encompasses `boolean`, `string`, and `number`.
`interface` | `undefined` | :x: | :x: | :x: | [Reference] | [Reference]
`struct` | `undefined` | :x: | :x: | :x: | :x: | [Value]
`class` | `undefined` | :x: | :x: | :x: | [Reference] | [Reference]
`any` | `undefined` | [Date] | [Identity] | [Array] | [Reference] | [Mapping]
`any` | `undefined` | [Date] | [Identity] | [Array] | [Reference] | [Value] or [Reference]

In the case of `object` being passed though `any`, the value may be serialized
by [Value] only if the value being passed does not have any method or dynamic
accessor. Otherwise, it must be passed by [Reference] instead.

> :warning: The serialization behavior around `undefined` values is affected by
> the `optional` attribute of the declared type. As discussed earlier, the `any`
Expand Down Expand Up @@ -308,6 +311,86 @@ document.
}
```

## Submodules

> :construction: The *submodules* feature is still under active development and
> the specific behavior around it (in particular with respects to code
> generation) are still subject to change.
### Overview

Typescript allows grouping declarations together in *namespaces*, which are
interpreted by *jsii* as *submodules*. *Submodules* names are the fully
qualified name of the namespace from the package's root (if a package `foo`
defines a namespace `ns1`, which itself contains `ns2`, the submodule for `ns2`
will be named `foo.ns1.ns2`).

*Submodules* may use different [code-generation configuration](#code-generation)
than their parent submodule or package.

> :construction: *Submodule*-level code-generation configuration is not yet
> implemented.
### Restrictions

*Submodules* cannot be involved in dependency cycles. While it is possible to
build such cycles in **JavaScript**, that configuration cannot be reliably
reprensented in certain other programming languages (e.g: **Python**).

> :construction: [`jsii`] does not currently check for circular submodule
> dependencies. Invalid dependency patterns may result in errors at code
> generation by [`jsii-pacmak`], or at runtime.
Since this would result in ambiguity that cannot be consistently resolved, a
given type can only be exported as part of one *submodule*.

[`jsii`]: ../../packages/jsii
[`jsii-pacmak`]: ../../packages/jsii-pacmak

### Declaration

There are two supported ways to introduce *submodules*:
* Using the namespaced export syntax:
```ts
export * as ns from './module';
```
* Using an explicit namespace declaration:
```ts
export namespace ns { /* ... */ }
```

*Submodules* declared using the `export * as ns from './module';` syntax can be
documented using a markdown document located at `./module/README.md`.

> :construction: The `./module/README.md` file support is not yet implemented.
### Code Generation

In languages where this is relevant (e.g: **Python**), *submodules* are rendered
as native *submodules*. In languages where a namespace system exists (**Java**
uses *packages*, **C#** uses *namespaces*, ...), *submodules* are rendered using
that.

## Code Generation

In order to generate code in various programming languages, [`jsii-pacmak`]
needs configuration that provides naming directives (e.g: **Java** package
names, **C#** namespaces, **Python** module names, ...). This configuration is
language-specific and each language implementation specifies and documents its
own configuration schema.

Configuration is sourced in the `package.json` file at the root of the npm
package, under the special `jsii` key. The general schema is described in the
[configuration] document.

> :construction: There is a proposition to allow this configuration to be placed
> in a `.jsiirc.json` file, which would take precedence over what is specified
> in `package.json`. *Submodules* introduced using the
> `export * as ns from './module';` syntax would then be able to define
> *submodule*-local configuration using the `./module/.jsiirc.json` file.
[configuration]: ../configuration.md

## References

The [**TypeScript** Handbook] describes the language's type system and syntax
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"rejectCycles": true
}
},
"version": "1.1.0"
"version": "1.2.0"
}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"private": true,
"license": "Apache-2.0",
"version": "0.0.0",
"scripts": {
"build": "lerna run build --stream --sort --concurrency=1",
"bump": "bash scripts/bump.sh",
Expand All @@ -11,13 +12,14 @@
"test:update": "lerna run test:update --stream"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.23.0",
"@typescript-eslint/parser": "^2.23.0",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.1",
"eslint-import-resolver-node": "^0.3.3",
"eslint-import-resolver-typescript": "^2.0.0",
"lerna": "^3.20.2"
"eslint-plugin-import": "^2.20.2",
"lerna": "^3.20.2",
"standard-version": "^7.1.0"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/dotnet-analyzers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsii/dotnet-analyzers",
"version": "1.1.0",
"version": "0.0.0",
"private": true,
"description": ".NET Roslyn Analyzers for Jsii",
"license": "Apache-2.0",
Expand Down Expand Up @@ -37,8 +37,8 @@
"package": "package-dotnet"
},
"devDependencies": {
"@types/node": "^10.17.17",
"jsii-build-tools": "^1.1.0",
"@types/node": "^10.17.18",
"jsii-build-tools": "^0.0.0",
"typescript": "~3.8.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ private static string FormatDiagnostics(DiagnosticAnalyzer? analyzer, params Dia
Assert.True(location.IsInSource,
$"Test base does not currently handle diagnostics in metadata locations. Diagnostic in metadata: {diagnostics[i]}\r\n");

string resultMethodName = diagnostics[i].Location.SourceTree.FilePath.EndsWith(".cs") ? "GetCSharpResultAt" : "GetBasicResultAt";
bool fileIsCSharp = diagnostics[i].Location.SourceTree?.FilePath.EndsWith(".cs") ?? false;
string resultMethodName = fileIsCSharp ? "GetCSharpResultAt" : "GetBasicResultAt";
var linePosition = diagnostics[i].Location.GetLineSpan().StartLinePosition;

builder.AppendFormat("{0}({1}, {2}, {3}.{4})",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.4.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.5.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/dotnet-jsonmodel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsii/dotnet-jsonmodel",
"version": "1.1.0",
"version": "0.0.0",
"private": true,
"description": ".NET json model for jsii spec and api.",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,8 +35,8 @@
"package": "package-dotnet"
},
"devDependencies": {
"@types/node": "^10.17.17",
"jsii-build-tools": "^1.1.0",
"@types/node": "^10.17.18",
"jsii-build-tools": "^0.0.0",
"typescript": "~3.8.3"
}
}
10 changes: 5 additions & 5 deletions packages/@jsii/dotnet-runtime-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsii/dotnet-runtime-test",
"version": "1.1.0",
"version": "0.0.0",
"private": true,
"description": "Tests for the .NET client for jsii runtime",
"license": "Apache-2.0",
Expand Down Expand Up @@ -30,10 +30,10 @@
"test:update": "UPDATE_DIFF=1 npm run test"
},
"devDependencies": {
"@jsii/dotnet-runtime": "^1.1.0",
"@types/node": "^10.17.17",
"jsii-calc": "^1.1.0",
"jsii-pacmak": "^1.1.0",
"@jsii/dotnet-runtime": "^0.0.0",
"@types/node": "^10.17.18",
"jsii-calc": "^0.0.0",
"jsii-pacmak": "^0.0.0",
"typescript": "~3.8.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Linq;
using Amazon.JSII.Runtime.Deputy;
using Amazon.JSII.Tests.CalculatorNamespace;
using CompositeOperation = Amazon.JSII.Tests.CalculatorNamespace.composition.CompositeOperation;
using CompositeOperation = Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation;
using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace;
using Newtonsoft.Json.Linq;
using Xunit;
Expand Down Expand Up @@ -1413,11 +1413,11 @@ public void AbstractMembersAreCorrectlyHandled()
var abstractSuite = new AbstractSuiteImpl();
Assert.Equal("Wrapped<String<Oomf!>>", abstractSuite.WorkItAll("Oomf!"));
}

private sealed class AbstractSuiteImpl : AbstractSuite
{
private string _property = "";

public AbstractSuiteImpl() {}

protected override string SomeMethod(string str)
Expand All @@ -1440,7 +1440,7 @@ public void CollectionOfInterfaces_ListOfStructs()
Assert.IsAssignableFrom<IStructA>(elt);
}
}

[Fact(DisplayName = Prefix + nameof(CollectionOfInterfaces_ListOfInterfaces))]
public void CollectionOfInterfaces_ListOfInterfaces()
{
Expand All @@ -1449,7 +1449,7 @@ public void CollectionOfInterfaces_ListOfInterfaces()
Assert.IsAssignableFrom<IBell>(elt);
}
}

[Fact(DisplayName = Prefix + nameof(CollectionOfInterfaces_MapOfStructs))]
public void CollectionOfInterfaces_MapOfStructs()
{
Expand All @@ -1458,7 +1458,7 @@ public void CollectionOfInterfaces_MapOfStructs()
Assert.IsAssignableFrom<IStructA>(elt);
}
}

[Fact(DisplayName = Prefix + nameof(CollectionOfInterfaces_MapOfInterfaces))]
public void CollectionOfInterfaces_MapOfInterfaces()
{
Expand Down
10 changes: 5 additions & 5 deletions packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsii/dotnet-runtime",
"version": "1.1.0",
"version": "0.0.0",
"private": true,
"description": ".NET client for jsii runtime",
"license": "Apache-2.0",
Expand Down Expand Up @@ -37,11 +37,11 @@
"package": "package-dotnet"
},
"devDependencies": {
"@jsii/dotnet-jsonmodel": "^1.1.0",
"@jsii/runtime": "^1.1.0",
"@types/node": "^10.17.17",
"@jsii/dotnet-jsonmodel": "^0.0.0",
"@jsii/runtime": "^0.0.0",
"@types/node": "^10.17.18",
"@types/semver": "^7.1.0",
"jsii-build-tools": "^1.1.0",
"jsii-build-tools": "^0.0.0",
"semver": "^7.1.3",
"typescript": "~3.8.3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Amazon.JSII.JsonModel" Version="$(JsiiVersionRange)" />
</ItemGroup>
Expand Down
Loading

0 comments on commit dda2bc0

Please sign in to comment.