optionalDevDependencies ingored

Open
#21 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript

Research direction

Start with the reported package.json and reproduce optional-dev-dependency @vue/cli-plugin-e2e-cypress using the exact optionalDevDependencies version shown. Trace the command's install and save handling; done means it installs 3.0.0-beta.6, leaves package.json unchanged without --save, and saves to optionalDevDependencies rather than dependencies when requested.

Written by the indexing model from the issue text.

Description

Hi. I have three separate problems, it's hard to split this into individual issues.

  1. In my package.json I have specified the exact version number:
  "optionalDevDependencies": {
    "@vue/cli-plugin-e2e-cypress": "3.0.0-beta.6"
  }

After running optional-dev-dependency @vue/cli-plugin-e2e-cypress I would expect 3.0.0-beta.6 version to be installed. The actual outcome is that the latest 3.0.5 installed.

  1. package.json becomes changed because @vue/cli-plugin-e2e-cypress is injected to dependencies:
   "dependencies": {
+    "@vue/cli-plugin-e2e-cypress": "^3.0.5",
     ...

I didn't use --save flag, package.json should not get changed.

  1. Even if --save somehow broken and enabled by default, the dependency should be saved in optionalDevDependencies, in the worst case in devDependencies, and for sure not in dependencies.
Dominant language
JavaScript
Stars
5
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bcoe/optional-dev-dependency

All issues in bcoe/optional-dev-dependency

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.