Skip to content

Commit abe1ac7

Browse files
authored
fix: add missing transitive bundled dependencies to construct packages (#3473)
## Description Fixes aws-amplify/amplify-backend#3158 ### Problem `npm ci` fails with "Missing from lock file" errors after `npm install` when using `@aws-amplify/backend`. The root cause is that `bundledDependencies` in `@aws-amplify/data-construct` and `@aws-amplify/graphql-api-construct` is missing transitive dependencies of bundled packages. These missing deps get hoisted during `npm install` but aren't captured in `package-lock.json`, causing `npm ci` to fail. ### Changes **Added 6 missing transitive deps** to `bundledDependencies`, `dependencies`, and `nohoist` in both construct packages: | Package | Required by | |---|---| | `@aws-sdk/eventstream-handler-node` | `@aws-sdk/client-bedrock-runtime@^3.622.0` | | `@aws-sdk/middleware-eventstream` | `@aws-sdk/client-bedrock-runtime@^3.622.0` | | `json-schema-to-ts` | `@aws-amplify/ai-constructs` | | `ts-algebra` | `json-schema-to-ts` | | `@babel/runtime` | `json-schema-to-ts` | | `regenerator-runtime` | `@babel/runtime` | **Removed `json-schema-to-ts` exclusion** from `verify-construct-dependencies.ts` since it now needs to be bundled. **Added regression test** to `verify_amplify_backend_compatability`: checks that every dependency of every bundled package is itself listed in `bundledDependencies`. This catches the exact class of bug from aws-amplify/amplify-backend#3158. ### Testing **Red/green verified** — regression test reproduces the original issue on unfixed code and passes with the fix: - ❌ **Red** ([diff vs main](main...red/npm-ci-regression-test)) — main + regression test only, no fix → `verify_amplify_backend_compatability` fails ([CodeBuild](https://us-east-1.console.aws.amazon.com/codesuite/codebuild/594813022831/projects/amplify-category-api-pr-workflow/batch/amplify-category-api-pr-workflow:2b4825e4-c32c-492d-8575-10c8811480b5?region=us-east-1)): ``` ERROR: Missing bundled transitive dependencies: @aws-amplify/data-construct: @aws-amplify/ai-constructs requires json-schema-to-ts (not bundled) @aws-amplify/data-construct: @aws-sdk/client-bedrock-runtime requires @aws-sdk/eventstream-handler-node (not bundled) @aws-amplify/data-construct: @aws-sdk/client-bedrock-runtime requires @aws-sdk/middleware-eventstream (not bundled) @aws-amplify/graphql-api-construct: @aws-amplify/ai-constructs requires json-schema-to-ts (not bundled) @aws-amplify/graphql-api-construct: @aws-sdk/client-bedrock-runtime requires @aws-sdk/eventstream-handler-node (not bundled) @aws-amplify/graphql-api-construct: @aws-sdk/client-bedrock-runtime requires @aws-sdk/middleware-eventstream (not bundled) ``` - ✅ **Green** ([this PR](https://github.com/aws-amplify/amplify-category-api/pull/3473/files)) — fix + regression test → all 11 PR checks pass ([CodeBuild](https://us-east-1.console.aws.amazon.com/codesuite/codebuild/594813022831/projects/amplify-category-api-pr-workflow/batch/amplify-category-api-pr-workflow:b51e221f-235c-4f42-8e2d-8e38a9aab9f1?region=us-east-1)) - ✅ **E2E tests**: ([CodeBuild](https://tiny.amazon.com/1dvh9bk5w/IsenLink)) (cleanup failing as expected still; all tests passing)
1 parent bddb2c8 commit abe1ac7

6 files changed

Lines changed: 80 additions & 2 deletions

File tree

dependency_licenses.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4022,7 +4022,7 @@ Apache License
40224022

40234023
-----
40244024

4025-
The following software may be included in this product: @aws-sdk/eventstream-handler-node, @aws-sdk/eventstream-serde-browser, @aws-sdk/eventstream-serde-config-resolver, @aws-sdk/eventstream-serde-node, @aws-sdk/eventstream-serde-universal, @aws-sdk/invalid-dependency, @aws-sdk/middleware-host-header, @aws-sdk/middleware-recursion-detection, @aws-sdk/middleware-sdk-s3, @aws-sdk/middleware-serde, @aws-sdk/middleware-user-agent, @aws-sdk/protocol-http, @aws-sdk/s3-request-presigner, @aws-sdk/signature-v4-multi-region, @aws-sdk/smithy-client, @aws-sdk/util-create-request, @smithy/core, @smithy/eventstream-serde-browser, @smithy/eventstream-serde-config-resolver, @smithy/eventstream-serde-node, @smithy/eventstream-serde-universal, @smithy/invalid-dependency, @smithy/middleware-serde, @smithy/protocol-http, @smithy/smithy-client, @smithy/types. A copy of the source code may be downloaded from https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-handler-node), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-browser), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-config-resolver), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-node), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-universal), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/invalid-dependency), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-host-header), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-recursion-detection), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-sdk-s3), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-serde), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-user-agent), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/protocol-http), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/s3-request-presigner), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/signature-v4-multi-region), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/smithy-client), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/util-create-request), https://github.com/smithy-lang/smithy-typescript.git (@smithy/core), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-browser), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-config-resolver), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-node), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-universal), https://github.com/smithy-lang/smithy-typescript.git (@smithy/invalid-dependency), https://github.com/smithy-lang/smithy-typescript.git (@smithy/middleware-serde), https://github.com/smithy-lang/smithy-typescript.git (@smithy/protocol-http), https://github.com/smithy-lang/smithy-typescript.git (@smithy/smithy-client), https://github.com/awslabs/smithy-typescript.git (@smithy/types). This software contains the following license and notice below:
4025+
The following software may be included in this product: @aws-sdk/eventstream-handler-node, @aws-sdk/eventstream-serde-browser, @aws-sdk/eventstream-serde-config-resolver, @aws-sdk/eventstream-serde-node, @aws-sdk/eventstream-serde-universal, @aws-sdk/invalid-dependency, @aws-sdk/middleware-host-header, @aws-sdk/middleware-recursion-detection, @aws-sdk/middleware-sdk-s3, @aws-sdk/middleware-serde, @aws-sdk/middleware-user-agent, @aws-sdk/protocol-http, @aws-sdk/s3-request-presigner, @aws-sdk/signature-v4-multi-region, @aws-sdk/smithy-client, @aws-sdk/util-create-request, @smithy/core, @smithy/eventstream-serde-browser, @smithy/eventstream-serde-config-resolver, @smithy/eventstream-serde-node, @smithy/eventstream-serde-universal, @smithy/invalid-dependency, @smithy/middleware-serde, @smithy/protocol-http, @smithy/smithy-client, @smithy/types. A copy of the source code may be downloaded from https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-handler-node), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-browser), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-config-resolver), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-node), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/eventstream-serde-universal), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/invalid-dependency), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-host-header), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-recursion-detection), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-sdk-s3), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-serde), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/middleware-user-agent), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/protocol-http), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/s3-request-presigner), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/signature-v4-multi-region), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/smithy-client), https://github.com/aws/aws-sdk-js-v3.git (@aws-sdk/util-create-request), https://github.com/smithy-lang/smithy-typescript.git (@smithy/core), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-browser), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-config-resolver), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-node), https://github.com/smithy-lang/smithy-typescript.git (@smithy/eventstream-serde-universal), https://github.com/smithy-lang/smithy-typescript.git (@smithy/invalid-dependency), https://github.com/smithy-lang/smithy-typescript.git (@smithy/middleware-serde), https://github.com/smithy-lang/smithy-typescript.git (@smithy/protocol-http), https://github.com/smithy-lang/smithy-typescript.git (@smithy/smithy-client), https://github.com/smithy-lang/smithy-typescript.git (@smithy/types). This software contains the following license and notice below:
40264026

