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

INTL-1674: Start at fixing the constant migrator's date format detection #253

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alanknight-wk
Copy link
Contributor

Motivation

In attempting to work on something else I put in a constant of the form
const migrateMe = 'migrate me';
into a file, and then wondered why it wasn't getting migrated. Which led me to realize that the boolean expression for avoiding strings like 'MM/dd/yy' was incorrect. So I fixed it, and then realized that it broke a different test, where we screen out strings like 'probably-not' which are, we guess, maybe CSS selectors. But that's not great because it's possible if, um, 'un-likely' to have user-visible strings like that. So if we just fix this logic then it might start picking up other strings we didn't want. And it looks like we don't really actually have any logic for screening those out, though I could have sworn we did. There's some stuff in utils for filtering out pure camelCase alphabetics, but I didn't see this.

Also, the logic here is still questionable, because date formats don't necessarily start with upper case. We'd almost be equally well off just looking for an 'MM/' prefix.

Anyway, I'm leaving this for the moment, but left the code in place for posterity.

Changes

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@alanknight-wk alanknight-wk changed the title Start at fixing the constant migrator's date format detection INTL-1674: Start at fixing the constant migrator's date format detection Oct 19, 2023
@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants