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

Missing down-leveled declarations (dist-types/ts3.4) #3297

Closed
RomainMuller opened this issue Feb 10, 2022 · 4 comments · Fixed by #3334
Closed

Missing down-leveled declarations (dist-types/ts3.4) #3297

RomainMuller opened this issue Feb 10, 2022 · 4 comments · Fixed by #3334
Labels
bug This issue is a bug.

Comments

@RomainMuller
Copy link

Hello,

The tarball of @aws-sdk/[email protected] has the following types versions declaration:

"typesVersions": {
  "<4.0": {
    "dist-types/*": [
      "dist-types/ts3.4/*"
    ]
  }
}

However the tarball does not contain a dist-types/ts3.4 directory, making this library impossible to use with TypeScript versions earlier than 4.0.


$ npm pack @aws-sdk/types
npm notice
npm notice 📦  @aws-sdk/[email protected]
npm notice === Tarball Contents ===
npm notice 81.1kB CHANGELOG.md
npm notice 11.4kB LICENSE
npm notice 252B   README.md
npm notice 77B    dist-cjs/abort.js
npm notice 77B    dist-cjs/client.js
npm notice 77B    dist-cjs/command.js
npm notice 77B    dist-cjs/credentials.js
npm notice 77B    dist-cjs/crypto.js
npm notice 77B    dist-cjs/eventStream.js
npm notice 77B    dist-cjs/http.js
npm notice 1.0kB  dist-cjs/index.js
npm notice 77B    dist-cjs/logger.js
npm notice 77B    dist-cjs/middleware.js
npm notice 77B    dist-cjs/pagination.js
npm notice 77B    dist-cjs/response.js
npm notice 77B    dist-cjs/serde.js
npm notice 77B    dist-cjs/shapes.js
npm notice 77B    dist-cjs/signature.js
npm notice 77B    dist-cjs/transfer.js
npm notice 77B    dist-cjs/util.js
npm notice 77B    dist-cjs/waiter.js
npm notice 11B    dist-es/abort.js
npm notice 11B    dist-es/client.js
npm notice 11B    dist-es/command.js
npm notice 11B    dist-es/credentials.js
npm notice 11B    dist-es/crypto.js
npm notice 11B    dist-es/eventStream.js
npm notice 11B    dist-es/http.js
npm notice 462B   dist-es/index.js
npm notice 11B    dist-es/logger.js
npm notice 11B    dist-es/middleware.js
npm notice 11B    dist-es/pagination.js
npm notice 11B    dist-es/response.js
npm notice 11B    dist-es/serde.js
npm notice 11B    dist-es/shapes.js
npm notice 11B    dist-es/signature.js
npm notice 11B    dist-es/transfer.js
npm notice 11B    dist-es/util.js
npm notice 11B    dist-es/waiter.js
npm notice 1.4kB  dist-types/abort.d.ts
npm notice 1.6kB  dist-types/client.d.ts
npm notice 542B   dist-types/command.d.ts
npm notice 647B   dist-types/credentials.d.ts
npm notice 1.7kB  dist-types/crypto.d.ts
npm notice 2.7kB  dist-types/eventStream.d.ts
npm notice 3.1kB  dist-types/http.d.ts
npm notice 462B   dist-types/index.d.ts
npm notice 786B   dist-types/logger.d.ts
npm notice 15.6kB dist-types/middleware.d.ts
npm notice 428B   dist-types/pagination.d.ts
npm notice 950B   dist-types/response.d.ts
npm notice 1.6kB  dist-types/serde.d.ts
npm notice 1.6kB  dist-types/shapes.d.ts
npm notice 3.8kB  dist-types/signature.d.ts
npm notice 623B   dist-types/transfer.d.ts
npm notice 3.5kB  dist-types/util.d.ts
npm notice 1.1kB  dist-types/waiter.d.ts
npm notice 1.3kB  package.json
npm notice === Tarball Details ===
npm notice name:          @aws-sdk/types
npm notice version:       3.50.0
npm notice filename:      @aws-sdk/types-3.50.0.tgz
npm notice package size:  23.5 kB
npm notice unpacked size: 139.1 kB
npm notice shasum:        87b7679901129f5989d7da8b44364bf6a9ff8722
npm notice integrity:     sha512-ANj9L+lR4NWWS[...]sKuTyNmSvoZCA==
npm notice total files:   58
npm notice
aws-sdk-types-3.50.0.tgz
@RomainMuller RomainMuller added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 10, 2022
@trivikr
Copy link
Member

trivikr commented Feb 10, 2022

This happened as the script to downlevel types was not being run while building npm artifacts in our new release automation system.

We've fixed that issue in internal scripts, and downlevel types will be released with v3.51.0 expected to be released on Friday 02/11. We've also taken a backlog item to run downlevel script in prepublishOnly script, which we couldn't do in old release automation system because of some limitations.

@trivikr trivikr removed the needs-triage This issue or PR still needs to be triaged. label Feb 10, 2022
@trivikr
Copy link
Member

trivikr commented Feb 10, 2022

ToDo: Verify if downlevel types present after v3.51.0 release.

@trivikr
Copy link
Member

trivikr commented Feb 14, 2022

ToDo: Verify if downlevel types present after v3.51.0 release.

Verified that downlevel-types are available in v3.51.0 release of @aws-sdk/client-s3

$ yarn add @aws-sdk/[email protected] --exact

$ ls node_modules/@aws-sdk/client-s3/dist-types 
commands        index.d.ts  pagination  runtimeConfig.browser.d.ts  runtimeConfig.native.d.ts  S3Client.d.ts  ts3.4
endpoints.d.ts  models      protocols   runtimeConfig.d.ts          runtimeConfig.shared.d.ts  S3.d.ts        waiters

However, the the downlevel types are missing in @aws-sdk/types as it's v3.51.0 version was not released because of lack of commits.

$ ls node_modules/@aws-sdk/types/dist-types 
abort.d.ts   command.d.ts      crypto.d.ts       http.d.ts   logger.d.ts      pagination.d.ts  serde.d.ts   signature.d.ts  util.d.ts
client.d.ts  credentials.d.ts  eventStream.d.ts  index.d.ts  middleware.d.ts  response.d.ts    shapes.d.ts  transfer.d.ts   waiter.d.ts

ToDo: Push a commit in all packages so that v3.52.0 is released with downlevel types.
As of now, the workaround is to use v3.49.0 versions with older versions of TypeScript.

@github-actions
Copy link

github-actions bot commented Mar 5, 2022

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 Mar 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants