Skip to content

Upgrade to Yarn 4#1954

Merged
hshoff merged 4 commits intomasterfrom
hshoff-yarn4
Nov 4, 2025
Merged

Upgrade to Yarn 4#1954
hshoff merged 4 commits intomasterfrom
hshoff-yarn4

Conversation

@hshoff
Copy link
Member

@hshoff hshoff commented Nov 4, 2025

💥 Breaking Changes

  • yarn: update to use workspace protocol. lerna 7 should handle this already at publish time
  • vendor: nohoist => installConfig.hoistingLimits: "workspaces"

🏠 Internal

  • yarn: update to yarn 4.
  • deps: removed unused husky@3.0.0 dependency
  • workflows: Updated to use yarn 4 + corepack
    • Added Corepack enable step
    • Changed yarn cache dir → yarn config get cacheFolder
    • Changed --frozen-lockfile → --immutable

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Size Changes

Package Diff ESM Prev ESM CJS Prev CJS
visx-axis +0.1% 20.22 KB 20.19 KB 24.53 KB 24.5 KB
visx-chord +0.2% 2.6 KB 2.59 KB 3.29 KB 3.29 KB
visx-clip-path +0.5% 3.31 KB 3.3 KB 4.31 KB 4.29 KB
visx-delaunay +0.3% 2.25 KB 2.25 KB 2.96 KB 2.96 KB
visx-geo +0.1% 12.16 KB 12.15 KB 15.05 KB 15.04 KB
visx-glyph +0.4% 11.88 KB 11.83 KB 15.32 KB 15.27 KB
visx-gradient +0.5% 15.13 KB 15.06 KB 19.03 KB 18.96 KB
visx-grid +0.2% 16.29 KB 16.26 KB 19.39 KB 19.36 KB
visx-group +0.5% 1.22 KB 1.22 KB 1.64 KB 1.64 KB
visx-heatmap +0.2% 6.25 KB 6.24 KB 7.11 KB 7.1 KB
visx-legend +0.2% 23.36 KB 23.32 KB 28.47 KB 28.59 KB
visx-marker +0.4% 7.65 KB 7.62 KB 9.45 KB 9.42 KB
visx-network +0.1% 4.03 KB 4.02 KB 5.77 KB 5.77 KB
visx-react-spring +0.2% 12.81 KB 12.79 KB 15.76 KB 15.89 KB
visx-responsive +0.0% 15.08 KB 15.08 KB 17.03 KB 17.02 KB
visx-shape +0.2% 79.86 KB 79.69 KB 99.75 KB 99.9 KB
visx-stats +0.0% 12.57 KB 12.56 KB 13.65 KB 13.64 KB
visx-text +0.1% 8.11 KB 8.1 KB 9.58 KB 9.56 KB
visx-tooltip +0.2% 13.61 KB 13.58 KB 18.01 KB 18.47 KB
visx-voronoi +0.3% 1.97 KB 1.96 KB 2.56 KB 2.55 KB
visx-wordcloud +0.2% 2.37 KB 2.36 KB 3.12 KB 3.11 KB
visx-xychart +0.1% 167.55 KB 167.39 KB 211.47 KB 215.53 KB
visx-zoom +0.8% 15.63 KB 15.51 KB 17.85 KB 17.89 KB

Compared to master. File sizes are unminified and ungzipped.

View raw build stats

Previous (master)

