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

extendPackage changes the order of the keys #3509

Closed
elevatebart opened this issue Feb 24, 2019 · 1 comment · Fixed by #3510
Closed

extendPackage changes the order of the keys #3509

elevatebart opened this issue Feb 24, 2019 · 1 comment · Fixed by #3510

Comments

@elevatebart
Copy link
Contributor

Version

3.4.1

Reproduction link

https://github.com/elevatebart/test-vue-lib

Environment info

MacOS, node 10, yarn 1.13

Steps to reproduce

When using the followin code in my plugin, I get changes on the order of keys in packages.json. It is very unsetling for users.

api.extendPackage({
    scripts: {
      styleguide: 'vue-cli-service styleguidist',
      'styleguide:build': 'vue-cli-service styleguidist:build'
    }
  })

What is expected?

I expect the extendPackages touches only what it is intended to and leves the rest alone.

What is actually happening?

The folloing keys are moved to the end of the file:
main, files, unpkg


Found while inverstigating vue-styleguidist/vue-cli-plugin-styleguidist#34

@elevatebart
Copy link
Contributor Author

peerDependencies is faulty here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants