Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable declaration files in all modules #5

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b470492
Upgrade local-npm packages with latest version of JSII
RomainMuller May 31, 2018
6918824
[aws-cdk] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
66cdc1a
[aws-cdk-acm] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
7da6d58
[aws-cdk-all] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
835e24b
[aws-cdk-applet-js] Enable declarations file, and fix problems that u…
RomainMuller May 31, 2018
30cee7e
[aws-cdk-assert] Enable declarations file, and fix problems that unco…
RomainMuller May 31, 2018
8d1305a
[aws-cdk-cloudformation-diff] Enable declarations file, and fix probl…
RomainMuller May 31, 2018
f40a686
[aws-cdk-cloudtrail] Enable declarations file, and fix problems that …
RomainMuller May 31, 2018
15731c2
[aws-cdk-codebuild] Enable declarations file, and fix problems that u…
RomainMuller May 31, 2018
a47e4d3
[aws-cdk-codecommit] Enable declarations file, and fix problems that …
RomainMuller May 31, 2018
e81fb93
[aws-cdk-codepipeline] Enable declarations file, and fix problems tha…
RomainMuller May 31, 2018
1717a44
[aws-cdk-custom-resources] Enable declarations file, and fix problems…
RomainMuller May 31, 2018
bd9b489
[aws-cdk-cx-api] Enable declarations file, and fix problems that unco…
RomainMuller May 31, 2018
30b5598
[aws-cdk-dynamodb] Enable declarations file, and fix problems that un…
RomainMuller May 31, 2018
23cfc0c
[aws-cdk-ec2] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
345585f
[aws-cdk-events] Enable declarations file, and fix problems that unco…
RomainMuller May 31, 2018
e8c34bf
[aws-cdk-iam] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
299e06b
[aws-cdk-java] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
2834a7f
[aws-cdk-kms] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
40bf0f5
[aws-cdk-lambda] Enable declarations file, and fix problems that unco…
RomainMuller May 31, 2018
87acee3
[aws-cdk-neptune] Enable declarations file, and fix problems that unc…
RomainMuller May 31, 2018
46eaf54
[aws-cdk-quickstarts] Enable declarations file, and fix problems that…
RomainMuller May 31, 2018
906f9b1
[aws-cdk-rds] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
acff735
[aws-cdk-resources] Enable declarations file, and fix problems that u…
RomainMuller May 31, 2018
84e6058
[aws-cdk-route53] Enable declarations file, and fix problems that unc…
RomainMuller May 31, 2018
c0c3875
[aws-cdk-rtv] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
745e3be
[aws-cdk-s3] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
a96ae71
[aws-cdk-sns] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
0ebde89
[aws-cdk-sqs] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
427bf65
[aws-cdk-toolkit] Enable declarations file, and fix problems that unc…
RomainMuller May 31, 2018
d56eac4
[aws-cdk-util] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
1f1a5f1
[cfn2ts] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
72f6935
[docs] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
fa86936
[pkglint] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
d0d9f6a
[pkgtools] Enable declarations file, and fix problems that uncovered
RomainMuller May 31, 2018
0c7bf99
[simple-resource-bundler] Enable declarations file, and fix problems …
RomainMuller May 31, 2018
abddaf7
Add missing entry in .gitignore & remove offending files.
RomainMuller May 31, 2018
cd3eadc
Update jsii-0.4.0 with version to models source-map-support dep corre…
RomainMuller May 31, 2018
9b67e80
Don't expose a plain Token in DynamoDB L2.
RomainMuller May 31, 2018
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
Binary file modified local-npm/codemaker-0.4.0.tgz
Binary file not shown.
Binary file modified local-npm/jsii-0.4.0.tgz
Binary file not shown.
Binary file modified local-npm/jsii-java-runtime-0.4.0.tgz
Binary file not shown.
Binary file modified local-npm/jsii-kernel-0.4.0.tgz
Binary file not shown.
Binary file modified local-npm/jsii-pacmak-0.4.0.tgz
Binary file not shown.
Binary file modified local-npm/jsii-runtime-0.4.0.tgz
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/aws-cdk-acm/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
4 changes: 2 additions & 2 deletions packages/aws-cdk-acm/lib/certificate-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export abstract class CertificateRef extends Construct {
/**
* Import a certificate
*/
public static import(parent: Construct, name: string, props: CertificateRefProps) {
public static import(parent: Construct, name: string, props: CertificateRefProps): CertificateRef {
return new ImportedCertificate(parent, name, props);
}

Expand Down Expand Up @@ -50,4 +50,4 @@ export interface CertificateRefProps {
* The certificate's ARN
*/
certificateArn: CertificateArn;
}
}
2 changes: 1 addition & 1 deletion packages/aws-cdk-acm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs for AWS ACM",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a pkglint rule to enforce this? (maybe just open new issue)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSII won't compile if types doesn't reference .d.ts file... So you wouldn't even get to pkglint...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough

"jsii": {
"outdir": "dist",
"bundledDependencies": [],
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-all/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
1 change: 1 addition & 0 deletions packages/aws-cdk-all/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Empty file just so this package can be loaded as a dependency
1 change: 1 addition & 0 deletions packages/aws-cdk-all/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.6.0",
"description": "A single package that provides all of the CDK dependencies",
"main": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "git://github.com/awslabs/aws-cdk"
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-applet-js/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-applet-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "Javascript CDK applet host program",
"main": "bin/cdk-applet-js.js",
"types": "bin/cdk-applet-js.ts",
"types": "bin/cdk-applet-js.d.ts",
"bin": {
"cdk-applet-js": "bin/cdk-applet-js"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-assert/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-assert/lib/assertions/count-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StackInspector } from "../inspector";
/**
* An assertion to check whether a resource of a given type and with the given properties exists, disregarding properties
*/
export function countResources(resourceType: string, count = 1) {
export function countResources(resourceType: string, count = 1): Assertion<StackInspector> {
return new CountResourcesAssertion(resourceType, count);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-assert/lib/assertions/have-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StackInspector } from "../inspector";
/**
* An assertion to check whether a resource of a given type and with the given properties exists, disregarding properties
*/
export function haveResource(resourceType: string, properties?: any) {
export function haveResource(resourceType: string, properties?: any): Assertion<StackInspector> {
return new HaveResourceAssertion(resourceType, properties);
}

Expand Down Expand Up @@ -73,4 +73,4 @@ function isSuperObject(superObj: any, obj: any): boolean {
return true;
}
return superObj === obj;
}
}
2 changes: 1 addition & 1 deletion packages/aws-cdk-assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "An assertion library for use with CDK Apps",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"scripts": {
"prepare": "tslint -p . && tsc && chmod +x bin/cdk-integ bin/cdk-integ-assert && pkglint",
"watch": "tsc -w",
Expand Down
3 changes: 2 additions & 1 deletion packages/aws-cdk-assert/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"compilerOptions": {
"target":"es2018",
"lib": ["es2018"],
"lib": ["es2016", "es2017.object", "es2017.string"],
"module": "commonjs",
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-cloudformation-diff/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-cloudformation-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "Utilities to diff CDK stacks against CloudFormation templates",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"scripts": {
"prepare": "tslint -p . && tsc && pkglint",
"watch": "tsc -w",
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk-cloudformation-diff/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"target":"ES2018",
"module": "commonjs",
"lib": ["es2016", "es2017.object", "es2017.string"],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-cloudtrail/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs for AWS CloudTrail",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [],
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-cloudtrail/test/test.cloudtrail.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Stack } from 'aws-cdk';
import { expect, haveResource, not } from 'aws-cdk-assert';
import { Test } from 'nodeunit';
import { CloudTrail, LogRetention, ReadWriteType } from '..';
import { CloudTrail, LogRetention, ReadWriteType } from '../lib';

export = {
'constructs the expected resources': {
Expand Down Expand Up @@ -96,4 +96,4 @@ export = {

function getTestStack(): Stack {
return new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-east-1' } });
}
}
3 changes: 3 additions & 0 deletions packages/aws-cdk-codebuild/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
4 changes: 2 additions & 2 deletions packages/aws-cdk-codebuild/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Role } from 'aws-cdk-iam';
import { EncryptionKeyRef } from 'aws-cdk-kms';
import { codebuild } from 'aws-cdk-resources';
import { BucketRef } from 'aws-cdk-s3';
import { BuildSource, CodePipelineBuildArtifacts } from '..';
import { BuildArtifacts, NoBuildArtifacts } from './artifacts';
import { BuildArtifacts, CodePipelineBuildArtifacts, NoBuildArtifacts } from './artifacts';
import { BuildSource } from './source';

const CODEPIPELINE_TYPE = 'CODEPIPELINE';

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-codebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs for AWS CodeBuild",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [],
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-codebuild/test/integ.project-bucket.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import { App, Stack } from 'aws-cdk';
import { Bucket } from 'aws-cdk-s3';
import { BuildProject, ComputeType, S3BucketSource } from '..';
import { BuildProject, ComputeType, S3BucketSource } from '../lib';

const app = new App(process.argv);

Expand All @@ -16,4 +16,4 @@ new BuildProject(stack, 'MyProject', {
}
});

process.stdout.write(app.run());
process.stdout.write(app.run());
4 changes: 2 additions & 2 deletions packages/aws-cdk-codebuild/test/integ.project-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { App, Stack } from 'aws-cdk';
import { Repository } from 'aws-cdk-codecommit';
import { Topic } from 'aws-cdk-sns';
import { BuildProject, CodeCommitSource } from '..';
import { BuildProject, CodeCommitSource } from '../lib';

const app = new App(process.argv);

Expand Down Expand Up @@ -38,4 +38,4 @@ onCommitRule.addTarget(topic, {
}
});

process.stdout.write(app.run());
process.stdout.write(app.run());
2 changes: 1 addition & 1 deletion packages/aws-cdk-codebuild/test/test.codebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, haveResource } from 'aws-cdk-assert';
import { Repository } from 'aws-cdk-codecommit';
import { Bucket } from 'aws-cdk-s3';
import { Test } from 'nodeunit';
import { BuildProject, CodeCommitSource, CodePipelineBuildArtifacts, CodePipelineSource, NoBuildArtifacts, S3BucketSource } from '..';
import { BuildProject, CodeCommitSource, CodePipelineBuildArtifacts, CodePipelineSource, NoBuildArtifacts, S3BucketSource } from '../lib';

// tslint:disable:object-literal-key-quotes

Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-codecommit/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-codecommit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs for AWS CodeCommit",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-codecommit/test/test.codecommit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { App, Stack } from 'aws-cdk';
import { Test } from 'nodeunit';
import { Repository, RepositoryProps } from '..';
import { Repository, RepositoryProps } from '../lib';

export = {
'default properties': {
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-codepipeline/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-codepipeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "Better interface to AWS Code Pipeline",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-custom-resources/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-custom-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs to make it easier to build custom resources",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [],
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-cx-api/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
2 changes: 1 addition & 1 deletion packages/aws-cdk-cx-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "Cloud executable protocol",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"names": {
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-dynamodb/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
4 changes: 3 additions & 1 deletion packages/aws-cdk-dynamodb/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Construct } from 'aws-cdk';
import { Construct, Token } from 'aws-cdk';
import { dynamodb } from 'aws-cdk-resources';

export { Token }; // Return type of Table#tableName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just fix that?

Also, why wasn't this an error before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't an error before, because tsc didn't have to write a .d.ts file that is coherent using only exported entities. When using the .ts file as the source, the compiler is able to reach any private declaration and make type inference work. I think it's a smell :)


const HASH_KEY_TYPE = 'HASH';
const RANGE_KEY_TYPE = 'RANGE';

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs for AWS DynamoDB",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-dynamodb/test/integ.dynamodb.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { App, Stack } from 'aws-cdk';
import { KeyAttributeType, Table } from '..';
import { KeyAttributeType, Table } from '../lib';

const app = new App(process.argv);

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-dynamodb/test/test.dynamodb.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { App, Stack } from 'aws-cdk';
import { Test } from 'nodeunit';
import { KeyAttributeType, Table } from '..';
import { KeyAttributeType, Table } from '../lib';

export = {
'default properties': {
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-ec2/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
6 changes: 3 additions & 3 deletions packages/aws-cdk-ec2/lib/vpc-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export abstract class VpcNetworkRef extends Construct implements IDependable {
/**
* Import an exported VPC
*/
public static import(parent: Construct, name: string, props: VpcNetworkRefProps) {
public static import(parent: Construct, name: string, props: VpcNetworkRefProps): VpcNetworkRef {
return new ImportedVpcNetwork(parent, name, props);
}

Expand Down Expand Up @@ -155,7 +155,7 @@ export class VpcNetworkId extends Token {
* A new or imported VPC Subnet
*/
export abstract class VpcSubnetRef extends Construct implements IDependable {
public static import(parent: Construct, name: string, props: VpcSubnetRefProps) {
public static import(parent: Construct, name: string, props: VpcSubnetRefProps): VpcSubnetRef {
return new ImportedVpcSubnet(parent, name, props);
}

Expand Down Expand Up @@ -224,4 +224,4 @@ function range(n: number): number[] {
ret.push(i);
}
return ret;
}
}
2 changes: 1 addition & 1 deletion packages/aws-cdk-ec2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "CDK Constructs for AWS EC2",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-ec2/test/integ.vpc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { App, Stack } from 'aws-cdk';
import { OutboundTrafficMode, VpcNetwork } from '..';
import { OutboundTrafficMode, VpcNetwork } from '../lib';

const app = new App(process.argv);

Expand All @@ -9,4 +9,4 @@ new VpcNetwork(stack, 'MyVpc', {
outboundTraffic: OutboundTrafficMode.FromPublicAndPrivateSubnets
});

process.stdout.write(app.run());
process.stdout.write(app.run());
3 changes: 3 additions & 0 deletions packages/aws-cdk-events/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
4 changes: 2 additions & 2 deletions packages/aws-cdk-events/lib/rule-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export abstract class EventRuleRef extends Construct {
/**
* Imports a rule by ARN into this stack.
*/
public static import(parent: Construct, name: string, props: EventRuleRefProps) {
public static import(parent: Construct, name: string, props: EventRuleRefProps): EventRuleRef {
return new ImportedEventRule(parent, name, props);
}

Expand Down Expand Up @@ -42,4 +42,4 @@ class ImportedEventRule extends EventRuleRef {

this.ruleArn = props.eventRuleArn;
}
}
}
2 changes: 1 addition & 1 deletion packages/aws-cdk-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.6.0",
"description": "AWS CloudWatch Events Construct Library",
"main": "lib/index.js",
"types": "lib/index.ts",
"types": "lib/index.d.ts",
"jsii": {
"outdir": "dist",
"bundledDependencies": [
Expand Down
Loading