Skip to content

vue cli converts text files in not-utf8 encoding #5939

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

Open
jacekkarczmarczyk opened this issue Oct 9, 2020 · 1 comment
Open

vue cli converts text files in not-utf8 encoding #5939

jacekkarczmarczyk opened this issue Oct 9, 2020 · 1 comment
Labels

Comments

@jacekkarczmarczyk
Copy link

Version

4.5.7

Reproduction link

https://github.com/jacekkarczmarczyk/vue-cli-bug-files

Environment info

  System:
    OS: Windows 10 10.0.18362
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 12.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.19.0 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.10.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 85.0.4183.121
    Edge: Spartan (44.18362.449.0)
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-helper-vue-transform-on:  1.0.0-rc.2
    @vue/babel-plugin-jsx:  1.0.0-rc.3
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.5.7
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.5.7
    @vue/cli-plugin-babel: ~4.5.0 => 4.5.7
    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.7
    @vue/cli-plugin-router:  4.5.7
    @vue/cli-plugin-typescript: ~4.5.0 => 4.5.7
    @vue/cli-plugin-unit-jest: ~4.5.0 => 4.5.7
    @vue/cli-plugin-vuex:  4.5.7
    @vue/cli-service: ~4.5.0 => 4.5.7
    @vue/cli-shared-utils:  4.5.7
    @vue/component-compiler-utils:  3.2.0
    @vue/eslint-config-standard: ^5.1.2 => 5.1.2
    @vue/eslint-config-typescript: ^5.0.2 => 5.1.0
    @vue/preload-webpack-plugin:  1.1.2
    @vue/test-utils: ^1.0.3 => 1.1.0
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^6.2.2 => 6.2.2
    jest-serializer-vue:  2.0.2
    typescript: ~3.9.3 => 3.9.7
    vue: ^2.6.11 => 2.6.12
    vue-eslint-parser:  7.1.0
    vue-hot-reload-api:  2.3.4
    vue-jest:  3.0.7
    vue-loader:  15.9.3 (16.0.0-beta.8)
    vue-router:  3.4.6
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.11 => 2.6.12
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

clone repo, add a plugin (for example vue add router)

compare foo/three.ams file

image

What is expected?

file should remain unchanged

What is actually happening?

file is modified

@fangbinwei
Copy link
Collaborator

fangbinwei commented Oct 27, 2020

I believe this issue can be solved If CLI avoids overwriting the file which is not modified. But, I don't know if there are more complicated scenarios.

fangbinwei added a commit to fangbinwei/vue-cli that referenced this issue Oct 27, 2020
avoid overwriting the file which is not modified when executing `vue add/invoke`

re vuejs#5939
haoqunjiang pushed a commit that referenced this issue Dec 20, 2020
Avoid overwriting the file which is not modified when executing `vue add/invoke`
This will reduce the chance of encountering issues like #5939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants