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

Send package versions as bundle metadata #1354

Merged
merged 17 commits into from
Jul 19, 2023

Conversation

yunakim714
Copy link
Collaborator

@yunakim714 yunakim714 commented Jul 10, 2023

Description

One of the main goals of the Bundle Metadata Upload work for the CC SteelArc team is to gather information on the packages and versions that constitute our customers' projects.
Utilizing the project's package.json, we will upload the dependencies and devDependencies as part of the bundle_metadata field of the Bundle model

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • Utilizing the preexisting getProjectPkg() function, access the package.json's dependencies and devDependencies fields
  • Add this data to ssr_parameters

How to Test-Drive This PR

  • Navigate to the related PR in portal_app and checkout the branch
  • Using a local PWA Kit project, push a bundle running Cloud local from the project root
    ... pwa-kit-dev.js push -m "Test bundle_metadata is sending" --cloud-origin http://cloud-dev.mobify.com:8000
  • Using SQL queries or otherwise, validate that the bundle_metadata field of the pushed bundle is populated with the project dependencies and versions in the following format:
    bundle_metadata: { "dependencies": { "package_a": "1.0.0", "package_b": "2.0.0" } }

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

Copy link
Collaborator

@bfeister bfeister left a comment

Choose a reason for hiding this comment

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

@yunakim714 will there be a follow-up PR for ccExtensibility.overridesDir fs read + push to this payload?

@yunakim714
Copy link
Collaborator Author

@bfeister Yup! This PR is focused on sending just the package versions

@yunakim714 yunakim714 marked this pull request as ready for review July 13, 2023 18:54
@yunakim714 yunakim714 requested a review from a team as a code owner July 13, 2023 18:54
Copy link
Collaborator

@bfeister bfeister left a comment

Choose a reason for hiding this comment

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

Just going to officially say that I'll need more convincing that it's ok to lower test coverage, we'll discuss in person

@yunakim714 yunakim714 requested a review from bredmond-sf July 18, 2023 17:18
@bfeister bfeister self-requested a review July 19, 2023 13:33
@yunakim714 yunakim714 merged commit b094c70 into develop Jul 19, 2023
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