yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.45k stars 2.73k forks source link

Case of package directory not respected on update. #5708

Open tdmartinalonso opened 6 years ago

tdmartinalonso commented 6 years ago

We have a package where one of the directories just changed casing, from "fonts" to "Fonts" npm and the tgz file respect the new casing, but when I use yarn install the name of the directory is not changed to the new casing, but remains as lowercase. I expect yarn to respect the casing of the package.

on Windows 10, node 9.11.1, yarn 1.5.1

rally25rs commented 6 years ago

We have code to handle this https://github.com/yarnpkg/yarn/blob/master/src/util/fs-normalized.js#L34-L47 for files by just deleting the previous file before copying the new one.

Although... that probably only works for files that change case, not directories. 😞

@tdmartinalonso do you have a specific package that we can use to recreate this? Or was it a private package?

tdmartinalonso commented 6 years ago

It is a private package, I am sorry

tdmartinalonso commented 6 years ago

I could put something together fairly easy for you though

rally25rs commented 6 years ago

@tdmartinalonso that probably isn't necessary. It's just easier to write a unit test against an existing public package. I appreciate the offer though. Would you have the time and willingness to try to make a PR to resolve this?

tdmartinalonso commented 6 years ago

Ok, I'll look into it later this week as I am busy with other stuff right now.