Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(managers/custom): generic manager for json files #32784

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

RahulGautamSingh
Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh commented Nov 28, 2024

Changes

  • Implement a new custom manager which uses jsonata queries to extract the deps info from a package file. Details are similar to regex manager implementation, except that we do not need to explicitly handle the recursive matching as that is already handled by the jsonata query language.
  • Added tests
  • Added docs

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

@RahulGautamSingh RahulGautamSingh changed the title feat(custom-managers: generic manager for json files feat(managers/custom): generic manager for json files Nov 28, 2024
@RahulGautamSingh RahulGautamSingh marked this pull request as draft November 28, 2024 14:20
@RahulGautamSingh RahulGautamSingh marked this pull request as ready for review November 28, 2024 14:30
@RahulGautamSingh RahulGautamSingh marked this pull request as draft November 28, 2024 14:41
@RahulGautamSingh RahulGautamSingh marked this pull request as ready for review November 28, 2024 15:14
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely want to see an example of this working on a real repo

@RahulGautamSingh
Copy link
Collaborator Author

I definitely want to see an example of this working on a real repo

Test run on renovate repo, targeting the package.json and extracting dependencies, devDependencies, optionalDependencies
Rahul-renovate-testing#2

docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/modules/manager/custom/jsonata/index.ts Outdated Show resolved Hide resolved
lib/modules/manager/custom/jsonata/index.ts Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
@RahulGautamSingh
Copy link
Collaborator Author

Tried to make the matching logic in handleMatching simpler.

docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/modules/manager/custom/utils.ts Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/config/options/index.ts Outdated Show resolved Hide resolved
lib/modules/manager/custom/jsonata/index.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/custom/jsonata/index.ts Outdated Show resolved Hide resolved
lib/modules/manager/custom/jsonata/utils.ts Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/config/validation.ts Outdated Show resolved Hide resolved
lib/modules/manager/custom/jsonata/index.ts Outdated Show resolved Hide resolved
The JSONata manager is unique in Renovate in because:

- It is configurable via [JSONata](https://jsonata.org/) queries
- It can extract any `datasource`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? wha does it mean?

Copy link
Collaborator Author

@RahulGautamSingh RahulGautamSingh Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied regex maanger. Possbly trying to convey that the manager can be used with any datasource or will lookup releases from all

lib/modules/manager/custom/jsonata/utils.ts Outdated Show resolved Hide resolved
lib/modules/manager/custom/types.ts Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting for the refactor PR to be merged and this PR update onto

lib/config/options/index.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants