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

Update Yarn to v4 #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update Yarn to v4 #23

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 22, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
yarn (source) 3.2.0 -> 4.5.2 age adoption passing confidence

Release Notes

yarnpkg/berry (yarn)

v4.5.2

Compare Source

v4.5.1

Compare Source

v4.5.0

Compare Source

v4.4.1

Compare Source

v4.4.0

Compare Source

v4.3.1

Compare Source

v4.3.0

Compare Source

v4.2.2

Compare Source

v4.2.1

Compare Source

v4.2.0

Compare Source

v4.1.1

Compare Source

v4.1.0

Compare Source

  • Tweaks -,--verbose in yarn workspaces foreach; -v will now only print the prefixes, -vv will be necessary to also print the timings.

  • Adds a new --json option to yarn run when called without script name

  • Fixes node-modules linker link: dependencies mistreatment as inner workspaces, when they point to a parent folder of a workspace

  • Fixes spurious "No candidates found" errors

  • Fixes missing executable permissions when using nodeLinker: pnpm

  • Fixes packages being incorrectly flagged as optional

  • Fixes cache key corruptions due to uncontrolled git merges

  • Fixes yarn version apply --all --dry-run making unexpected changes

  • Fixes yarn npm login when the remote registry is Verdaccio

v4.0.2

Compare Source

v4.0.1

Compare Source

v4.0.0

Compare Source

