Skip to content

@W-18670301 - added prettier and improved tests for trim-extensions script#2688

Merged
kzheng-sfdc merged 4 commits intofeature/extensibility-v2from
u/kzheng/W-18670301/prettier
Jun 30, 2025
Merged

@W-18670301 - added prettier and improved tests for trim-extensions script#2688
kzheng-sfdc merged 4 commits intofeature/extensibility-v2from
u/kzheng/W-18670301/prettier

Conversation

@kzheng-sfdc
Copy link
Contributor

@kzheng-sfdc kzheng-sfdc commented Jun 27, 2025

Description

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

  • (change1)

How to Test-Drive This PR

  • (step1)

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)

@kzheng-sfdc kzheng-sfdc requested a review from a team as a code owner June 27, 2025 22:47
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jun 27, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

// Replace the original file with the trimmed version
fs.writeFileSync(filePath, output)
// prettify the file
execSync(`npx prettier --write ${filePath}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Call prettier in a child process because it requires ES module, which this package doesn't support.

)
})

it('handles PropTypes declarations correctly', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new test case to demonstrate how to extend PropType declaration

@kzheng-sfdc kzheng-sfdc requested a review from bfeister June 27, 2025 22:49
@kzheng-sfdc kzheng-sfdc added the skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated label Jun 27, 2025
Copy link
Contributor

@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.

This is great, thanks for handling my suggestion around exact file contents versus "string contains" 🤝

@kzheng-sfdc kzheng-sfdc merged commit 3e08448 into feature/extensibility-v2 Jun 30, 2025
33 checks passed
@kzheng-sfdc kzheng-sfdc deleted the u/kzheng/W-18670301/prettier branch July 16, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants