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

[sitecore-jss-dev-tools] Update sitecore packages metadata generation logic to account for monorepos #1949

Merged
merged 16 commits into from
Oct 22, 2024

Conversation

yavorsk
Copy link
Contributor

@yavorsk yavorsk commented Oct 15, 2024

Description / Motivation

Previously getMetadata() was generating the metadata about the used sitecore packages through traversing the node-modules folder of the application. This approach does not work in a monorepo setup.
This PR addresses the problem by making some updates of the logic that gathers the metadata - it uses the npm query command to gather the information of the used sitecore packages and their exact version.

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate) Test standalone, in monorepo, in other monorepos

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@yavorsk yavorsk requested a review from a team October 15, 2024 12:24
@yavorsk yavorsk changed the title [sitecore-jss-dev-tools] Update logic of generating used sitecore packages metadata [sitecore-jss-dev-tools] Update sitecore packages metadata generation logic to account for monorepos Oct 15, 2024
Copy link
Contributor

@art-alexeyenko art-alexeyenko left a comment

Choose a reason for hiding this comment

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

Would it also make sense to cleanup some of the test-data package lock files for better maintainability?

@yavorsk yavorsk requested a review from a team October 21, 2024 10:08
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Looks good to me! It's much cleaner now 👍
See some comments below. However I approved in advance

packages/sitecore-jss-dev-tools/src/templating/metadata.ts Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@art-alexeyenko art-alexeyenko merged commit a284fcf into dev Oct 22, 2024
1 check passed
@art-alexeyenko art-alexeyenko deleted the feature/JSS-3430 branch October 22, 2024 19:20
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.

3 participants