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

feat(utils): add toRootRelativePath function #395

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

adamsoderstrom
Copy link
Member

@adamsoderstrom adamsoderstrom commented Jan 15, 2025

Background

Paths / URLs could originate from sources that us as developers have limited control over.
For example, could an editor enter "foo" as input in a URL field in a CMS, if no proper validation is implemented.

toRootRelativePath solves this, by assuring that the path isn't directory-relative and then may lead to a 404.

Copy link

changeset-bot bot commented Jan 15, 2025

🦋 Changeset detected

Latest commit: 06e90d3

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

This PR includes changesets to release 4 packages
Name Type
@noaignite/utils Minor
@noaignite/react-centra-checkout Patch
@noaignite/react-utils Patch
@noaignite/tailwind-typography 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

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2025 0:22am

Copy link
Contributor

@maeertin maeertin left a comment

Choose a reason for hiding this comment

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

praise: Nice little helper 🙌

@adamsoderstrom adamsoderstrom merged commit 87c005a into main Jan 17, 2025
3 checks passed
@adamsoderstrom adamsoderstrom deleted the format-href branch January 17, 2025 12:28
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