Skip to content

fix: add object format support to workspaces field type #236

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

outslept
Copy link
Contributor

@outslept outslept commented Jul 9, 2025

The workspaces field was typed as string[] but should support both array and object formats according to the JSON Schema and Yarn Classic conventions.

Resolves #235

P.S. There is an example of using object syntax in an article on nohoist.
UPD2: There's also an RFC to add nohoist to npm, but this isn't implemented for now - npm/rfcs#287

image

outslept and others added 2 commits July 9, 2025 15:31
The workspaces field was typed as string[] but should support both array
and object formats according to the JSON Schema and Yarn Classic conventions.

Closes `workspaces` field type missing object format support unjs#235
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.22%. Comparing base (afdf7cb) to head (621d361).
Report is 81 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
+ Coverage   89.40%   91.22%   +1.82%     
==========================================
  Files           5       10       +5     
  Lines         434      262     -172     
  Branches       37       61      +24     
==========================================
- Hits          388      239     -149     
+ Misses         46       23      -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

workspaces field type missing object format support
1 participant