Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
13 changes: 13 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ for dir in $(find packages -name dist | grep -v node_modules | grep -v run-wrapp
rsync -a $dir/ ${distdir}/
done

# Make sure that none of the NPM tarballs have stray `.ts` files in them.
# This is necessary because the presence of .ts files without a matching tsconfig will
# make `ts-node` fail to load the files with a "Cannot use import statement outside a module" error.
for tarball in ${distdir}/js/*.tgz; do
# Ignore init-templates, we purposely ship .ts files in there.
ts_files=$(tar tzf ${tarball} | (set +e; grep '\.ts$' | grep -v '\.d\.ts$' | grep -v init-templates))
if [[ "$ts_files" != "" ]]; then
echo "Found TypeScript source files in $tarball. This will confuse ts-node:" >&2
echo "$ts_files" >&2
exit 1
fi
done

# Record the dependency order of NPM packages into a file
# (This file will be opportunistically used during publishing)
#
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"nohoist": [
"**/jszip",
"**/jszip/**",
"@aws-cdk/aws-codebuild/@aws-cdk/yaml-cfn",
"@aws-cdk/aws-codebuild/@aws-cdk/yaml-cfn/yaml",
"@aws-cdk/aws-codebuild/@aws-cdk/yaml-cfn/yaml/**",
"@aws-cdk/aws-codepipeline-actions/case",
"@aws-cdk/aws-codepipeline-actions/case/**",
"@aws-cdk/aws-cognito/punycode",
Expand All @@ -63,6 +66,9 @@
"@aws-cdk/cloud-assembly-schema/jsonschema/**",
"@aws-cdk/cloud-assembly-schema/semver",
"@aws-cdk/cloud-assembly-schema/semver/**",
"@aws-cdk/cloudformation-include/@aws-cdk/yaml-cfn",
"@aws-cdk/cloudformation-include/@aws-cdk/yaml-cfn/yaml",
"@aws-cdk/cloudformation-include/@aws-cdk/yaml-cfn/yaml/**",
"@aws-cdk/core/@balena/dockerignore",
"@aws-cdk/core/@balena/dockerignore/**",
"@aws-cdk/core/fs-extra",
Expand All @@ -75,6 +81,9 @@
"@aws-cdk/cx-api/semver/**",
"@aws-cdk/yaml-cfn/yaml",
"@aws-cdk/yaml-cfn/yaml/**",
"aws-cdk-lib/@aws-cdk/yaml-cfn",
"aws-cdk-lib/@aws-cdk/yaml-cfn/yaml",
"aws-cdk-lib/@aws-cdk/yaml-cfn/yaml/**",
"aws-cdk-lib/@balena/dockerignore",
"aws-cdk-lib/@balena/dockerignore/**",
"aws-cdk-lib/case",
Expand All @@ -93,6 +102,9 @@
"aws-cdk-lib/semver/**",
"aws-cdk-lib/yaml",
"aws-cdk-lib/yaml/**",
"monocdk/@aws-cdk/yaml-cfn",
"monocdk/@aws-cdk/yaml-cfn/yaml",
"monocdk/@aws-cdk/yaml-cfn/yaml/**",
"monocdk/@balena/dockerignore",
"monocdk/@balena/dockerignore/**",
"monocdk/case",
Expand Down
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-codebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"build+test": "yarn build && yarn test",
"compat": "cdk-compat",
"gen": "cfn2ts",
"postpack": "cdk-postpack",
"rosetta:extract": "yarn --silent jsii-rosetta extract"
},
"cdk-build": {
Expand Down Expand Up @@ -103,6 +104,9 @@
"@aws-cdk/yaml-cfn": "0.0.0",
"constructs": "^3.3.69"
},
"bundledDependencies": [
"@aws-cdk/yaml-cfn"
],
"homepage": "https://github.com/aws/aws-cdk",
"peerDependencies": {
"@aws-cdk/aws-cloudwatch": "0.0.0",
Expand All @@ -119,7 +123,6 @@
"@aws-cdk/aws-secretsmanager": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/region-info": "0.0.0",
"@aws-cdk/yaml-cfn": "0.0.0",
"constructs": "^3.3.69"
},
"engines": {
Expand Down
7 changes: 5 additions & 2 deletions packages/@aws-cdk/cloudformation-include/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"build+test": "yarn build && yarn test",
"build+test+package": "yarn build+test && yarn package",
"compat": "cdk-compat",
"rosetta:extract": "yarn --silent jsii-rosetta extract"
"rosetta:extract": "yarn --silent jsii-rosetta extract",
"postpack": "cdk-postpack"
},
"cdk-build": {
"pre": [
Expand Down Expand Up @@ -363,7 +364,6 @@
"@aws-cdk/aws-wafv2": "0.0.0",
"@aws-cdk/aws-workspaces": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/yaml-cfn": "0.0.0",
"constructs": "^3.3.69"
},
"devDependencies": {
Expand All @@ -375,6 +375,9 @@
"pkglint": "0.0.0",
"ts-jest": "^26.5.4"
},
"bundledDependencies": [
"@aws-cdk/yaml-cfn"
],
"keywords": [
"aws",
"cdk",
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/yaml-cfn/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*.d.ts
node_modules
dist
tsconfig.json
.jsii

.LAST_BUILD
Expand All @@ -15,4 +14,4 @@ nyc.config.js
!.eslintrc.js
!jest.config.js

junit.xml
junit.xml
26 changes: 0 additions & 26 deletions packages/@aws-cdk/yaml-cfn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,6 @@
"cloudformation",
"yaml"
],
"jsii": {
"outdir": "dist",
"targets": {
"java": {
"package": "software.amazon.awscdk.yaml.cfn",
"maven": {
"groupId": "software.amazon.awscdk",
"artifactId": "cdk-yaml-cfn"
}
},
"dotnet": {
"namespace": "Amazon.CDK.Yaml.Cfn",
"packageId": "Amazon.CDK.Yaml.Cfn",
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png"
},
"python": {
"distName": "aws-cdk.yaml-cfn",
"module": "aws_cdk.yaml_cfn",
"classifiers": [
"Framework :: AWS CDK",
"Framework :: AWS CDK :: 1"
]
}
},
"projectReferences": true
},
"scripts": {
"build": "cdk-build",
"watch": "cdk-watch",
Expand Down
24 changes: 24 additions & 0 deletions packages/@aws-cdk/yaml-cfn/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"target":"ES2018",
"module": "commonjs",
"lib": ["es2016", "es2017.object", "es2017.string"],
"declaration": true,
"composite": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization":false
},
"include": ["**/*.ts" ],
"exclude": ["node_modules"]
}
5 changes: 4 additions & 1 deletion packages/aws-cdk-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"build+test+package": "yarn build+test && yarn package",
"watch": "cdk-watch",
"compat": "cdk-compat",
"rosetta:extract": "yarn --silent jsii-rosetta extract"
"rosetta:extract": "yarn --silent jsii-rosetta extract",
"postpack": "cdk-postpack"
},
"awslint": {
"exclude": [
Expand Down Expand Up @@ -82,6 +83,7 @@
},
"license": "Apache-2.0",
"bundledDependencies": [
"@aws-cdk/yaml-cfn",
"@balena/dockerignore",
"case",
"fs-extra",
Expand All @@ -93,6 +95,7 @@
"yaml"
],
"dependencies": {
"@aws-cdk/yaml-cfn": "0.0.0",
"@balena/dockerignore": "^1.0.2",
"case": "1.6.3",
"fs-extra": "^9.1.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/awslint/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

*.ts
!*.d.ts
dist
.LAST_PACKAGE
.LAST_BUILD
Expand All @@ -9,4 +10,4 @@ dist
tsconfig.json
.eslintrc.js
junit.xml
test/
test/
2 changes: 1 addition & 1 deletion packages/decdk/test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test('schemaForInterface: interface with primitives', async () => {
* are propagated outwards.
*/
function spawn(command: string, options: SpawnOptions | undefined) {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const cp = spawnAsync(command, [], { stdio: 'inherit', ...options });

cp.on('error', reject);
Expand Down
5 changes: 4 additions & 1 deletion packages/monocdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"build+test+package": "yarn build+test && yarn package",
"watch": "cdk-watch",
"compat": "cdk-compat",
"rosetta:extract": "yarn --silent jsii-rosetta extract"
"rosetta:extract": "yarn --silent jsii-rosetta extract",
"postpack": "cdk-postpack"
},
"awslint": {
"exclude": [
Expand Down Expand Up @@ -87,6 +88,7 @@
},
"license": "Apache-2.0",
"bundledDependencies": [
"@aws-cdk/yaml-cfn",
"@balena/dockerignore",
"case",
"fs-extra",
Expand All @@ -98,6 +100,7 @@
"yaml"
],
"dependencies": {
"@aws-cdk/yaml-cfn": "0.0.0",
"@balena/dockerignore": "^1.0.2",
"case": "1.6.3",
"fs-extra": "^9.1.0",
Expand Down
2 changes: 2 additions & 0 deletions tools/cdk-build-tools/bin/cdk-postpack
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./cdk-postpack.js');
Loading