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: add checkAfterItems in builders #2503

Open
wants to merge 1 commit into
base: release/11.3
Choose a base branch
from

Conversation

guillaumerochelle
Copy link
Contributor

@guillaumerochelle guillaumerochelle commented Nov 22, 2024

Proposed change

Add checkAfterItems in metadata-check builder.
This new option allows devs to deactivate checks on items set in "after" property.
This will allow documenting breaking changes in modules which don't have access to the complete metadata.

For example with this migration change:

{
  "version": "1.0.0",
  "changes": [
    {
      "contentType": "CONFIG",
      "before": {
        "libraryName": "@mylib/moduleA",
        "configName": "Foo",
        "propertyName": "bar"
      },
      "after": {
        "libraryName": "@mylib/moduleB",
        "configName": "Bar",
        "propertyName": "baz"
      }
    }
  ]
}

When running builder @o3r/components:check-config-migration-metadata, the metadata file is the one of module @mylib/moduleA and doesn't contain any metadata from other modules (@mylib/moduleB). The check for property "baz" in config interface @mylib/moduleB#Bar will fail.

With the new option checkAfterItems, we can deactivate this check.

Bonus: Add packageJsonEntry in the schema of :

  • @o3r/components:check-config-migration-metadata
  • @o3r/localization:check-localization-migration-metadata
  • @o3r/styling:check-style-migration-metadata

Related issues

  • No issue associated

@guillaumerochelle guillaumerochelle requested a review from a team as a code owner November 22, 2024 14:42
@guillaumerochelle guillaumerochelle changed the title feat: add packageJsonEntry and checkAfterItems in builders feat: add checkAfterItems in builders Nov 22, 2024
@guillaumerochelle guillaumerochelle force-pushed the feature/migration-validation-builder branch from dd84a6b to 3bde229 Compare November 22, 2024 15:11
Copy link
Contributor

@kpanot kpanot left a comment

Choose a reason for hiding this comment

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

I am fine with the code but, if we follow the policy, a feature should be pull requested to the main branch.
We can do exception if the feature is mandatory to process properly to the main purpose of the tool (here the extractors).
It seems to be the case here but, as 11.3 is not the latest major, maybe you will need to move your target to release/11.4

kpanot
kpanot previously approved these changes Nov 26, 2024
fpaul-1A
fpaul-1A previously approved these changes Nov 26, 2024
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.

4 participants