Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(scripts): discover unused packages #6364

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Aug 6, 2024

script which prints out the dependency graph of packages

current output of packages and their dependents:

@aws-sdk/cloudfront-signer: ---- NONE ----
@aws-sdk/ec2-metadata-service: ---- NONE ----
@aws-sdk/karma-credential-loader: -- devtool --
@aws-sdk/middleware-api-key: ---- NONE ----
@aws-sdk/middleware-sdk-sts: ---- NONE ----
@aws-sdk/middleware-token: ---- NONE ----
@aws-sdk/polly-request-presigner: ---- NONE ----
@aws-sdk/rds-signer: ---- NONE ----
@aws-sdk/s3-presigned-post: ---- NONE ----
@aws-sdk/s3-request-presigner: ---- NONE ----
@aws-sdk/smithy-client: ---- NONE ----
@aws-sdk/util-create-request: ---- NONE ----
@aws-sdk/util-dns: ---- NONE ----
@aws-sdk/util-locate-window: ---- NONE ----
@aws-sdk/xhr-http-handler: ---- NONE ----
@aws-sdk/lib-dynamodb: ---- NONE ----
@aws-sdk/lib-storage: ---- NONE ----
@aws-sdk/body-checksum-browser: 
        @aws-sdk/client-glacier
@aws-sdk/body-checksum-node: 
        @aws-sdk/client-glacier
@aws-sdk/chunked-stream-reader-node: 
        @aws-sdk/body-checksum-node
@aws-sdk/credential-provider-cognito-identity: 
        @aws-sdk/credential-providers
@aws-sdk/endpoint-cache: 
        @aws-sdk/middleware-endpoint-discovery
@aws-sdk/middleware-expect-continue: 
        @aws-sdk/client-s3
@aws-sdk/middleware-flexible-checksums: 
        @aws-sdk/client-s3
@aws-sdk/middleware-location-constraint: 
        @aws-sdk/client-s3
@aws-sdk/middleware-sdk-api-gateway: 
        @aws-sdk/client-api-gateway
@aws-sdk/middleware-sdk-ec2: 
        @aws-sdk/client-ec2
@aws-sdk/middleware-sdk-glacier: 
        @aws-sdk/client-glacier
@aws-sdk/middleware-sdk-machinelearning: 
        @aws-sdk/client-machine-learning
@aws-sdk/middleware-sdk-route53: 
        @aws-sdk/client-route-53
@aws-sdk/middleware-sdk-s3-control: 
        @aws-sdk/client-s3-control
@aws-sdk/middleware-sdk-sqs: 
        @aws-sdk/client-sqs
@aws-sdk/middleware-sdk-transcribe-streaming: 
        @aws-sdk/client-transcribe-streaming
@aws-sdk/middleware-ssec: 
        @aws-sdk/client-s3
@aws-sdk/util-dynamodb: 
        @aws-sdk/lib-dynamodb
@aws-sdk/credential-provider-ini: 
        @aws-sdk/credential-provider-node
        @aws-sdk/credential-providers
@aws-sdk/credential-providers: 
        @aws-sdk/ec2-metadata-service
        @aws-sdk/rds-signer
@aws-sdk/middleware-bucket-endpoint: 
        @aws-sdk/middleware-sdk-s3-control
        @aws-sdk/client-s3
@aws-sdk/middleware-sdk-s3: 
        @aws-sdk/signature-v4-multi-region
        @aws-sdk/client-s3
@aws-sdk/middleware-signing: 
        @aws-sdk/middleware-sdk-sts
        @aws-sdk/middleware-websocket
@aws-sdk/middleware-websocket: 
        @aws-sdk/client-rekognitionstreaming
        @aws-sdk/client-transcribe-streaming
@aws-sdk/sha256-tree-hash: 
        @aws-sdk/body-checksum-browser
        @aws-sdk/body-checksum-node
@aws-sdk/signature-v4-crt: 
        @aws-sdk/client-eventbridge
        @aws-sdk/client-s3
@aws-sdk/credential-provider-env: 
        @aws-sdk/credential-provider-ini
        @aws-sdk/credential-provider-node
        @aws-sdk/credential-providers
@aws-sdk/credential-provider-http: 
        @aws-sdk/credential-provider-ini
        @aws-sdk/credential-provider-node
        @aws-sdk/credential-providers
@aws-sdk/credential-provider-process: 
        @aws-sdk/credential-provider-ini
        @aws-sdk/credential-provider-node
        @aws-sdk/credential-providers
