mxlint / mxlint-cli

A set of CLI tools to enhance Mendix app development workflows. They are mainly designed for professionals but should be usable for everybody.
https://cinaq.com
GNU Affero General Public License v3.0
21 stars 5 forks source link

New function: Help developer in upgrading marketplace modules by showing what has changed #4

Open xiwenc opened 6 months ago

xiwenc commented 6 months ago

Use case

Developers tend to change modules imported from Marketplace. However these changes are often not tracked well which makes it tricky/risky to upgrade the module in the future

Solution

Within a project, show the developer what changes were made in comparison to original version of a module. These can also be not marketplace modules; so any module.

xiwenc commented 6 months ago

Input collected from Linkedin:

Paul P:

I haven't familiarized myself with the data structure yet, but is it possible to detect which Marketplace modules are in the app and their versions? Best of all, when there is no 100% match do a guestimate which version it likely is and which customizations were made? That would be a killer feature for migration impact analysis.

Xiwen:

partly yes. See https://github.com/cinaq/mendix-cli/blob/main/modelsource/Metadata.yaml so version is already present. Indeed detection whether there were modifications are not yet possible. It would be if we have exports of all known market place modules and their versions. That way we can use these to compare; which is a breeze now because they are all yaml files. Or perhaps we can do fingerprinting for efficiency. But having the whole module to compare we can even show what has changed compared to the original module.

Xiwen:

this would be a new “mendix-cli compare-module” function. Great idea! Now… who is up for the task to implement this?

Paul P:

Exactly what I had in mind. Building a library with modules and their versions is a matter of time. And if there is a simple way for the community to add their scan results then it is a distributed effort.

gplo commented 6 months ago

Probably no new info here, but you can use the Mendix marketplace-api to do this. For example: https://marketplace-api.mendix.com/v1/content/{package_id}/versions. It returns a JSON which includes the version, release date and release notes.

xiwenc commented 6 months ago

Thanks for sharing this! I didn't know this existed. I wonder if we can also download packages automatically?

ppoetsma commented 1 month ago

Here is the API to find all modules and versions etc. According to the docs no download urls. https://docs.mendix.com/apidocs-mxsdk/apidocs/content-api/