Skip to content

Commit

Permalink
Fix up build and tests (#806)
Browse files Browse the repository at this point in the history
* Upgrade pulumi/pulumi and pulumi/awsx dependencies
* Updage typescript version
* Improve Makefiles to use local versions of tools
* Update to use Go 1.20
  • Loading branch information
lukehoban authored Jul 24, 2023
1 parent 7a60477 commit d3c98fa
Show file tree
Hide file tree
Showing 34 changed files with 171 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
fail-fast: true
matrix:
goversion:
- 1.16.x
- 1.20.x
language:
- nodejs
nodeversion:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
fail-fast: true
matrix:
goversion:
- 1.16.x
- 1.20.x
language:
- nodejs
nodeversion:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
fail-fast: true
matrix:
goversion:
- 1.16.x
- 1.20.x
language:
- nodejs
nodeversion:
Expand Down
4 changes: 2 additions & 2 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ VERSION := $(shell ../scripts/get-version)
export PATH := $(shell yarn bin 2>/dev/null):$(PATH)

build::
tsc
yarn run tsc
sed -e "s/\$${VERSION}/$(VERSION)/g" < package.json > bin/package.json
cp ../README.md ../LICENSE bin/

lint::
tslint -c ../tslint.json -p tsconfig.json
yarn run tslint -c ../tslint.json -p tsconfig.json
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"repository": "https://github.com/pulumi/pulumi-cloud",
"types": "types.d.ts",
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
"@pulumi/pulumi": "^3.76.0"
},
"devDependencies": {
"@types/node": "^10.0.0",
"tslint": "^5.11.0",
"typescript": "^3.0.3"
"typescript": "4.7.4"
}
}
4 changes: 2 additions & 2 deletions aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export PATH := $(shell yarn bin 2>/dev/null):$(PATH)

build::
yarn link @pulumi/cloud
tsc
yarn run tsc
sed -e 's/\$${VERSION}/$(VERSION)/g' < package.json > bin/package.json
cp ../README.md ../LICENSE bin/

lint::
tslint -c ../tslint.json -p tsconfig.json
yarn run tslint -c ../tslint.json -p tsconfig.json
4 changes: 1 addition & 3 deletions aws/examples/customDomain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "customdomain",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -13,7 +11,7 @@
},
"devDependencies": {
"@types/node": "^10.0.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
4 changes: 1 addition & 3 deletions aws/examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "express",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -15,7 +13,7 @@
"devDependencies": {
"@types/node": "^10.0.0",
"@types/express": "^4.16.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
8 changes: 4 additions & 4 deletions aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"homepage": "https://pulumi.io",
"repository": "https://github.com/pulumi/pulumi-cloud",
"dependencies": {
"@pulumi/pulumi": "^3.0.0",
"@pulumi/aws": "^4.0.0",
"@pulumi/awsx": "^0.30.0",
"@pulumi/pulumi": "^3.76.0",
"@pulumi/aws": "^5.42.0",
"@pulumi/awsx": "^0.40.0",
"@pulumi/docker": "^3.0.0",
"aws-serverless-express": "^3.3.5",
"mime": "^2.0.3",
Expand All @@ -27,7 +27,7 @@
"@types/aws-serverless-express": "^3.0.1",
"@types/express": "^4.16.0",
"tslint": "^5.11.0",
"typescript": "^3.7.4"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "${VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion aws/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const repositories = new Map<string, aws.ecr.Repository>();
function getOrCreateRepository(imageName: string): aws.ecr.Repository {
let repository: aws.ecr.Repository | undefined = repositories.get(imageName);
if (!repository) {
repository = new aws.ecr.Repository(imageName.toLowerCase());
repository = new aws.ecr.Repository(imageName.toLowerCase(), { forceDelete: true });
repositories.set(imageName, repository);

// Set a default lifecycle policy such that at most a single untagged image is retained.
Expand Down
2 changes: 0 additions & 2 deletions aws/tests/topic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "topic",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand Down
2 changes: 0 additions & 2 deletions aws/tests/unit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "unittests",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand Down
4 changes: 2 additions & 2 deletions azure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export PATH := $(shell yarn bin 2>/dev/null):$(PATH)

build::
yarn link @pulumi/cloud
tsc
yarn run tsc
sed -e 's/\$${VERSION}/$(VERSION)/g' < package.json > bin/package.json
cp ../README.md ../LICENSE bin/

lint::
tslint -c ../tslint.json -p tsconfig.json
yarn run tslint -c ../tslint.json -p tsconfig.json
6 changes: 3 additions & 3 deletions azure/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class Bucket extends pulumi.ComponentResource implements cloud.Bucket {
return reject(err);
}

resolve();
resolve(undefined);
});
});

Expand All @@ -74,7 +74,7 @@ export class Bucket extends pulumi.ComponentResource implements cloud.Bucket {
return reject(err);
}

resolve();
resolve(undefined);
});
});
};
Expand All @@ -87,7 +87,7 @@ export class Bucket extends pulumi.ComponentResource implements cloud.Bucket {
return reject(err);
}

