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

Improve domain_match Function and add test cases #1889

Merged
merged 6 commits into from
May 17, 2024

Conversation

theodesp
Copy link
Member

@theodesp theodesp commented May 16, 2024

Tasks

  • I have signed a Contributor License Agreement (CLA) with WP Engine.
  • If a code change, I have written testing instructions that the whole team & outside contributors can understand.
  • I have written and included a comprehensive changeset to properly document the changes I've made.

Description

This PR enhances the domain_match function to handle a wider range of scenarios, including different ports, schemes, and subdomains. It also adds a comprehensive set of test cases to ensure the function behaves correctly in various situations.

Related Issue(s):

(#1884)

Testing

  1. Create a front end Node environment runs on localhost:3000, and LocalWP environment runs on localhost with a different port.
  2. Run the development server using npm run dev -w examples/next/faustwp-getting-started
  3. The CLI tool should not fail the health check for WordPress URL validation.

Screenshots

Alternatively if you can also try create a new front end Node environment with the same host as the LocalWP environment but in a different port.

Documentation Changes

Dependant PRs

@theodesp theodesp requested a review from a team as a code owner May 16, 2024 11:08
Copy link

changeset-bot bot commented May 16, 2024

🦋 Changeset detected

Latest commit: a48a338

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented May 16, 2024

📦 Next.js Bundle Analysis for @faustwp/getting-started-example

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Contributor

@ChrisWiegman ChrisWiegman left a comment

Choose a reason for hiding this comment

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

LGTM

@theodesp theodesp merged commit c28624c into canary May 17, 2024
18 checks passed
@theodesp theodesp deleted the domain-match-function-improvement branch May 17, 2024 14:01
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