{
  "visx-annotation": {
    "esm": 28559,
    "lib": 37653
  },
  "visx-axis": {
    "esm": 20679,
    "lib": 25089
  },
  "visx-bounds": {
    "esm": 2662,
    "lib": 3136
  },
  "visx-brush": {
    "esm": 52910,
    "lib": 55762
  },
  "visx-chord": {
    "esm": 2657,
    "lib": 3367
  },
  "visx-clip-path": {
    "esm": 3376,
    "lib": 4397
  },
  "visx-curve": {
    "esm": 323,
    "lib": 1462
  },
  "visx-delaunay": {
    "esm": 2299,
    "lib": 3029
  },
  "visx-demo": {
    "esm": 0,
    "lib": 0
  },
  "visx-drag": {
    "esm": 12368,
    "lib": 13865
  },
  "visx-event": {
    "esm": 3815,
    "lib": 5091
  },
  "visx-geo": {
    "esm": 12438,
    "lib": 15396
  },
  "visx-glyph": {
    "esm": 12117,
    "lib": 15641
  },
  "visx-gradient": {
    "esm": 15424,
    "lib": 19410
  },
  "visx-grid": {
    "esm": 16648,
    "lib": 19823
  },
  "visx-group": {
    "esm": 1245,
    "lib": 1675
  },
  "visx-heatmap": {
    "esm": 6387,
    "lib": 7266
  },
  "visx-hierarchy": {
    "esm": 10161,
    "lib": 14656
  },
  "visx-legend": {
    "esm": 23878,
    "lib": 29277
  },
  "visx-marker": {
    "esm": 7804,
    "lib": 9643
  },
  "visx-mock-data": {
    "esm": 326036,
    "lib": 329336
  },
  "visx-network": {
    "esm": 4118,
    "lib": 5907
  },
  "visx-pattern": {
    "esm": 9161,
    "lib": 11621
  },
  "visx-point": {
    "esm": 1003,
    "lib": 1781
  },
  "visx-react-spring": {
    "esm": 13095,
    "lib": 16276
  },
  "visx-responsive": {
    "esm": 15441,
    "lib": 17433
  },
  "visx-sankey": {
    "esm": 3278,
    "lib": 4160
  },
  "visx-scale": {
    "esm": 19205,
    "lib": 30251
  },
  "visx-shape": {
    "esm": 81601,
    "lib": 102299
  },
  "visx-stats": {
    "esm": 12862,
    "lib": 13971
  },
  "visx-text": {
    "esm": 8297,
    "lib": 9794
  },
  "visx-threshold": {
    "esm": 2386,
    "lib": 2946
  },
  "visx-tooltip": {
    "esm": 13910,
    "lib": 18915
  },
  "visx-vendor": {
    "esm": 2492,
    "lib": 2702
  },
  "visx-visx": {
    "esm": 1524,
    "lib": 4155
  },
  "visx-voronoi": {
    "esm": 2007,
    "lib": 2615
  },
  "visx-wordcloud": {
    "esm": 2417,
    "lib": 3186
  },
  "visx-xychart": {
    "esm": 171410,
    "lib": 220698
  },
  "visx-zoom": {
    "esm": 15880,
    "lib": 18321
  }
}

Current

