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

CLI tool adds unnecessary dependencies #536

Closed
ArtemSBulgakov opened this issue Mar 3, 2023 · 0 comments
Closed

CLI tool adds unnecessary dependencies #536

ArtemSBulgakov opened this issue Mar 3, 2023 · 0 comments

Comments

@ArtemSBulgakov
Copy link

Hello.

I've created a project and run deno run -A -r https://esm.sh init. import_map.json looks like:

{
  "imports": {},
  "scopes": {}
}

Then I add some dependencies deno task esm:add react react-dom. import_map.json looks like:

{
  "imports": {
    "react-dom": "https://esm.sh/v110/*react-dom@18.2.0",
    "react-dom/": "https://esm.sh/v110/*react-dom@18.2.0/",
    "react": "https://esm.sh/v110/react@18.2.0",
    "react/": "https://esm.sh/v110/react@18.2.0/"
  },
  "scopes": {
    "https://esm.sh/v110/": {
      "loose-envify": "https://esm.sh/v110/loose-envify@1.4.0",
      "scheduler": "https://esm.sh/v110/scheduler@0.23.0"
    }
  }
}

Then I update all dependencies deno task esm:update. Now the import_map.json has strange dependencies "react-dom/@18.2" and "react/@18.2":

{
  "imports": {
    "react-dom": "https://esm.sh/v110/*react-dom@18.2.0",
    "react-dom/": "https://esm.sh/v110/*react-dom@18.2.0/",
    "react-dom/@18.2": "https://esm.sh/v110/*react-dom@18.2.0/@18.2",
    "react": "https://esm.sh/v110/react@18.2.0",
    "react/": "https://esm.sh/v110/react@18.2.0/",
    "react/@18.2": "https://esm.sh/v110/react@18.2.0/@18.2"
  },
  "scopes": {
    "https://esm.sh/v110/": {
      "loose-envify": "https://esm.sh/v110/loose-envify@1.4.0",
      "scheduler": "https://esm.sh/v110/scheduler@0.23.0"
    }
  }
}

If I try to run update again deno task esm:update, it adds @18.2 again.

{
  "imports": {
    "react-dom": "https://esm.sh/v110/*react-dom@18.2.0",
    "react-dom/": "https://esm.sh/v110/*react-dom@18.2.0/",
    "react-dom/@18.2": "https://esm.sh/v110/*react-dom@18.2.0/@18.2",
    "react-dom/@18.2@18.2": "https://esm.sh/v110/*react-dom@18.2.0/@18.2@18.2",
    "react": "https://esm.sh/v110/react@18.2.0",
    "react/": "https://esm.sh/v110/react@18.2.0/",
    "react/@18.2": "https://esm.sh/v110/react@18.2.0/@18.2",
    "react/@18.2@18.2": "https://esm.sh/v110/react@18.2.0/@18.2@18.2"
  },
  "scopes": {
    "https://esm.sh/v110/": {
      "loose-envify": "https://esm.sh/v110/loose-envify@1.4.0",
      "scheduler": "https://esm.sh/v110/scheduler@0.23.0"
    }
  }
}
@ije ije closed this as completed in 8e12fd4 Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant