Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/lemon-words-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@hyperse/inspector-babel-plugin": major
"@hyperse/inspector-middleware": major
"@hyperse/inspector-component": major
"@hyperse/inspector-swc-plugin": major
"@hyperse/inspector-common": major
"@hyperse/next-inspector": major
"@hyperse/inspector": major
---

feat: publish v2.0.0
chore: update dependencies across the project for improved compatibility and performance;
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
nodeLinker: node-modules

workspaces:
packages:
- packages/*
- crates/*
Comment on lines +3 to +6
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Invalid workspace configuration for Yarn 4.x — pipeline is failing.

The workspaces key is not a recognized configuration setting in Yarn 4.10.3 (as indicated by the pipeline failure). In Yarn v2+, workspaces are defined in package.json, not .yarnrc.yml.

After confirming the correct syntax, move the workspace configuration from .yarnrc.yml to package.json. For reference, the pipeline error was:

[error] 1-1: Usage Error: Unrecognized or legacy configuration settings found: workspaces. Run 'yarn config' to see the list of settings supported in Yarn. Command 'yarn install' failed with exit code 1.

🌐 Web query:

How to configure Yarn v4 workspaces in package.json?

💡 Result:

Short answer — in Yarn v4 you declare workspaces in the root package.json with a workspaces field (glob patterns), make the root private, optionally set packageManager, and use the workspace: protocol in workspace-to-workspace dependencies. Example:

Root package.json
{
"private": true,
"packageManager": "[email protected]",
"workspaces": [
"packages/",
"apps/
"
]
}

Workspace package (packages/pkg-a/package.json)
{
"name": "@myorg/pkg-a",
"version": "1.0.0",
"main": "dist/index.js",
"dependencies": {
"lodash": "^4.17.21"
}
}

Workspace package that depends on another workspace (packages/pkg-b/package.json)
{
"name": "@myorg/pkg-b",
"version": "1.0.0",
"dependencies": {
"@myorg/pkg-a": "workspace:*"
}
}

Notes:

  • workspaces can be an array of glob patterns (root manifest). [1]
  • Use "workspace:*", "workspace:^", etc. to reference local workspace versions and keep resolution consistent. You can still run yarn workspaces foreach, yarn workspace , and use yarn workspaces focus to limit installs. [1][2][3]

References:
[1] Yarn manifest (package.json) — workspaces docs.
[2] Yarn workspaces feature page.
[3] Yarn protocols (workspace: protocol examples).


Move workspace configuration from .yarnrc.yml to package.json.

The workspaces key is not supported in .yarnrc.yml for Yarn 4.x. In Yarn v4, workspaces must be defined in the root package.json as an array. Move lines 3-6 to your root package.json:

{
  "private": true,
  "workspaces": [
    "packages/*",
    "crates/*"
  ]
}

Then remove the workspace configuration from .yarnrc.yml.

🤖 Prompt for AI Agents
.yarnrc.yml around lines 3-6: the workspace configuration belongs in the root
package.json for Yarn v4, so remove the workspaces section from .yarnrc.yml and
add a "private": true and "workspaces": ["packages/*","crates/*"] entry to the
root package.json (as an array), ensuring the workspaces entries are moved
exactly and formatted as a JSON array under package.json, then save both files.


yarnPath: .yarn/releases/yarn-4.10.3.cjs
Loading
Loading