toolbelt icon indicating copy to clipboard operation
toolbelt copied to clipboard

Allow specific builder config to override the common config for pinned dependencies

Open mairatma opened this issue 1 year ago • 0 comments

What is the purpose of this pull request?

Change the logic that handles pinned dependencies to allow configs for specific builders to have higher precedence than the common configs.

This won't cause any problems, since the Typescript is currently the only common pinned dep and there are currently no builders trying to change its value either. You can see the current pinned dependencies config here.

What problem is this solving?

With the current logic it's impossible to allow other Typescript versions to be used in any builders. A new node builder major is being created (PR here) to upgrade TS and it needs this change to properly work.

How should this be manually tested?

First test the existing use cases:

  1. Load the repo of an existing Node.js app.
  2. Bump typescript to ^5.0.0 within the app's node/package.json.
  3. Link the app with this version of the toolbelt.
  4. Verify that the typescript version was fixed back to 3.9.7.

Afterwards, you can test with the new builder:

  1. Link the builder-hub version in this PR.
  2. Change the app's manifest.json to point to the new builder.
  3. Bump @types/node to ^16.0.0 within the app's node/package.json.
  4. Bump typescript to ^5.0.0 within the app's node/package.json.
  5. Link the app with this version of the toolbelt.
  6. Verify that the typescript version was not changed back to 3.9.7.

Screenshots or example usage

Types of changes

  • [ ] Refactor (non-breaking change that only makes the code better)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Requires change to documentation, which has been updated accordingly.

Chores checklist

  • [ ] Update CHANGELOG.md

mairatma avatar Jan 31 '24 18:01 mairatma