Skip to content

[DEV-3880] Refactor tags and urlReplaceRepository API Layer#2197

Open
Sebastiano-Bertolin wants to merge 2 commits intoDEV-3859-refactor-webinars-and-webinarCategories-api-layerfrom
DEV-3880-refactor-tag-and-urlReplaceMap-api-layer
Open

[DEV-3880] Refactor tags and urlReplaceRepository API Layer#2197
Sebastiano-Bertolin wants to merge 2 commits intoDEV-3859-refactor-webinars-and-webinarCategories-api-layerfrom
DEV-3880-refactor-tag-and-urlReplaceMap-api-layer

Conversation

@Sebastiano-Bertolin
Copy link
Copy Markdown
Collaborator

@Sebastiano-Bertolin Sebastiano-Bertolin commented Mar 26, 2026

List of Changes

Tags handling refactor:

  • Introduced a new TagsRepository in apps/nextjs-website/src/lib/tags/index.ts to centralize fetching and mapping of tags, replacing previous scattered logic. ([1])
  • Moved and renamed tag-related types and fetchers from strapi/types/tag and strapi/fetches/fetchTags.ts to tags/types and tags/fetcher.ts, updating all import paths accordingly. ([1], [2], [3], [4])
  • Added new mapping utilities for tags (mapTagsProps, mapTagProps) and corresponding unit tests to ensure correct transformation from Strapi data to internal types. ([1], [2])
  • Removed old tag mapping logic from strapi/makeProps/makeTags.ts. ([1])

URL replacement map refactor:

  • Introduced a new UrlReplaceMapRepository and a getUrlReplaceMap API function, replacing the previous getUrlReplaceMapProps and related logic in cmsApi.ts. ([1], [2])
  • Updated all usages and imports of getUrlReplaceMapProps to use the new getUrlReplaceMap function, and changed imports to point to the new repository. ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12])
  • Moved and renamed URL replacement map test fixtures and types to reflect the new structure. ([1], [2])

Cleanup and supporting changes:

  • Removed obsolete code and unused imports from cmsApi.ts relating to tags and URL replacement map property mapping. ([1], [2])
  • Added new test fixtures for tags to support the new mapping and repository structure. ([1])

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 26, 2026

🦋 Changeset detected

Latest commit: d53086f

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

This PR includes changesets to release 1 package
Name Type
nextjs-website 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Jira Pull Request Link

This Pull Request refers to the following Jira issue DEV-3880

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.

1 participant