40274027
Apache License
40284028
Version 2.0, January 2004

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,15 @@
138138
"@aws-amplify/data-construct/@aws-amplify/graphql-validate-transformer",
139139
"@aws-amplify/data-construct/@aws-amplify/platform-core",
140140
"@aws-amplify/data-construct/@aws-amplify/plugin-types",
141+
"@aws-amplify/data-construct/@babel/runtime",
141142
"@aws-amplify/data-construct/@aws-crypto/crc32",
142143
"@aws-amplify/data-construct/@aws-crypto/sha256-browser",
143144
"@aws-amplify/data-construct/@aws-crypto/sha256-js",
144145
"@aws-amplify/data-construct/@aws-crypto/supports-web-crypto",
145146
"@aws-amplify/data-construct/@aws-crypto/util",
146147
"@aws-amplify/data-construct/@aws-sdk/client-bedrock-runtime",
148+
"@aws-amplify/data-construct/@aws-sdk/eventstream-handler-node",
149+
"@aws-amplify/data-construct/@aws-sdk/middleware-eventstream",
147150
"@aws-amplify/data-construct/@aws-sdk/client-sso",
148151
"@aws-amplify/data-construct/@aws-sdk/client-sso-oidc",
149152
"@aws-amplify/data-construct/@aws-sdk/client-sts",
@@ -236,6 +239,7 @@
236239
"@aws-amplify/data-construct/immer",
237240
"@aws-amplify/data-construct/is-buffer",
238241
"@aws-amplify/data-construct/is-ci",
242+
"@aws-amplify/data-construct/json-schema-to-ts",
239243
"@aws-amplify/data-construct/jsonfile",
240244
"@aws-amplify/data-construct/libphonenumber-js",
241245
"@aws-amplify/data-construct/lodash",
@@ -245,8 +249,10 @@
245249
"@aws-amplify/data-construct/object-hash",
246250
"@aws-amplify/data-construct/path-expression-matcher",
247251
"@aws-amplify/data-construct/pluralize",
252+
"@aws-amplify/data-construct/regenerator-runtime",
248253
"@aws-amplify/data-construct/semver",
249254
"@aws-amplify/data-construct/strnum",
255+
"@aws-amplify/data-construct/ts-algebra",
250256
"@aws-amplify/data-construct/ts-dedent",
251257
"@aws-amplify/data-construct/tslib",
252258
"@aws-amplify/data-construct/universalify",
@@ -275,12 +281,15 @@
275281
"@aws-amplify/graphql-api-construct/@aws-amplify/graphql-validate-transformer",
276282
"@aws-amplify/graphql-api-construct/@aws-amplify/platform-core",
277283
"@aws-amplify/graphql-api-construct/@aws-amplify/plugin-types",
284+
"@aws-amplify/graphql-api-construct/@babel/runtime",
278285
"@aws-amplify/graphql-api-construct/@aws-crypto/crc32",
279286
"@aws-amplify/graphql-api-construct/@aws-crypto/sha256-browser",
280287
"@aws-amplify/graphql-api-construct/@aws-crypto/sha256-js",
281288
"@aws-amplify/graphql-api-construct/@aws-crypto/supports-web-crypto",
282289
"@aws-amplify/graphql-api-construct/@aws-crypto/util",
283290
"@aws-amplify/graphql-api-construct/@aws-sdk/client-bedrock-runtime",
291+
"@aws-amplify/graphql-api-construct/@aws-sdk/eventstream-handler-node",
292+
"@aws-amplify/graphql-api-construct/@aws-sdk/middleware-eventstream",
284293
"@aws-amplify/graphql-api-construct/@aws-sdk/client-sso",
285294
"@aws-amplify/graphql-api-construct/@aws-sdk/client-sso-oidc",
286295
"@aws-amplify/graphql-api-construct/@aws-sdk/client-sts",
@@ -373,6 +382,7 @@
373382
"@aws-amplify/graphql-api-construct/immer",
374383
"@aws-amplify/graphql-api-construct/is-buffer",
375384
"@aws-amplify/graphql-api-construct/is-ci",
385+
"@aws-amplify/graphql-api-construct/json-schema-to-ts",
376386
"@aws-amplify/graphql-api-construct/jsonfile",
377387
"@aws-amplify/graphql-api-construct/libphonenumber-js",
378388
"@aws-amplify/graphql-api-construct/lodash",
@@ -382,8 +392,10 @@
382392
"@aws-amplify/graphql-api-construct/object-hash",
383393
"@aws-amplify/graphql-api-construct/path-expression-matcher",
384394
"@aws-amplify/graphql-api-construct/pluralize",
395+
"@aws-amplify/graphql-api-construct/regenerator-runtime",
385396
"@aws-amplify/graphql-api-construct/semver",
386397
"@aws-amplify/graphql-api-construct/strnum",
398+
"@aws-amplify/graphql-api-construct/ts-algebra",
387399
"@aws-amplify/graphql-api-construct/ts-dedent",
388400
"@aws-amplify/graphql-api-construct/tslib",
389401
"@aws-amplify/graphql-api-construct/universalify",