@aws-sdk/credential-provider-sso: 
        @aws-sdk/credential-provider-ini
        @aws-sdk/credential-provider-node
        @aws-sdk/credential-providers
@aws-sdk/credential-provider-web-identity: 
        @aws-sdk/credential-provider-ini
        @aws-sdk/credential-provider-node
        @aws-sdk/credential-providers
@aws-sdk/middleware-endpoint-discovery: 
        @aws-sdk/client-dynamodb
        @aws-sdk/client-timestream-query
        @aws-sdk/client-timestream-write
@aws-sdk/middleware-sdk-rds: 
        @aws-sdk/client-docdb
        @aws-sdk/client-neptune
        @aws-sdk/client-rds
@aws-sdk/token-providers: 
        @aws-sdk/credential-provider-sso
        @aws-sdk/middleware-token
        @aws-sdk/client-codecatalyst
@aws-sdk/util-arn-parser: 
        @aws-sdk/middleware-bucket-endpoint
        @aws-sdk/middleware-sdk-s3
        @aws-sdk/middleware-sdk-s3-control
@aws-sdk/eventstream-handler-node: 
        @aws-sdk/client-lex-runtime-v2
        @aws-sdk/client-qbusiness
        @aws-sdk/client-rekognitionstreaming
        @aws-sdk/client-transcribe-streaming
@aws-sdk/middleware-eventstream: 
        @aws-sdk/client-lex-runtime-v2
        @aws-sdk/client-qbusiness
        @aws-sdk/client-rekognitionstreaming
        @aws-sdk/client-transcribe-streaming
@aws-sdk/xml-builder: 
        @aws-sdk/client-cloudfront
        @aws-sdk/client-route-53
        @aws-sdk/client-s3
        @aws-sdk/client-s3-control
@aws-sdk/signature-v4-multi-region: 
        @aws-sdk/s3-request-presigner
        @aws-sdk/signature-v4-crt
        @aws-sdk/client-cloudfront-keyvaluestore
        @aws-sdk/client-eventbridge
        @aws-sdk/client-s3
@aws-sdk/util-format-url: ** 8 packages **
@aws-sdk/credential-provider-node: ** 386 packages (clients) **
@aws-sdk/middleware-host-header: ** 386 packages (clients) **
@aws-sdk/middleware-logger: ** 386 packages (clients) **
@aws-sdk/middleware-recursion-detection: ** 386 packages (clients) **
@aws-sdk/middleware-user-agent: ** 386 packages (clients) **
@aws-sdk/region-config-resolver: ** 386 packages (clients) **
@aws-sdk/util-user-agent-browser: ** 386 packages (clients) **
@aws-sdk/core: ** 387 packages (clients) **
@aws-sdk/util-user-agent-node: ** 387 packages (clients) **
@aws-sdk/util-endpoints: ** 388 packages (clients) **
@aws-sdk/types: ** 441 packages (clients) **

Out of the list of packages with no dependents, they can be explained as such:

@aws-sdk/cloudfront-signer: ----public API ----
@aws-sdk/ec2-metadata-service: ----public API ----
@aws-sdk/polly-request-presigner: ----public API ----
@aws-sdk/rds-signer: ----public API ----
@aws-sdk/s3-presigned-post: ----public API ----
@aws-sdk/s3-request-presigner: ----public API ----
@aws-sdk/xhr-http-handler: ----public API ----
@aws-sdk/lib-dynamodb: ----public API ----
@aws-sdk/lib-storage: ----public API ----

@aws-sdk/util-create-request: ---- unused public API ----
@aws-sdk/util-dns: ---- unused internal API ??? ----
@aws-sdk/util-locate-window: ---- unused micro-function, public API ----

@aws-sdk/smithy-client: ---- needed by codegen ----

@aws-sdk/karma-credential-loader: -- devtool --
@aws-sdk/middleware-api-key: ---- deprecated by id&auth SRA, used in legacyAuth ----
@aws-sdk/middleware-sdk-sts: ---- deprecated by id&auth SRA, used in legacyAuth ----
@aws-sdk/middleware-token: ---- deprecated by id&auth SRA, used in legacyAuth ----

@kuhe kuhe requested a review from a team as a code owner August 6, 2024 20:30
@kuhe kuhe force-pushed the chore/check-unused-packages branch from e4e9e38 to 3b5f9aa Compare August 6, 2024 20:41
@kuhe kuhe merged commit 566b4c0 into aws:main Aug 7, 2024
5 checks passed
@kuhe kuhe deleted the chore/check-unused-packages branch August 7, 2024 15:17
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants