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

Use .yml as extension for the YAML files #1380

Closed
zkochan opened this issue Sep 20, 2018 · 6 comments
Closed

Use .yml as extension for the YAML files #1380

zkochan opened this issue Sep 20, 2018 · 6 comments

Comments

@zkochan
Copy link
Member

zkochan commented Sep 20, 2018

pnpm currently deals with a few YAML files:

  • shrinkwrap.yaml
  • pnpm-workspace.yaml
  • node_modules/.modules.yaml

However, most toolings use the .yml extension for YAML files. (appveyor.yml
, .travis.yml, docker-compose.yml, etc)

I think it would be better to use this more widespread convention even though the official docs of yaml recommend using the .yaml extension (http://yaml.org/faq.html)

Of course, this would be a breaking change, so we can discuss also renaming those config files

@KSXGitHub
Copy link
Contributor

KSXGitHub commented Sep 21, 2018

.yml vs .yaml is a bikeshedding problem, it's like tabs vs spaces, everyone can discuss it, but the discussion never end.

This would not only break previous pnpm versions, but also break tools that are used to detect pnpm files. Unless there're some big benefits of using .yml over .yaml that outweighs breaking the ecosystem, let's just stick with .yaml.

... Let's say that we ignore breaking changes, I would prefer .json over both because these files are generated by machine, not meant to be written by human.

@zkochan
Copy link
Member Author

zkochan commented Feb 25, 2019

We decided to rename shrinkwrap.yaml to pnpm-lock.yml, so we'll also update the extensions to .yml in pnpm v3.

By the way, yarn is also switching to the YAML format but they'll keep the old file name (yarn.lock)

@KSXGitHub
Copy link
Contributor

What about other existing files (such as pnpm-workspace.yaml)? Are you going to break them too?

It is common sense to avoid unnecessary breaking changes.

I don't see "widespread convention" as a good enough reason.

@zkochan
Copy link
Member Author

zkochan commented Feb 25, 2019

the only other file is pnpm-workspace.yaml

so you'd recommend to name the file pnpm-lock.yaml?

@KSXGitHub
Copy link
Contributor

KSXGitHub commented Feb 25, 2019

so you'd recommend to name the file pnpm-lock.yaml?

I do like pnpm-lock.yaml, I also like pnpm.lock, the choice is yours.

Anyway, I only wish to not change the file extension from .yaml to .yml unless there is a good enough reason.

@zkochan
Copy link
Member Author

zkochan commented Mar 4, 2019

Due to lack of activity, I am closing this issue. We keep the .yaml extension in pnpm v3

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

No branches or pull requests

2 participants