Skip to content

Commit b7c1aa2

Browse files
authored
chore: validate codegen changes using yarn generate-clients (#7780)
1 parent ab81c73 commit b7c1aa2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+36
-4812
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,8 @@ temp/
8080
temp-packages/
8181
temp-lib/
8282

83+
/tmp/*
84+
!/tmp/.gitkeep
85+
8386
# Gradle composite build properties
8487
codegen/local.properties

Makefile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ test-unit: bundles
2222
yarn g:vitest run -c vitest.config.clients.unit.mts
2323
npx jest -c jest.config.js
2424

25-
test-client-codegen:
26-
rm -rf ./codegen/new-client-test-codegen/build
27-
rm -rf ./private/client-test-weather
28-
cd codegen && ./gradlew :new-client-test-codegen:build
29-
mkdir -p ./private/client-test-weather
30-
cp -r ./codegen/new-client-test-codegen/build/smithyprojections/new-client-test-codegen/source/typescript-client-codegen/* ./private/client-test-weather/
31-
cat ./private/client-test-weather/package.json
32-
yarn update:versions:default
25+
test-codegen:
26+
cp ./private/aws-protocoltests-restjson-schema/package.json ./tmp/pkg.json.bak
27+
cp ./private/aws-protocoltests-restjson-schema/CHANGELOG.md ./tmp/changelog.bak
28+
rm -rf ./private/aws-protocoltests-restjson-schema
29+
yarn generate-clients -p
30+
node ./scripts/restore-pkg-version.js ./tmp/pkg.json.bak ./private/aws-protocoltests-restjson-schema/package.json
31+
cp ./tmp/changelog.bak ./private/aws-protocoltests-restjson-schema/CHANGELOG.md
3332

3433
# typecheck for test code.
3534
test-types:
@@ -55,7 +54,7 @@ test-integration: bundles
5554
node ./scripts/validation/no-generic-byte-arrays.js
5655
node ./scripts/compilation/Inliner.spec.js
5756
yarn g:vitest run -c vitest.config.integ.mts
58-
yarn generate-clients -p;
57+
make test-codegen
5958
git diff --exit-code ./private
6059
make test-protocols
6160
make test-types

codegen/new-client-test-codegen/build.gradle.kts

Lines changed: 0 additions & 48 deletions
This file was deleted.

codegen/new-client-test-codegen/models/weather.smithy

Lines changed: 0 additions & 149 deletions
This file was deleted.

codegen/new-client-test-codegen/smithy-build.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

codegen/protocol-test-codegen/smithy-build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@
418418
"package": "@aws-sdk/aws-protocoltests-restjson-schema",
419419
"generateSchemas": true,
420420
"generateSnapshotTests": true,
421-
"packageVersion": "1.0.0-alpha.1",
421+
"packageVersion": "1.0.0",
422422
"packageJson": {
423423
"author": {
424424
"name": "AWS SDK for JavaScript Team",

codegen/settings.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ include(":smithy-aws-typescript-codegen")
2121
include(":sdk-codegen")
2222
include(":protocol-test-codegen")
2323
include(":generic-client-test-codegen")
24-
include(":new-client-test-codegen")
2524

2625
file(
2726
java.nio.file.Paths.get(rootProject.projectDir.absolutePath, "local.properties"))

private/aws-protocoltests-restjson-schema/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
189+
Copyright 2018-2026 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

private/aws-protocoltests-restjson-schema/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"build:types": "tsc -p tsconfig.types.json",
1111
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
1212
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
13-
"test": "yarn g:vitest run",
13+
"test": "yarn g:vitest run --passWithNoTests",
1414
"test:integration": "yarn dlx vitest run --passWithNoTests -c vitest.config.integ.mts",
1515
"test:integration:watch": "yarn dlx vitest run --passWithNoTests -c vitest.config.integ.mts",
16-
"test:watch": "yarn g:vitest watch"
16+
"test:watch": "yarn g:vitest watch --passWithNoTests"
1717
},
1818
"main": "./dist-cjs/index.js",
1919
"types": "./dist-types/index.d.ts",

private/aws-protocoltests-restjson-schema/vitest.config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { defineConfig } from "vite";
1+
import { defineConfig } from "vitest/config";
22

33
export default defineConfig({
44
test: {
5+
exclude: ["**/*.{integ}.spec.ts"],
56
include: ["**/*.spec.ts"],
67
globals: true,
78
},

0 commit comments

Comments
 (0)