From f28206e4465a71c7bc50ee15d21bc8e8c00e33bd Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Fri, 31 May 2024 13:06:19 -0600 Subject: [PATCH] fix: set forceIgnoredPaths on CS (#1330) --- src/collections/componentSetBuilder.ts | 1 + test/collections/componentSetBuilder.test.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/collections/componentSetBuilder.ts b/src/collections/componentSetBuilder.ts index 829127c56d..a4061d3f9a 100644 --- a/src/collections/componentSetBuilder.ts +++ b/src/collections/componentSetBuilder.ts @@ -163,6 +163,7 @@ export class ComponentSetBuilder { ); }); } + componentSet.forceIgnoredPaths = resolvedComponents.forceIgnoredPaths; } resolvedComponents.toArray().map(addToComponentSet(componentSet)); diff --git a/test/collections/componentSetBuilder.test.ts b/test/collections/componentSetBuilder.test.ts index 84b7cdc010..33f365292f 100644 --- a/test/collections/componentSetBuilder.test.ts +++ b/test/collections/componentSetBuilder.test.ts @@ -292,6 +292,7 @@ describe('ComponentSetBuilder', () => { }, }); expect(fromSourceStub.callCount).to.equal(1); + expect(compSet.forceIgnoredPaths).to.equal(undefined); const fromSourceArgs = fromSourceStub.firstCall.args[0] as FromSourceOptions; expect(fromSourceArgs).to.have.deep.property('fsPaths', [packageDir1]); const filter = new ComponentSet(); @@ -333,6 +334,8 @@ describe('ComponentSetBuilder', () => { }, }); expect(fromSourceStub.callCount).to.equal(1); + expect(compSet.forceIgnoredPaths?.size).to.equal(1); + expect(compSet.forceIgnoredPaths).to.deep.equal(new Set([join('my', 'path', 'to', 'a', 'customobject.xml')])); const fromSourceArgs = fromSourceStub.firstCall.args[0] as FromSourceOptions; expect(fromSourceArgs).to.have.deep.property('fsPaths', [packageDir1]); const filter = new ComponentSet();