Skip to content

Changeset only detects the root package.json in a pnpm-workspace monorepo #1209

Open

Description

@brad-mccormick

Discussed in #1208

Originally posted by brad-mccormick August 8, 2023
This seems more like an issue than user error. New to changesets and running into an issue. I have a monorepo using pnpm-workspaces.yaml with a root level package.json, which just contains scripts, and package.json files for each package under the packages directory.

Here's what my pnpm-workspaces.yaml file looks like:

packages:
- 'packages/ui',
- 'packages/core',
- 'packages/icons',

When I run pnpm changeset it only picks up the root package.json, which is private, and ignores the workspace and packages.

Activity

  1. danez commented on Aug 14, 2023

    @danez

    I had a similar problem with

    packages:
    - 'package/'

    I solved it myself by changing to

    packages:
    - 'package'

    I noticed this in the error message of the changeset app: reactjs/react-docgen#826 (comment)

  2. brad-mccormick commented on Aug 21, 2023

    @brad-mccormick
    Author

    @danez

    Are you saying you moved your individual packages out of the packages/ directory?

  3. Ziothh commented on Oct 25, 2023

    @Ziothh

    I also have the same problem.
    Here is a minimal reproduction of the issue: https://github.com/Ziothh/changeset-pnpm-workspace-issue

    Tried multiple variants of pnpm-workspace.yaml but no dice.

    workspace:
     # Glob
     - packages/*
     # Just shared folder
     - packages
     # Explicit folders
     - packages/lib
     - packages/app
    

    I get this output:

    $ pnpm changeset
    🦋  What kind of change is this for @acme/root? (current version is 1.0.0) …
    ▸ patch
      minor
      major
    
  4. kylebenji commented on Nov 16, 2023

    @kylebenji

    Hey y'all,

    Came across this while looking for another issue, but my workspace setup seems to be pulling in all packages properly using this syntax in pnpm-workspace.yaml:

    packages:
      - "apps/**"
      - "packages/**"
    
  5. Ziothh commented on Nov 17, 2023

    @Ziothh

    @kylebenji
    Doesn't seem to work for packages in the root directory instead of a ̀̀̀̀/packages` directory, sadly.

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

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