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 "bar" 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
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.

2 participants