Skip to content

Overrides do no work in PNPM monorepo #970

Description

@jelhan

PNPM supports pnpm.overrides and resolutions only at the root of a project. Ember Try sets it at the closest package.json. In a typical setup of a v2 addon that's the "test-app" package. That does not have any affect. Ember Try must set it in the package.json at the workspace root.

Likely there is a second bug: Ember Try sets overrides at the root of the package.json. That's correct for NPM. But I think for PNPM it must go into a pnpm member. This is an example taken from PNPM documentation:

{
  "dependencies": {
    "foo": "^1.0.0"
  },
  "pnpm": {
    "overrides": {
      "foo": "$foo"
    }
  }
}

But Ember Try generates the following, which is valid for NPM but does not fit with PNPM documentation:

{
  "dependencies": {
    "foo": "^1.0.0"
  },
  "overrides": {
    "foo": "$foo",
  }
}

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