Overrides do no work in PNPM monorepo

Open
#970 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start by locating Ember Try's code that selects the package.json and writes dependency overrides. Compare the generated package.json with the workspace-root and PNPM examples described in the issue. Done means overrides are written at the workspace root in the format PNPM expects, while retaining NPM behavior.

Written by the indexing model from the issue text.

Description

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",
  }
}
Dominant language
JavaScript
Stars
180
Forks
57
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ember-cli/ember-try

All issues in ember-cli/ember-try

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.