-
Notifications
You must be signed in to change notification settings - Fork 672
Expand file tree
/
Copy pathMakefile
More file actions
132 lines (104 loc) · 4.44 KB
/
Makefile
File metadata and controls
132 lines (104 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# This is the public Makefile containing some build commands.
# You can implement some additional personal commands such as login and sync in Makefile.private.mk (unversioned).
.PHONY: login sync bundles test-unit test-types test-indices test-protocols test-schema test-integration test-endpoints test-e2e test-bundlers build-s3-browser-bundle build-signature-v4-multi-region-browser-bundle clean-nested link-smithy unlink-smithy copy-smithy gen-auth b-auth tpk unbuilt turbo-clean server-protocols
# fetch AWS testing credentials
login:
make -f Makefile.private.mk login
# Sync your development fork with upstream.
# Recommended contents:
# gh repo sync {your_github_account_name}/aws-sdk-js-v3 -b main
# git fetch --all
sync:
make -f Makefile.private.mk sync
bundles: build-s3-browser-bundle build-signature-v4-multi-region-browser-bundle
test-unit: bundles
yarn g:vitest run -c vitest.config.mts
yarn g:vitest run -c vitest.config.browser.mts
yarn g:vitest run -c vitest.config.clients.unit.mts
npx jest -c jest.config.js
test-codegen:
cp ./private/aws-protocoltests-restjson-schema/package.json ./tmp/pkg.json.bak
cp ./private/aws-protocoltests-restjson-schema/CHANGELOG.md ./tmp/changelog.bak
rm -rf ./private/aws-protocoltests-restjson-schema
yarn generate-clients -p
node ./scripts/restore-pkg-version.js ./tmp/pkg.json.bak ./private/aws-protocoltests-restjson-schema/package.json
cp ./tmp/changelog.bak ./private/aws-protocoltests-restjson-schema/CHANGELOG.md
# typecheck for test code.
test-types:
npx tsc -p tsconfig.test.json
test-indices:
node ./scripts/validation/client-index-tests.mjs
test-protocols: bundles
yarn g:vitest run -c vitest.config.protocols.integ.mts
snapshot-compare:
NODE_OPTIONS='--max-old-space-size=8192' SNAPSHOT_MODE=compare \
yarn g:vitest run -c vitest.config.snapshots.integ.mts
snapshot-write:
NODE_OPTIONS='--max-old-space-size=8192' SNAPSHOT_MODE=write \
yarn g:vitest run -c vitest.config.snapshots.integ.mts
test-schema: bundles
yarn g:vitest run -c vitest.config.protocols-schema.integ.mts
test-integration: bundles
rm -rf ./clients/client-sso/node_modules/\@smithy # todo(yarn) incompatible redundant nesting.
node ./scripts/validation/no-generic-byte-arrays.js
node ./scripts/compilation/Inliner.spec.js
yarn g:vitest run -c vitest.config.integ.mts
make test-codegen
git diff --exit-code ./private
make test-protocols
make test-types
make snapshot-compare
make test-indices
make test-endpoints
test-endpoints:
npx jest -c ./tests/endpoints-2.0/jest.config.js --bail --verbose false
test-e2e: bundles
yarn g:vitest run -c vitest.config.e2e.mts --retry=4 --test-timeout=60000
yarn g:vitest run -c vitest.config.browser.e2e.mts --retry=4 --test-timeout=60000
make test-bundlers
test-bundlers:
(cd ./tests/bundlers && make build test)
build-s3-browser-bundle:
node ./clients/client-s3/test/browser-build/esbuild
build-signature-v4-multi-region-browser-bundle:
node ./packages-internal/signature-v4-multi-region/test-browser/browser-build/esbuild.js
# removes nested node_modules folders
clean-nested:
rm -rf ./lib/*/node_modules
rm -rf ./packages/*/node_modules
rm -rf ./packages-internal/*/node_modules
rm -rf ./clients/*/node_modules
rm -rf ./private/*/node_modules
link-smithy:
rm -rf ./node_modules/\@smithy
ln -s ../../smithy-typescript/packages/ ./node_modules/\@smithy
unlink-smithy:
rm ./node_modules/\@smithy
yarn --check-files
copy-smithy:
node ./scripts/copy-smithy-dist-files
gen-auth:
node ./scripts/cli-dispatcher client sso - gen;
node ./scripts/cli-dispatcher client sts - gen;
node ./scripts/cli-dispatcher client sso-oidc - gen;
node ./scripts/cli-dispatcher client cognito identity - gen;
b-auth:
node ./scripts/cli-dispatcher client sso - deps;
node ./scripts/cli-dispatcher client sts - b;
node ./scripts/cli-dispatcher client sso-oidc - b;
node ./scripts/cli-dispatcher client cognito identity - b;
# run turbo build for packages only.
tpk:
node ./scripts/turbo build --filter='./{packages,packages-internal}/*'
# builds only packages that have no build at all.
# for development only - packages may be stale.
unbuilt:
node scripts/build-only-unbuilt.js
# Clears the Turborepo local build cache
turbo-clean:
@read -p "Are you sure you want to delete your local cache? [y/N]: " ans && [ $${ans:-N} = y ]
@echo "\nDeleted cache folders: \n--------"
@find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' + && echo '\n'
server-protocols:
yarn generate-clients -s
yarn test:server-protocols