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

refactor(utils): remove duplicated function #9972

Merged
merged 4 commits into from
Mar 29, 2024
Merged

refactor(utils): remove duplicated function #9972

merged 4 commits into from
Mar 29, 2024

Conversation

OzakIOne
Copy link
Contributor

@OzakIOne OzakIOne commented Mar 21, 2024

Motivation

Avoid duplication of code

Test Plan

jest, ci, lint

Test links

Deploy preview: https://deploy-preview-9972--docusaurus-2.netlify.app/

Related issues/PRs

#9949

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 21, 2024
Copy link

netlify bot commented Mar 21, 2024

[V2]

Name Link
🔨 Latest commit 987472d
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/66069f9530d3ba000809d0ce
😎 Deploy Preview https://deploy-preview-9972--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Mar 21, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 59 🟢 98 🟢 96 🟢 100 🟠 88 Report
/docs/installation 🟠 53 🟢 96 🟢 100 🟢 100 🟠 88 Report
/docs/category/getting-started 🟠 77 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog 🟠 67 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 61 🟢 96 🟢 100 🟢 100 🟠 88 Report
/blog/tags/release 🟠 67 🟢 100 🟢 100 🟠 80 🟠 88 Report
/blog/tags 🟠 76 🟢 100 🟢 100 🟢 90 🟠 88 Report

Copy link

github-actions bot commented Mar 21, 2024

Size Change: +1.41 kB (0%)

Total Size: 994 kB

Filename Size Change
website/build/assets/js/main.********.js 767 kB +1.41 kB (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 75.4 kB
website/build/assets/css/styles.********.css 114 kB
website/build/index.html 37.9 kB

compressed-size-action

packages/docusaurus-utils/src/__tests__/urlUtils.test.ts Outdated Show resolved Hide resolved
packages/docusaurus-utils/src/__tests__/urlUtils.test.ts Outdated Show resolved Hide resolved
packages/docusaurus-utils/package.json Show resolved Hide resolved
packages/docusaurus-utils/src/index.ts Outdated Show resolved Hide resolved
packages/docusaurus-utils/src/urlUtils.ts Outdated Show resolved Hide resolved
@OzakIOne OzakIOne requested a review from slorber March 24, 2024 22:09
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

addPrefix/removePrefix/addSuffix/removeSuffix (+ tests) should all move to utils-common stringUtils.ts in a consistent way.

If utils use these methods, you can add a dependency from util to util-common (but not the opposite)

packages/docusaurus-utils-common/src/applyTrailingSlash.ts Outdated Show resolved Hide resolved
packages/docusaurus-utils/src/jsUtils.ts Outdated Show resolved Hide resolved
packages/docusaurus-utils/src/jsUtils.ts Outdated Show resolved Hide resolved
@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Mar 28, 2024
@slorber slorber merged commit 8212471 into main Mar 29, 2024
31 checks passed
@slorber slorber deleted the ozaki/utils branch March 29, 2024 13:45
@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading. to backport This PR is planned to be backported to a stable version of Docusaurus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants