-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[build-utils] change default package manager when no lockfile detected from yarn
to npm
(gated behind feature flag)
#11131
Conversation
🦋 Changeset detectedLatest commit: f847681 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
yarn
to npm
yarn
to npm
(gated behind feature flag)
); | ||
runNpmInstallSema.release(); | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this change was required because yarn somehow allowed us to run yarn install
, even if there was no package.json
but npm install
will throw.
This might end up being a tiny perf improvement for the case when no package.json is found since we then won't need to invoke a package manager at all.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @vercel/build-utils@7.6.0 ### Minor Changes - Revert "Default ruby to only currently supported version (3.2.0)" ([#11135](#11135)) - Mark `flags` as deprecated and replace them with `variants` ([#11098](#11098)) - [build-utils] change default package manager when no lockfile detected from `yarn` to `npm` (gated behind feature flag) ([#11131](#11131)) ### Patch Changes - Update internal type for variants ([#11111](#11111)) ## vercel@33.5.0 ### Minor Changes - Mark `flags` as deprecated and replace them with `variants` ([#11098](#11098)) ### Patch Changes - Updated dependencies \[[`c32a909af`](c32a909), [`b6ed28b9b`](b6ed28b), [`d21bb9f87`](d21bb9f), [`4027a1833`](4027a18), [`8ba0ce932`](8ba0ce9), [`0d034b682`](0d034b6), [`abaa700ce`](abaa700), [`3bad73401`](3bad734)]: - @vercel/next@4.1.1 - @vercel/node@3.0.18 - @vercel/redwood@2.0.7 - @vercel/remix-builder@2.0.19 - @vercel/build-utils@7.6.0 - @vercel/static-build@2.3.0 ## @vercel/static-build@2.3.0 ### Minor Changes - Revert "Default ruby to only currently supported version (3.2.0)" ([#11135](#11135)) ### Patch Changes - Updated dependencies \[[`ab2444466`](ab24444)]: - @vercel/gatsby-plugin-vercel-builder@2.0.17 ## @vercel/client@13.1.2 ### Patch Changes - Updated dependencies \[[`b6ed28b9b`](b6ed28b), [`8ba0ce932`](8ba0ce9), [`0d034b682`](0d034b6), [`abaa700ce`](abaa700)]: - @vercel/build-utils@7.6.0 ## @vercel/gatsby-plugin-vercel-builder@2.0.17 ### Patch Changes - [gatsby-plugin-vercel-builder] use --keep-names esbuild flag ([#11117](#11117)) - Updated dependencies \[[`b6ed28b9b`](b6ed28b), [`8ba0ce932`](8ba0ce9), [`0d034b682`](0d034b6), [`abaa700ce`](abaa700)]: - @vercel/build-utils@7.6.0 ## @vercel/next@4.1.1 ### Patch Changes - [node][next][redwood][remix] bump `@vercel/nft@0.26.3` ([#11115](#11115)) - Load common chunks on module initialization ([#11126](#11126)) - Fix index normalizing for app outputs ([#11099](#11099)) - Mark `flags` as deprecated and replace them with `variants` ([#11098](#11098)) - Fix rewrite RSC handling with trailingSlash ([#11107](#11107)) ## @vercel/node@3.0.18 ### Patch Changes - [node][next][redwood][remix] bump `@vercel/nft@0.26.3` ([#11115](#11115)) - Updated dependencies \[[`b6ed28b9b`](b6ed28b), [`8ba0ce932`](8ba0ce9), [`0d034b682`](0d034b6), [`abaa700ce`](abaa700)]: - @vercel/build-utils@7.6.0 ## @vercel/redwood@2.0.7 ### Patch Changes - [node][next][redwood][remix] bump `@vercel/nft@0.26.3` ([#11115](#11115)) ## @vercel/remix-builder@2.0.19 ### Patch Changes - [node][next][redwood][remix] bump `@vercel/nft@0.26.3` ([#11115](#11115)) ## @vercel-internals/types@1.0.22 ### Patch Changes - Updated dependencies \[[`b6ed28b9b`](b6ed28b), [`8ba0ce932`](8ba0ce9), [`0d034b682`](0d034b6), [`abaa700ce`](abaa700)]: - @vercel/build-utils@7.6.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ependency (#63321) ## History Previously, we added support for `squoosh` because it was a wasm implementation that "just worked" on all platforms when running `next dev` for the first time. However, it was slow so we always recommended manually installing `sharp` for production use cases running `next build` and `next start`. Now that [`sharp` supports webassembly](https://sharp.pixelplumbing.com/install#webassembly), we no longer need to maintain `squoosh`, so it can be removed. We also don't need to make the user install sharp manually because it can be installed under `optionalDependencies`. I left it optional in case there was some platform that still needed to manually install the wasm variant with `npm install --cpu=wasm32 sharp` such as codesandbox/stackblitz (I don't believe sharp has any fallback built in yet). Since we can guarantee `sharp`, we can also remove `get-orientation` dep and upgrade `image-size` dep. I also moved an [existing `sharp` test](#56674) into its own fixture since it was unrelated to image optimization. ## Related Issues - Fixes #41417 - Related #54670 - Related #54708 - Related #44804 - Related #48820 - Related #61810 - Related #61696 - Related #44685 - Closes #64362 ## Breaking Change This is a breaking change because newer versions of `sharp` no longer support `yarn@1`. - lovell/sharp#3750 The workaround is to install with `yarn --ignore-engines` flag. Also note that Vercel no longer defaults to yarn when no lockfile is found - vercel/vercel#11131 - vercel/vercel#11242 Closes NEXT-2823
This PR changes the default package manager from
yarn
tonpm
in the case that no lockfile is present.Many years ago when
yarn
was first released, it was much faster thannpm
so we used it by default. That is no longer the case today andyarn@1
is no longer receiving new features.For example,
sharp
andesbuild
no longer works withyarn@1
:Related
Note that this change will not impact most projects because most used a lockfile.