packages/amplify-data-construct/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@
5656
"@aws-amplify/graphql-validate-transformer",
5757
"@aws-amplify/platform-core",
5858
"@aws-amplify/plugin-types",
59+
"@babel/runtime",
5960
"@aws-crypto/crc32",
6061
"@aws-crypto/sha256-browser",
6162
"@aws-crypto/sha256-js",
6263
"@aws-crypto/supports-web-crypto",
6364
"@aws-crypto/util",
6465
"@aws-sdk/client-bedrock-runtime",
66+
"@aws-sdk/eventstream-handler-node",
67+
"@aws-sdk/middleware-eventstream",
6568
"@aws-sdk/client-sso",
6669
"@aws-sdk/client-sso-oidc",
6770
"@aws-sdk/client-sts",
@@ -154,6 +157,7 @@
154157
"immer",
155158
"is-buffer",
156159
"is-ci",
160+
"json-schema-to-ts",
157161
"jsonfile",
158162
"libphonenumber-js",
159163
"lodash",
@@ -163,8 +167,10 @@
163167
"object-hash",
164168
"path-expression-matcher",
165169
"pluralize",
170+
"regenerator-runtime",
166171
"semver",
167172
"strnum",
173+
"ts-algebra",
168174
"ts-dedent",
169175
"tslib",
170176
"universalify",
@@ -196,12 +202,15 @@
196202
"@aws-amplify/graphql-validate-transformer": "1.1.6",
197203
"@aws-amplify/platform-core": "^1.0.0",
198204
"@aws-amplify/plugin-types": "^1.0.0",
205+
"@babel/runtime": "^7.18.3",
199206
"@aws-crypto/crc32": "5.2.0",
200207
"@aws-crypto/sha256-browser": "5.2.0",
201208
"@aws-crypto/sha256-js": "^5.2.0",
202209
"@aws-crypto/supports-web-crypto": "^5.2.0",
203210
"@aws-crypto/util": "^5.2.0",
204211
"@aws-sdk/client-bedrock-runtime": "^3.622.0",
212+
"@aws-sdk/eventstream-handler-node": "^3.821.0",
213+
"@aws-sdk/middleware-eventstream": "^3.821.0",
205214
"@aws-sdk/client-sso": "3.637.0",
206215
"@aws-sdk/client-sso-oidc": "3.637.0",
207216
"@aws-sdk/client-sts": "^3.624.0",
@@ -294,6 +303,7 @@
294303
"immer": "^9.0.12",
295304
"is-buffer": "~1.1.6",
296305
"is-ci": "^3.0.1",
306+
"json-schema-to-ts": "^3.1.1",
297307
"jsonfile": "^4.0.0",
298308
"libphonenumber-js": "1.9.47",
299309
"lodash": "^4.17.23",
@@ -303,8 +313,10 @@
303313
"object-hash": "^3.0.0",
304314
"path-expression-matcher": "1.1.3",
305315
"pluralize": "8.0.0",
316+
"regenerator-runtime": "^0.14.0",
306317
"semver": "^7.6.3",
307318
"strnum": "^1.0.5",
319+
"ts-algebra": "^2.0.0",
308320
"ts-dedent": "^2.0.0",
309321
"tslib": "^2.6.2",
310322
"universalify": "^0.1.0",