{
  "visx-annotation": {
    "esm": 28559,
    "lib": 36491
  },
  "visx-axis": {
    "esm": 20709,
    "lib": 25119
  },
  "visx-bounds": {
    "esm": 2662,
    "lib": 3136
  },
  "visx-brush": {
    "esm": 52910,
    "lib": 55596
  },
  "visx-chord": {
    "esm": 2663,
    "lib": 3373
  },
  "visx-clip-path": {
    "esm": 3394,
    "lib": 4415
  },
  "visx-curve": {
    "esm": 323,
    "lib": 1462
  },
  "visx-delaunay": {
    "esm": 2305,
    "lib": 3035
  },
  "visx-demo": {
    "esm": 0,
    "lib": 0
  },
  "visx-drag": {
    "esm": 12368,
    "lib": 13865
  },
  "visx-event": {
    "esm": 3815,
    "lib": 5091
  },
  "visx-geo": {
    "esm": 12450,
    "lib": 15408
  },
  "visx-glyph": {
    "esm": 12165,
    "lib": 15689
  },
  "visx-gradient": {
    "esm": 15496,
    "lib": 19482
  },
  "visx-grid": {
    "esm": 16678,
    "lib": 19853
  },
  "visx-group": {
    "esm": 1251,
    "lib": 1681
  },
  "visx-heatmap": {
    "esm": 6399,
    "lib": 7278
  },
  "visx-hierarchy": {
    "esm": 10161,
    "lib": 14656
  },
  "visx-legend": {
    "esm": 23920,
    "lib": 29153
  },
  "visx-marker": {
    "esm": 7834,
    "lib": 9673
  },
  "visx-mock-data": {
    "esm": 326036,
    "lib": 329336
  },
  "visx-network": {
    "esm": 4124,
    "lib": 5913
  },
  "visx-pattern": {
    "esm": 9161,
    "lib": 11621
  },
  "visx-point": {
    "esm": 1003,
    "lib": 1781
  },
  "visx-react-spring": {
    "esm": 13119,
    "lib": 16134
  },
  "visx-responsive": {
    "esm": 15447,
    "lib": 17439
  },
  "visx-sankey": {
    "esm": 3278,
    "lib": 4160
  },
  "visx-scale": {
    "esm": 19205,
    "lib": 30085
  },
  "visx-shape": {
    "esm": 81775,
    "lib": 102141
  },
  "visx-stats": {
    "esm": 12868,
    "lib": 13977
  },
  "visx-text": {
    "esm": 8309,
    "lib": 9806
  },
  "visx-threshold": {
    "esm": 2386,
    "lib": 2946
  },
  "visx-tooltip": {
    "esm": 13934,
    "lib": 18441
  },
  "visx-vendor": {
    "esm": 2492,
    "lib": 2702
  },
  "visx-visx": {
    "esm": 1524,
    "lib": 3989
  },
  "visx-voronoi": {
    "esm": 2013,
    "lib": 2621
  },
  "visx-wordcloud": {
    "esm": 2423,
    "lib": 3192
  },
  "visx-xychart": {
    "esm": 171572,
    "lib": 216544
  },
  "visx-zoom": {
    "esm": 16001,
    "lib": 18276
  }
}

@hshoff hshoff requested a review from Copilot November 4, 2025 16:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the visx monorepo from Yarn 1 to Yarn 4, updating internal dependency resolution from specific version numbers to workspace protocol references.

  • Upgrades package manager from Yarn 1.22.19 to Yarn 4.10.3
  • Replaces hardcoded version numbers with workspace:* for internal @visx packages
  • Updates TypeScript syntax for indexed access types to use proper parentheses
  • Configures Yarn 4 with node-modules linker and hoisting limits

Reviewed Changes

Copilot reviewed 36 out of 38 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Updates Yarn version requirement, removes husky, updates packageManager field, removes nohoist config
.yarnrc.yml Adds Yarn 4 configuration with node-modules linker
.gitignore Adds Yarn 4-specific files to ignore list
.github/workflows/*.yml Updates CI workflows for Yarn 4 compatibility
packages/*/package.json Replaces specific version numbers with workspace:* for internal dependencies
packages/visx-vendor/package.json Adds installConfig.hoistingLimits for vendor package
packages/visx-vendor/Readme.md Updates documentation to reflect hoistingLimits instead of nohoist
packages/visx-xychart/src/components/Tooltip.tsx Adds ts-expect-error comment and reformats boxShadow string
packages/visx-xychart/src/components/series/private/BaseAreaStack.tsx Fixes TypeScript indexed access type syntax
packages/visx-scale/src/operators/scaleOperator.ts Fixes TypeScript indexed access type syntax
packages/visx-sankey/test/Sankey.test.tsx Fixes TypeScript indexed access type syntax
Comments suppressed due to low confidence (1)

packages/visx-xychart/src/components/Tooltip.tsx:231

  • The nullish coalescing chain includes an unreachable null ?? expression at line 228. This creates dead code since null ?? theme?.gridStyles?.stroke will always resolve to theme?.gridStyles?.stroke. Consider removing this line or documenting its purpose if it serves as a placeholder.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hshoff hshoff merged commit cc36ff8 into master Nov 4, 2025
7 checks passed
@hshoff hshoff deleted the hshoff-yarn4 branch November 4, 2025 16:54
@github-actions
Copy link

🎉 This PR is included in version v4.0.0-alpha.0 of the packages modified 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants