@salesforce/packaging 1.4.11 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -330,17 +330,16 @@ class PackageVersionCreate {
330
330
  if (this.options.codecoverage) {
331
331
  hasUnpackagedMetadata = await this.metadataResolver.resolveMetadata(unpackagedMetadataPath, unpackagedMetadataFolder, 'unpackagedMDDirectoryDoesNotExist', sourceApiVersion);
332
332
  }
333
- // if we're using unpackaged metadata, don't package the profiles located there
334
- if (hasUnpackagedMetadata) {
335
- typesArr = this.options.profileApi.filterAndGenerateProfilesForManifest(typesArr, [unpackagedMetadataPath]);
336
- }
337
- else {
338
- typesArr = this.options.profileApi.filterAndGenerateProfilesForManifest(typesArr);
339
- }
333
+ // don't package the profiles from any unpackagedMetadata dir in the project
334
+ const profileExcludeDirs = this.project
335
+ .getPackageDirectories()
336
+ .filter((packageDir) => packageDir.unpackagedMetadata?.path)
337
+ .map((packageDir) => packageDir.unpackagedMetadata.path);
338
+ typesArr = this.options.profileApi.filterAndGenerateProfilesForManifest(typesArr, profileExcludeDirs);
340
339
  // Next generate profiles and retrieve any profiles that were excluded because they had no matching nodes.
341
340
  const excludedProfiles = this.options.profileApi.generateProfiles(packageVersProfileFolder, {
342
341
  Package: typesArr,
343
- }, [hasUnpackagedMetadata ? unpackagedMetadataPath : null]);
342
+ }, profileExcludeDirs);
344
343
  if (excludedProfiles.length > 0) {
345
344
  const profileIdx = typesArr.findIndex((e) => e.name[0] === 'Profile');
346
345
  typesArr[profileIdx].members = typesArr[profileIdx].members.filter((e) => !excludedProfiles.includes(e));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/packaging",
3
- "version": "1.4.11",
3
+ "version": "1.4.13",
4
4
  "description": "Packaging library for the Salesforce packaging platform",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",