Major Changes
  • With Node.js 16's now being End of Life'd, we dropped support for Node.js versions lower than 18.12.

  • Some important defaults have changed:

    • yarn set version will prefer using packageManager rather than yarnPath when possible.
    • yarn init will no longer use zero-install by default. You still can enable it, but it should make it easier to start one-of projects without having to rewrite the configuration afterwards.
    • yarn workspaces foreach now requires one of --all, --recursive, --since, or --worktree to be explicitly specified; the previous default was --worktree, but it was rarely what users expected.
  • All official Yarn plugins are now included by default in the bundle we provide. You no longer need to run yarn plugin import for official plugins (you still need to do it for third-party plugins, of course).

    • This doesn't change anything to the plugin API we provide, which will keep being maintained.
    • Yarn still has a modular architecture and uses the exact same APIs as contrib plugins; all that changes is how we distribute our own features.
  • Yarn's UI during installs has been greatly improved:

    • Packages added and removed from the lockfile are now explicitly reported.
    • Fluctuations in the project cache size are now reported as a single line.
    • Unactionable warnings (node-gyp and transitive peer dependency errors) have been removed.
    • Skipped builds are now only reported during initial installs and manual yarn rebuild calls.
    • The Yarn version is now displayed on installs to help us investigate issues when reported as screenshots.
    • Deprecation checks have been moved to yarn npm audit.
  • Some settings were renamed or removed:

    • caFilePath is now httpsCaFilePath
    • preferAggregateCacheInfo has been removed (it's now always on)
    • pnpDataPath has been removed to adhere to our new PnP specification. For consistency, all PnP files will now be hardcoded to a single value so that third-party tools can implement the PnP specification without relying on the Yarn configuration.
  • The yarn npm audit command has been reimplemented:

    • The audit registry must now implement the /-/npm/v1/security/advisories/bulk endpoint.
    • The npmAuditRegistry can be used to temporarily route audit queries to the npm registry.
    • Deprecations are now returned by default. To silence them, use yarn npm audit ! --no-deprecations.
  • Some legacy layers have been sunset:

    • Plugins cannot access the Clipanion 2 APIs anymore (upgrade to Clipanion 3)
    • Plugins cannot access the internal copy of Yup anymore (use Typanion instead)
    • Yarn will no longer remove the old Yarn 2.x .pnp.js file when migrating.
    • The --assume-fresh-project flag of yarn init has been removed.
API Changes

The following changes only affect people writing Yarn plugins:

  • The ZipFS and ZipOpenFS classes have been moved from @yarnpkg/fslib to @yarnpkg/libzip. They no longer need or accept the libzip parameter.

    • Reading the zip archives is now done on the Node.js side for performance; as a result, the open, ZIP_CREATE, and ZIP_TRUNCATE bindings are no longer needed for ZipFS and have also been removed.
  • The dependencies field sent returned by Resolver#resolve must now be the result of a Configuration#normalizeDependencyMap call. This change is prompted by a refactoring of how default protocols (ie npm:) are injected into descriptors. The previous implementation caused various descriptors to never be normalized, which made it difficult to know what were the descriptors each function should expect.

    • Similarly, the descriptors returned by Resolve#getResolutionDependencies are now expected to be the result of Configuration#normalizeDependency calls.

    • Note that this only applies to the dependencies field; the peerDependencies field is unchanged, as it must only contains semver ranges without any protocol (with an exception for workspace:, but that's not relevant here).

  • The Resolve#getResolutionDependencies function must now return an object of arbitrary string keys and descriptor values (instead of a map with DescriptorHash keys). Those descriptors will be resolved and assigned to the same keys as the initial object. This change allows resolvers to wrap resolution dependencies from other resolvers, which wasn't possible before since it'd have caused the key to change.

  • The generateLoader function in @yarnpkg/pnp no longer generates the $$SETUP_STATE function, it now needs to be present in the loader passed to the function.

  • The getCustomDataKey function in Installer from @yarnpkg/core has been moved to Linker.

  • renderForm's options argument is now required to enforce that custom streams are always specified.

  • npmConfigUtils.getAuditRegistry no longer takes a Manifest as its first argument.

  • The FetchOptions.skipIntegrityCheck option has been removed. Use FetchOptions.cacheOptions.skipIntegrityCheck instead.

  • MapConfigurationValue has been removed. Use miscUtils.ToMapValue instead.

  • Manifest.isManifestFieldCompatible and Manifest.prototype.isCompatibleWith{OS,CPU} have been removed. Use Manifest.prototype.getConditions and structUtils.isPackageCompatible instead.

  • versionUtils.{fetchBase,fetchRoot,fetchChangedFiles} have been moved from @yarnpkg/plugin-version to @yarnpkg/plugin-git. Use gitUtils.{fetchBase,fetchRoot,fetchChangedFiles} instead.

  • For consistency reasons:

    • Link{Resolver,Fetcher} have been renamed to Portal{Resolver,Fetcher}
    • RawLink{Resolver,Fetcher} have been renamed to Link{Resolver,Fetcher}
  • FakeFS classes are now required to implement lutimes{Sync,Promise}.

  • workspace.dependencies has been removed. Use workspace.anchoredPackage.dependencies instead.

  • The Installer class must now return BuildRequest structures instead of BuildDirective[]. This lets you mark that the build must be skipped, and the reason why.

  • startCacheReport has been removed, and is now part of the output generated by fetchEverything.

  • forgettableNames & forgettableBufferSize have been removed (the only messages using them have been removed, making the forgettable logs implementation obsolete).

  • workspace.locator has been removed. You can instead use:

    • workspace.anchoredLocator to get the locator that's used throughout the dependency tree.
    • workspace.manifest.version to get the workspace version.
  • configuration.{packageExtensions,refreshPackageExtensions} have been removed. Use configuration.getPackageExtensions instead.

  • configuration.normalizePackage now requires a packageExtensions option.

  • ProjectLookup has been removed. Both Configuration.find and Configuration.findProjectCwd now always do a lockfile lookup.

Installs
  • Yarn now caches npm version metadata, leading to faster resolution steps and decreased network data usage.
  • The pnpm linker avoids creating symlinks that lead to loops on the file system, by moving them higher up in the directory structure.
  • The pnpm linker no longer reports duplicate "incompatible virtual" warnings.
Features
  • enableOfflineMode is a new setting that, when set, will instruct Yarn to only use the metadata and archives already stored on the local machine rather than download them from the registry. This can be useful when performing local development under network-constrained environments (trains, planes, ...).
  • yarn run bin now injects the environment variables defined in .env.yarn when spawning a process. This can be configured using the injectEnvironmentFiles variable.
  • yarn workspaces foreach now automatically enables the yarn workspaces foreach ! --verbose flag in interactive terminals.
  • Constraints can now be written in JavaScript. See the revamped documentation for more information.
Bugfixes
  • yarn dlx will no longer report false-positive UNUSED_PACKAGE_EXTENSION warnings
  • yarn workspace will now set $INIT_CWD to the CLI working directory rather than the workspace root.
Shell
  • The builtin shell now supports whitespace-only commands.
Compatibility
  • The patched filesystem now supports FileHandle.readLines.
  • PnP now reports missing files when in watch mode.

v3.8.6

Compare Source

v3.8.5

Compare Source

v3.8.4

Compare Source

v3.8.3

Compare Source

v3.8.2

Compare Source

v3.8.1

Compare Source

v3.8.0

Compare Source

v3.7.0

Compare Source

v3.6.4

Compare Source

v3.6.3

Compare Source

v3.6.2

Compare Source

v3.6.1

Compare Source

v3.6.0

Compare Source

v3.5.1

Compare Source

v3.5.0

Compare Source

v3.4.1

Compare Source

  • Fixes an accidental backport error in yarn init.

v3.4.0

Compare Source

Node.js parity
  • PnP now supports the Node --conditions flag.
  • PnP now supports the Node --watch flag on Node 18 (it previously only supported it on Node 19).
Bugfixes
  • The PnP API module (pnpapi) can now be imported from ESM modules.
  • ZipFS.prototype.getBufferAndClose will not error on empty archives resulting from an unlink after write.
  • Fixes various issues around postinstall script inter-dependencies.
  • Removes the message prefixes (YN0000) from yarn workspaces foreach.
Compatibility
  • Updates the PnP compatibility layer for TypeScript v5.0.0-beta.

v3.3.1

Compare Source

v3.3.0

Compare Source

Installs
  • The node-modules linker avoids creation of circular symlinks
  • The node-modules linker no longer creates duplicate copies inside of aliased packages
  • The node-modules linker locates binaries correctly when the same version of the package is duplicated inside root workspace and another workspace
  • Improved performance for hardlinks-global node-modules linker mode by 1.5x
Compatibility
  • Updates the PnP compatibility layer for TypeScript v4.9.2-rc.

v3.2.4

Compare Source

Compatibility
  • The patched filesystem now supports fchown.
  • PnP now handles private import mappings.
  • Updates the PnP compatibility layer for TypeScript v4.8.4 and v4.9.1-beta.
  • PnP now reports loaded modules when in watch mode.

v3.2.3

Compare Source

Bugfixes
  • When Corepack is enabled Yarn will now use the current CLI to prepare external Yarn classic projects, matching the behaviour of when Corepack is disabled.
Compatibility
  • Updates the PnP compatibility layer for TypeScript 4.8.1-rc
  • The ESM loader now supports unflagged JSON modules.

v3.2.2

Compare Source

Compatibility
  • The patched filesystem now supports ftruncate.
  • The patched filesystem now supports fchmod.
  • The patched filesystem now supports throwIfNoEntry.
  • The PnP filesystem now handles most of the FileHandle methods
  • Updates the PnP compatibility layer for TypeScript 4.8 Beta
  • The npm_package_json environment variable is now set by Yarn.

v3.2.1

Compare Source

Installs
  • The pnpm linker no longer tries to remove node_modules directory, when node-modules linker is active
  • The node-modules linker does not fail anymore if portal dependency points to an external project with multiple interdependent workspaces
  • The node-modules linker has received various improvements:
    • applies hoisting algorithm on aliased dependencies
    • reinstalls modules that have their directories removed from node_modules by the user
    • improves portal hoisting
    • supports supportedArchitectures
Bugfixes
  • The PnP ESM loader is now able to handle symlinked extensionless entrypoints.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Contributor Author

renovate bot commented Oct 22, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22762
    throw new Error(
          ^

Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at fetch (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22762:11)
    at async fetchAsJson (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22776:20)
    ... 4 lines matching cause stack trace ...
    at async Object.runMain (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:24232:5) {
  [cause]: TypeError: globalThis.fetch is not a function
      at fetch (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22756:33)
      at async fetchAsJson (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22776:20)
      at async fetchLatestStableVersion (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22703:20)
      at async fetchLatestStableVersion2 (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22826:14)
      at async Engine.getDefaultVersion (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:23433:23)
      at async Engine.executePackageManagerRequest (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:23525:47)
      at async Object.runMain (/opt/containerbase/tools/corepack/0.28.0/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:24232:5)
}

@netlify
Copy link

netlify bot commented Oct 22, 2023

Deploy Preview for redwood-planetscale-example failed. Why did it fail? →

Name Link
🔨 Latest commit 448cecd
🔍 Latest deploy log https://app.netlify.com/sites/redwood-planetscale-example/deploys/67400d60df05400008610e19

@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from 23fc218 to ecdbaa0 Compare October 28, 2023 16:26
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from ecdbaa0 to 3de4f06 Compare November 14, 2023 12:04
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from 3de4f06 to 53d3e54 Compare January 30, 2024 17:01
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from 53d3e54 to 178ff01 Compare March 5, 2024 01:48
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch 2 times, most recently from 9380376 to e6c045c Compare May 8, 2024 19:43
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from e6c045c to 2cc4133 Compare June 10, 2024 19:25
Copy link
Contributor Author

renovate bot commented Jun 10, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21609
    throw new Error(
          ^

Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at fetch (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21609:11)
    at async fetchAsJson (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21623:20)
    ... 4 lines matching cause stack trace ...
    at async Object.runMain (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:23096:5) {
  [cause]: TypeError: globalThis.fetch is not a function
      at fetch (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21603:33)
      at async fetchAsJson (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21623:20)
      at async fetchLatestStableVersion (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21550:20)
      at async fetchLatestStableVersion2 (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21672:14)
      at async Engine.getDefaultVersion (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22292:23)
      at async Engine.executePackageManagerRequest (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22390:47)
      at async Object.runMain (/opt/containerbase/tools/corepack/0.29.4/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:23096:5)
}

@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from 2cc4133 to 5343ccb Compare June 21, 2024 09:15
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from 5343ccb to d5b9c52 Compare August 2, 2024 23:03
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from d5b9c52 to b1f09c0 Compare August 24, 2024 20:58
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from b1f09c0 to fc7d654 Compare September 14, 2024 16:37
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from fc7d654 to 38c0f06 Compare October 18, 2024 16:43
@renovate renovate bot force-pushed the renovate/major-yarn-monorepo branch from 38c0f06 to 448cecd Compare November 22, 2024 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants