From c6b76b83d6108a4dac51813e6d4a97d1f6e23b78 Mon Sep 17 00:00:00 2001 From: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:23:55 +0530 Subject: [PATCH] chore: modified resources alter to send the jsLibFileName in resource identifier (#39390) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes # > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Git" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 5c55da0707d29788aaddc99f3ef385d0c500d840 > Cypress dashboard. > Tags: `@tag.Git` > Spec: >
Fri, 21 Feb 2025 08:34:42 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Improved the process for exporting custom library resources, ensuring resource identifiers are generated more reliably during export operations for a smoother experience. --- .../exportable/CustomJSLibExportableServiceCEImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/jslibs/exportable/CustomJSLibExportableServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/jslibs/exportable/CustomJSLibExportableServiceCEImpl.java index 8df63d5138..bae0aa11ac 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/jslibs/exportable/CustomJSLibExportableServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/jslibs/exportable/CustomJSLibExportableServiceCEImpl.java @@ -1,6 +1,7 @@ package com.appsmith.server.jslibs.exportable; import com.appsmith.external.git.models.GitResourceType; +import com.appsmith.git.files.FileUtilsImpl; import com.appsmith.server.constants.FieldName; import com.appsmith.server.domains.Application; import com.appsmith.server.domains.Artifact; @@ -78,11 +79,16 @@ public class CustomJSLibExportableServiceCEImpl implements ExportableServiceCE updatedCustomJsLibResourceIdentifiers = updatedCustomJSLibSet.stream() + .map(FileUtilsImpl::getJsLibFileName) + .collect(Collectors.toSet()); + artifactExchangeJson .getModifiedResources() .getModifiedResourceIdentifiers() .get(GitResourceType.JSLIB_CONFIG) - .addAll(updatedCustomJSLibSet); + .addAll(updatedCustomJsLibResourceIdentifiers); /** * Previously it was a Set and as Set is an unordered collection of elements that