packages/amplify-graphql-api-construct/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,15 @@
5757
"@aws-amplify/graphql-validate-transformer",
5858
"@aws-amplify/platform-core",
5959
"@aws-amplify/plugin-types",
60+
"@babel/runtime",
6061
"@aws-crypto/crc32",
6162
"@aws-crypto/sha256-browser",
6263
"@aws-crypto/sha256-js",
6364
"@aws-crypto/supports-web-crypto",
6465
"@aws-crypto/util",
6566
"@aws-sdk/client-bedrock-runtime",
67+
"@aws-sdk/eventstream-handler-node",
68+
"@aws-sdk/middleware-eventstream",
6669
"@aws-sdk/client-sso",
6770
"@aws-sdk/client-sso-oidc",
6871
"@aws-sdk/client-sts",
@@ -155,6 +158,7 @@
155158
"immer",
156159
"is-buffer",
157160
"is-ci",
161+
"json-schema-to-ts",
158162
"jsonfile",
159163
"libphonenumber-js",
160164
"lodash",
@@ -164,8 +168,10 @@
164168
"object-hash",
165169
"path-expression-matcher",
166170
"pluralize",
171+
"regenerator-runtime",
167172
"semver",
168173
"strnum",
174+
"ts-algebra",
169175
"ts-dedent",
170176
"tslib",
171177
"universalify",
@@ -196,12 +202,15 @@
196202
"@aws-amplify/graphql-validate-transformer": "1.1.6",
197203
"@aws-amplify/platform-core": "^1.0.0",
198204
"@aws-amplify/plugin-types": "^1.0.0",
205+
"@babel/runtime": "^7.18.3",
199206
"@aws-crypto/crc32": "5.2.0",
200207
"@aws-crypto/sha256-browser": "5.2.0",
201208
"@aws-crypto/sha256-js": "^5.2.0",
202209
"@aws-crypto/supports-web-crypto": "^5.2.0",
203210
"@aws-crypto/util": "^5.2.0",
204211
"@aws-sdk/client-bedrock-runtime": "^3.622.0",
212+
"@aws-sdk/eventstream-handler-node": "^3.821.0",
213+
"@aws-sdk/middleware-eventstream": "^3.821.0",
205214
"@aws-sdk/client-sso": "3.637.0",
206215
"@aws-sdk/client-sso-oidc": "3.637.0",
207216
"@aws-sdk/client-sts": "^3.624.0",
@@ -294,6 +303,7 @@
294303
"immer": "^9.0.12",
295304
"is-buffer": "~1.1.6",
296305
"is-ci": "^3.0.1",
306+
"json-schema-to-ts": "^3.1.1",
297307
"jsonfile": "^4.0.0",
298308
"libphonenumber-js": "1.9.47",
299309
"lodash": "^4.17.23",
@@ -303,8 +313,10 @@
303313
"object-hash": "^3.0.0",
304314
"path-expression-matcher": "1.1.3",
305315
"pluralize": "8.0.0",
316+
"regenerator-runtime": "^0.14.0",
306317
"semver": "^7.6.3",
307318
"strnum": "^1.0.5",
319+
"ts-algebra": "^2.0.0",
308320
"ts-dedent": "^2.0.0",
309321
"tslib": "^2.6.2",
310322
"universalify": "^0.1.0",

