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

Maintenance: Update deprecated dependencies #1915

Closed
1 of 2 tasks
Cupprum opened this issue Jan 15, 2024 · 3 comments
Closed
1 of 2 tasks

Maintenance: Update deprecated dependencies #1915

Cupprum opened this issue Jan 15, 2024 · 3 comments
Assignees
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) rejected This is something we will not be working on. At least, not in the measurable future

Comments

@Cupprum
Copy link

Cupprum commented Jan 15, 2024

Summary

When i execute the following command:

npm run setup-local

I can see the following output:

npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated @aws-sdk/[email protected]: The package @aws-sdk/util-base64-node has been renamed to @aws-sdk/util-base64. Please install the renamed package.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

Why is this needed?

In order to keep the codebase up to date these dependencies should be updated. This does not look nice when i as a user see that official package from AWS is showing warnings.

Which area does this relate to?

Other

Solution

I am happy to work on this issue and propose a PR.

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@Cupprum Cupprum added triage This item has not been triaged by a maintainer, please wait internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) labels Jan 15, 2024
@dreamorosi dreamorosi removed the triage This item has not been triaged by a maintainer, please wait label Jan 16, 2024
@dreamorosi dreamorosi self-assigned this Jan 16, 2024
@dreamorosi dreamorosi moved this from Triage to Closed in Powertools for AWS Lambda (TypeScript) Jan 16, 2024
@dreamorosi
Copy link
Contributor

Hi @Cupprum thank you for taking the time to open this issue.

After taking a look at the dependencies that you have listed, and that are mentioned in the warnings emitted when configuring the local development environment it appears that two out of three of these dependencies are transitive dependencies (aka brought in by some of our dependencies) and that are used only in the development environment.

As you can see from our package-lock.json file, both @npmcli/move-file and querystring are not direct dependencies:

  • @npmcli/move-file is brought into the development environment of the project via lerna > @npmcli/run-script> node-gyp > make-fetch-happen > cacache
  • querystring is brought into the development environment of the project via aws-sdk

Given that these are transitive dependencies of which we don't have direct control, I would recommend you to open an issue under the repositories of the project that list them directly as dependency - in this case lerna and aws-sdk respectively - to ask them to move to the newer versions.

The third dependency @aws-sdk/util-base64-node is used directly by the Idempotency and Parameters utility and has been left there intentionally. While the package has been marked as deprecated by the AWS SDK for JavaScript team, this is only due to a name change (@aws-sdk/util-base64).

The reason why we haven't moved our utilities to the new module is because some of the AWS Lambda managed runtimes for Node.js still bundle the older package (the one called @aws-sdk/util-base64-node) instead of the new one. Using the new one would require all customers using these two Powertools utilities to make sure that the new version (@aws-sdk/util-base64) is bundled or otherwise present in the Lambda execution environment.

We have noticed this a few months ago and looked at both the old and new package and the implementation has remained the same, so in an effort to offer a low friction adoption and usage for our customers we have opted to remain to the older one for the time being.

As already mentioned, the @npmcli/move-file and querystring are not used in the Powertools utilities that are published on npm and that eventually end up in your Lambda functions. The other dependency (@aws-sdk/util-base64-node) has been intentionally left as-is as explained above and we will continue to periodically check the Lambda managed runtime and update to @aws-sdk/util-base64 when it's safe to do so.

With the above in mind I'll be closing this issue and thank you again for opening the issue and for giving us the chance to document these warnings in this thread.

@dreamorosi dreamorosi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@dreamorosi dreamorosi added the rejected This is something we will not be working on. At least, not in the measurable future label Jan 16, 2024
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi moved this from Coming soon to Closed in Powertools for AWS Lambda (TypeScript) Jan 16, 2024
@Cupprum
Copy link
Author

Cupprum commented Jan 16, 2024

Thank you and i very much appreciate the transparency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) rejected This is something we will not be working on. At least, not in the measurable future
Projects
Development

No branches or pull requests

2 participants