datacore icon indicating copy to clipboard operation
datacore copied to clipboard

[Request] Bundle yarn or specific version in package.json

Open SettingDust opened this issue 2 years ago • 8 comments

Seems my yarn 3 break the lock file when import the project

SettingDust avatar Aug 06 '23 13:08 SettingDust

I think the current lockfile was generated with Yarn classic (v1), not Berry (v2/v3).

GNRSN avatar Aug 08 '23 06:08 GNRSN

I think the current lockfile was generated with Yarn classic (v1), not Berry (v2/v3).

ya

SettingDust avatar Aug 08 '23 07:08 SettingDust

It's not really possible to "bundle" a package-manager with a repo. Corepack will adress this but it's still in an experimental stage the requires opt-in so it's not really feasible for real use as you can't expect developers to have it enabled.

The established "solution" OSS is afaik to document the package-manager used under the contributing section of the readme.md.

GNRSN avatar Aug 08 '23 09:08 GNRSN

It's not really possible to "bundle" a package-manager with a repo. Corepack will adress this but it's still in an experimental stage the requires opt-in so it's not really feasible for real use as you can't expect developers to have it enabled.

The established "solution" OSS is afaik to document the package-manager used under the contributing section of the readme.md.

False. https://yarnpkg.com/features/zero-installs

SettingDust avatar Aug 08 '23 09:08 SettingDust

Why do something like this? Every package manager should work, no?

And if another package manager changes the package-lock.json, just don't include the changes in the commit.

mProjectsCode avatar Aug 08 '23 10:08 mProjectsCode

Why do something like this? Every package manager should work, no?

And if another package manager changes the package-lock.json, just don't include the changes in the commit.

In some situation package url will different with the same package manifest.

SettingDust avatar Aug 08 '23 11:08 SettingDust

False. https://yarnpkg.com/features/zero-installs

I stand corrected, however that's a "feature" of Yarn Berry that also requires the PnP feature of Yarn Berry to be utilised.

GNRSN avatar Aug 08 '23 12:08 GNRSN

False. yarnpkg.com/features/zero-installs

I stand corrected, however that's a "feature" of Yarn Berry that also requires the PnP feature of Yarn Berry to be utilised.

Noop. It's a feature of yarn. And needn't pnp. PnP is for actually zero install. But specific the yarn version or bundle the yarn is what I said

Which just need yarn set version <version>.

SettingDust avatar Aug 08 '23 23:08 SettingDust