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

npx warp-drive retrofit types@canary doesn't remove DT packages #9527

Open
Windvis opened this issue Aug 29, 2024 · 0 comments
Open

npx warp-drive retrofit types@canary doesn't remove DT packages #9527

Windvis opened this issue Aug 29, 2024 · 0 comments

Comments

@Windvis
Copy link
Contributor

Windvis commented Aug 29, 2024

Reproduction

  1. Create a new TS project on Stackblitz: https://stackblitz.com/fork/github/ember-cli/editor-output/tree/stackblitz-app-output-typescript?title=Ember%20TypeScript%20Starter
  2. Run the command there

Description

I just tried out the npx warp-drive retrofit types@canary as documented here and I noticed that the DT packages weren't actually being removed.

I did some debugging and it seems there are multiple problems:

  1. This line is incorrect. DefinitelyTyped is an array of strings, so the array destructuring isn't needed there.
    for (const [pkgName] of DefinitelyTyped) {
  2. It seems that the pkg.dependencies and pkg.devDependencies are being replaced with new (sorted) versions. This also means that the deps and devDeps references no longer point to the same object, so the deletes don't affect the version that is written back to disk afterwards.
@github-project-automation github-project-automation bot moved this to needs triage in EmberData Aug 29, 2024
@Windvis Windvis changed the title npx warp-drive retrofit types@canary doesn't removed DT packages npx warp-drive retrofit types@canary doesn't remove DT packages Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: needs triage
Development

No branches or pull requests

1 participant