scripts/verify-construct-dependencies.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const EXCLUSION_PATHS: string[][] = [
3131
// plugin-types@1.12.0+ depends on @aws-cdk/toolkit-lib, but toolkit-lib is a dev/CLI
3232
// tool not needed at construct runtime. Exclude from bundling regardless of path.
3333
['@aws-amplify/plugin-types', '@aws-cdk/toolkit-lib'],
34-
['@aws-amplify/graphql-conversation-transformer', '@aws-amplify/ai-constructs', 'json-schema-to-ts'],
3534
];
3635

3736
const PACKAGES_DIR = 'packages';

shared-scripts.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,49 @@ function _verifyAmplifyBackendCompatability {
191191
npm update
192192
# Verify that the package-lock.json contains the updated version with localhost tarballs
193193
git diff package-lock.json | grep -Pz '@aws-amplify\/(graphql-api-construct|data-construct)[\s\S]*localhost:4873[\s\S]*tgz'
194+
195+
# Verify bundled dependency completeness (regression test for #3158)
196+
# Check that bundledDependencies includes all transitive deps of bundled packages
197+
echo "Verifying bundled dependency completeness..."
198+
node -e "
199+
const path = require('path');
200+
const fs = require('fs');
201+
202+
const constructs = [
203+
'node_modules/@aws-amplify/data-construct',
204+
'node_modules/@aws-amplify/graphql-api-construct'
205+
];
206+
const exclude = new Set(['aws-cdk-lib', 'constructs', '@aws-cdk/toolkit-lib']);
207+
208+
let missing = [];
209+
for (const constructPath of constructs) {
210+
if (!fs.existsSync(constructPath)) continue;
211+
const pkg = JSON.parse(fs.readFileSync(path.join(constructPath, 'package.json'), 'utf8'));
212+
const bundled = new Set(pkg.bundledDependencies || []);
213+
const nm = path.join(constructPath, 'node_modules');
214+
if (!fs.existsSync(nm)) continue;
215+
216+
for (const dep of bundled) {
217+
const depPkgPath = path.join(nm, dep, 'package.json');
218+
if (!fs.existsSync(depPkgPath)) continue;
219+
const depJson = JSON.parse(fs.readFileSync(depPkgPath, 'utf8'));
220+
for (const transitive of Object.keys(depJson.dependencies || {})) {
221+
if (!bundled.has(transitive) && !exclude.has(transitive)) {
222+
missing.push(pkg.name + ': ' + dep + ' requires ' + transitive + ' (not bundled)');
223+
}
224+
}
225+
}
226+
}
227+
228+
if (missing.length > 0) {
229+
console.error('ERROR: Missing bundled transitive dependencies:');
230+
missing.forEach(m => console.error(' ' + m));
231+
process.exit(1);
232+
} else {
233+
console.log('All bundled transitive dependencies are present.');
234+
}
235+
"
236+
194237
# Build and test the backend
195238
npm run build && npm run test
196239

0 commit comments

Comments
 (0)