resolve();
resolve(undefined);
});
});
};
Expand Down
4 changes: 1 addition & 3 deletions azure/examples/bucket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "bucket",
"version": "0.1.0",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -13,7 +11,7 @@
},
"devDependencies": {
"@types/node": "^10.0.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
2 changes: 0 additions & 2 deletions azure/examples/cloud-ts-thumbnailer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "video-thumbnailer",
"version": "0.1.0",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand Down
4 changes: 1 addition & 3 deletions azure/examples/containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "containers",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -16,7 +14,7 @@
"devDependencies": {
"@types/node": "^10.0.0",
"@types/node-fetch": "^1.6.7",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
4 changes: 1 addition & 3 deletions azure/examples/table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "table",
"version": "0.1.0",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -13,7 +11,7 @@
},
"devDependencies": {
"@types/node": "^10.0.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
4 changes: 1 addition & 3 deletions azure/examples/topic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "topic",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -15,7 +13,7 @@
"devDependencies": {
"@types/node": "^10.0.0",
"@types/express": "^4.16.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
6 changes: 3 additions & 3 deletions azure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"homepage": "https://pulumi.io",
"repository": "https://github.com/pulumi/pulumi-cloud",
"dependencies": {
"@pulumi/pulumi": "^3.0.0",
"@pulumi/azure": "^4.0.0",
"@pulumi/pulumi": "^3.76.0",
"@pulumi/azure": "^5.45.0",
"@pulumi/docker": "^3.0.0",
"stream-buffers": "^3.0.2",
"azure-storage": "^2.10.3",
Expand All @@ -33,7 +33,7 @@
"@types/express": "^4.16.1",
"@types/aws-serverless-express": "^3.3.1",
"tslint": "^5.12.1",
"typescript": "^3.4.5"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "${VERSION}"
Expand Down
3 changes: 1 addition & 2 deletions azure/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export class Topic<T> extends pulumi.ComponentResource implements cloud.Topic<T>
}, { parent: this });

const topic = new azure.servicebus.Topic(name, {
resourceGroupName: shared.globalResourceGroupName,
namespaceName: namespace.name,
namespaceId: namespace.id,
}, { parent: this });

this.namespace = namespace;
Expand Down
4 changes: 1 addition & 3 deletions examples/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "apiExample",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -12,7 +10,7 @@
},
"devDependencies": {
"@types/node": "^10.0.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
4 changes: 1 addition & 3 deletions examples/api/variants/updateGetEndpoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
"name": "apiExample",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@pulumi/pulumi": "dev"
},
"devDependencies": {
"typescript": "^3.0.0",
"typescript": "4.7.4",
"@types/node": "^10.0.0"
},
"peerDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions examples/containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "containers",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -15,7 +13,7 @@
"devDependencies": {
"@types/node": "^10.0.0",
"@types/node-fetch": "^1.6.7",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
4 changes: 1 addition & 3 deletions examples/countdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "countdown",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -12,7 +10,7 @@
},
"devDependencies": {
"@types/node": "^10.0.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
4 changes: 1 addition & 3 deletions examples/crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "crawler",
"version": "0.0.1",
"license": "Apache-2.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
Expand All @@ -18,7 +16,7 @@
"@types/node": "^10.0.0",
"@types/node-fetch": "^1.6.7",
"@types/express":"^4.16.0",
"typescript": "^3.0.0"
"typescript": "4.7.4"
},
"peerDependencies": {
"@pulumi/cloud": "latest",
Expand Down
Loading

0 comments on commit d3c98fa

Please sign in to comment.