Skip to content

Commit

Permalink
feat: the assertions module is now stable! (#17395)
Browse files Browse the repository at this point in the history
In addition, fix up CDKv2 init templates to not refer to the alpha
version of this module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Niranjan Jayakar authored Nov 8, 2021
1 parent fe03fde commit ede5e22
Show file tree
Hide file tree
Showing 24 changed files with 15 additions and 42 deletions.
8 changes: 1 addition & 7 deletions packages/@aws-cdk/assertions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@

---

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.
![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge)

---

Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/assertions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
"engines": {
"node": ">= 10.13.0 <13 || >=13.7.0"
},
"stability": "experimental",
"maturity": "experimental",
"stability": "stable",
"maturity": "stable",
"publishConfig": {
"tag": "latest"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package main
// "testing"

// "github.com/aws/aws-cdk-go/awscdk/v2"
// assertions "github.com/aws/aws-cdk-go/awscdkassertionsalpha/v2"
// assertions "github.com/aws/aws-cdk-go/awscdk/v2/assertions"
// "github.com/aws/jsii-runtime-go"
// )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.16

require (
github.com/aws/aws-cdk-go/awscdk/v2 v%cdk-version%
github.com/aws/aws-cdk-go/awscdkassertionsalpha/v2 v%cdk-version%
github.com/aws/constructs-go/constructs/v10 v10.0.5
github.com/aws/jsii-runtime-go v1.29.0
)
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@
<artifactId>constructs</artifactId>
<version>${constructs.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>assertions-alpha</artifactId>
<version>${cdk.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// package com.myorg;

// import software.amazon.awscdk.App;
// import software.amazon.awscdk.assertions.alpha.Template;
// import software.amazon.awscdk.assertions.Template;
// import java.io.IOException;

// import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"devDependencies": {
"aws-cdk": "%cdk-version%",
"@aws-cdk/assertions-alpha": "%cdk-version%",
"jest": "^26.4.2"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// const cdk = require('aws-cdk-lib');
// const { Template } = require('@aws-cdk/assertions-alpha');
// const { Template } = require('aws-cdk-lib/assertions');
// const %name.PascalCased% = require('../lib/%name%-stack');

// example test. To run these tests, uncomment this file along with the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
aws-cdk-lib==%cdk-version%
aws-cdk.assertions-alpha==%cdk-version%
constructs%constructs-version%
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import aws_cdk as core
# import aws_cdk.assertions_alpha as assertions
# import aws_cdk.assertions as assertions

# from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"cdk": "cdk"
},
"devDependencies": {
"@aws-cdk/assertions-alpha": "%cdk-version%",
"@types/jest": "^26.0.10",
"@types/node": "10.17.27",
"jest": "^26.4.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import * as cdk from 'aws-cdk-lib';
// import { Template } from '@aws-cdk/assertions-alpha';
// import { Template } from 'aws-cdk-lib/assertions';
// import * as %name.PascalCased% from '../lib/%name%-stack';

// example test. To run these tests, uncomment this file along with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@types/jest": "^26.0.10",
"@types/node": "10.17.27",
"aws-cdk-lib": "%cdk-version%",
"@aws-cdk/assertions-alpha": "%cdk-version%",
"constructs": "%constructs-version%",
"jest": "^26.4.2",
"ts-jest": "^26.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import * as cdk from 'aws-cdk-lib';
// import { Template } from '@aws-cdk/assertions-alpha';
// import { Template } from 'aws-cdk-lib/assertions';
// import * as %name.PascalCased% from '../lib/index';

// example test. To run these tests, uncomment this file along with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/aws/aws-cdk-go/awscdk/v2"
assertions "github.com/aws/aws-cdk-go/awscdkassertionsalpha/v2"
assertions "github.com/aws/aws-cdk-go/awscdk/v2/assertions"
"github.com/aws/jsii-runtime-go"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.16

require (
github.com/aws/aws-cdk-go/awscdk/v2 v%cdk-version%
github.com/aws/aws-cdk-go/awscdkassertionsalpha/v2 v%cdk-version%
github.com/aws/constructs-go/constructs/v10 v10.0.5
github.com/aws/jsii-runtime-go v1.29.0
)
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@
<artifactId>constructs</artifactId>
<version>${constructs.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>assertions-alpha</artifactId>
<version>${cdk.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.myorg;

import software.amazon.awscdk.App;
import software.amazon.awscdk.assertions.alpha.Template;
import software.amazon.awscdk.assertions.alpha.Match;
import software.amazon.awscdk.assertions.Template;
import software.amazon.awscdk.assertions.Match;
import java.io.IOException;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"devDependencies": {
"aws-cdk": "%cdk-version%",
"@aws-cdk/assertions-alpha": "%cdk-version%",
"jest": "^26.4.2"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const cdk = require('aws-cdk-lib');
const { Template, Match } = require('@aws-cdk/assertions-alpha');
const { Match, Template } = require('aws-cdk-lib/assertions');
const %name.PascalCased% = require('../lib/%name%-stack');

test('SQS Queue and SNS Topic Created', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
aws-cdk-lib==%cdk-version%
aws-cdk.assertions-alpha==%cdk-version%
constructs%constructs-version%
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import aws_cdk as core
import aws_cdk.assertions_alpha as assertions
import aws_cdk.assertions as assertions
from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"devDependencies": {
"aws-cdk": "%cdk-version%",
"@aws-cdk/assertions-alpha": "%cdk-version%",
"@types/jest": "^26.0.10",
"@types/node": "10.17.27",
"jest": "^26.4.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as cdk from 'aws-cdk-lib';
import { Template, Match } from '@aws-cdk/assertions-alpha';
import { Template, Match } from 'aws-cdk-lib/assertions';
import * as %name.PascalCased% from '../lib/%name%-stack';

test('SQS Queue and SNS Topic Created', () => {
Expand Down

0 comments on commit ede5e22

Please sign in to comment.