Skip to content

pnpm-workspace.yaml Schema Outdated: onlyBuiltDependencies (pnpm v10.5.0+) Invalid #1103

Description

@heggria

Describe the bug

The YAML schema validation for pnpm-workspace.yaml is incorrectly flagging the onlyBuiltDependencies property as invalid, resulting in the following error:

Property onlyBuiltDependencies is not allowed.yaml-schema: pnpm Workspace (pnpm-workspace.yaml)(513)

However, the onlyBuiltDependencies field was officially introduced in pnpm v10.5.0 as a valid configuration option within pnpm-workspace.yaml. See the release notes: https://github.com/pnpm/pnpm/releases/tag/v10.5.0

This suggests that the schema used by the extension is outdated and needs to be updated to reflect the latest pnpm specifications. This is causing false-positive errors for users who are legitimately using this feature.

Additionally, it appears that ignoreBuiltDependencies is also a valid (though undocumented) option in pnpm-workspace.yaml. The schema should be updated to include this property as well, if confirmed to be part of the official (even if undocumented) pnpm API.

Expected Behavior

The onlyBuiltDependencies property within pnpm-workspace.yaml should be recognized as a valid property, and no error should be reported. The extension should provide autocompletion and validation consistent with the pnpm v10.5.0+ schema.

Current Behavior

The extension reports "Property onlyBuiltDependencies is not allowed" for the onlyBuiltDependencies property in pnpm-workspace.yaml. This is an incorrect error.

Steps to Reproduce

  1. Create or open a pnpm-workspace.yaml file.

  2. Add the onlyBuiltDependencies property to the file, for example:

    packages:
      - packages/*
    
    onlyBuiltDependencies:
      - esbuild
      - fuse-native
  3. Observe the error message reported by the YAML extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions