Skip to content

Commit

Permalink
fix: remove original customLabelsBeta
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Aug 8, 2024
1 parent 99ceb9e commit d78be22
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 236 deletions.
44 changes: 16 additions & 28 deletions src/registry/presets/decomposeCustomLabelsBeta.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,32 @@
{
"childTypes": {
"customlabel": "customlabels"
"customlabel": ""
},
"strictDirectoryNames": {},
"suffixes": {
"label": "customlabel"
},
"strictDirectoryNames": {
"label": "customlabel",
"labels": "customlabels"
},
"types": {
"customlabels": {
"children": {
"suffixes": {
"label": "customlabel"
},
"types": {
"customlabel": {
"directoryName": "test",
"id": "customlabel",
"name": "CustomLabel",
"suffix": "label",
"isAddressable": false,
"supportsWildcardAndName": true,
"uniqueIdElement": "fullName",
"xmlElementName": "labels"
}
}
"customlabel": {
"directoryName": "labels",
"id": "customlabel",
"name": "CustomLabel",
"strategies": {
"adapter": "default",
"transformer": "decomposedLabels"
},
"strictDirectoryName": true,
"suffix": "label"
},
"customlabels": {
"directoryName": "labels",
"id": "customlabels",
"ignoreParsedFullName": false,
"name": "CustomLabels",
"strategies": {
"adapter": "decomposed",
"decomposition": "topLevel",
"transformer": "decomposed"
"adapter": "default",
"transformer": "decomposedLabels"
},
"suffix": "labels",
"supportsPartialDelete": true
"suffix": "labels"
}
}
}
32 changes: 0 additions & 32 deletions src/registry/presets/decomposeCustomLabelsBeta2.json

This file was deleted.

2 changes: 0 additions & 2 deletions src/registry/presets/presetMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import { MetadataRegistry } from '../types';

// we have to import all presets explicitly for VSCE's esbuild bundling process
import * as decomposeCustomLabelsBeta from './decomposeCustomLabelsBeta.json';
import * as decomposeCustomLabelsBeta2 from './decomposeCustomLabelsBeta2.json';
import * as decomposePermissionSetBeta from './decomposePermissionSetBeta.json';
import * as decomposeSharingRulesBeta from './decomposeSharingRulesBeta.json';
import * as decomposeWorkflowBeta from './decomposeWorkflowBeta.json';

export const presetMap = new Map<string, MetadataRegistry>([
['decomposeCustomLabelsBeta', decomposeCustomLabelsBeta as MetadataRegistry],
['decomposeCustomLabelsBeta2', decomposeCustomLabelsBeta2 as MetadataRegistry],
['decomposePermissionSetBeta', decomposePermissionSetBeta as MetadataRegistry],
['decomposeSharingRulesBeta', decomposeSharingRulesBeta as MetadataRegistry],
['decomposeWorkflowBeta', decomposeWorkflowBeta as MetadataRegistry],
Expand Down
12 changes: 7 additions & 5 deletions test/registry/registryValidation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ for (const preset of presets) {
});

describe('every childTypes top-level property maps to a top-level type that has it in its childTypes', () => {
Object.entries(registry.childTypes).forEach(([childId, parentId]) => {
it(`childTypes member ${childId} matches a parent type ${parentId}`, () => {
expect(registry.types[parentId]).to.have.property('children');
expect(registry.types[parentId]?.children?.types).to.have.property(childId);
Object.entries(registry.childTypes)
.filter(([, parentId]) => parentId)
.forEach(([childId, parentId]) => {
it(`childTypes member ${childId} matches a parent type ${parentId}`, () => {
expect(registry.types[parentId]).to.have.property('children');
expect(registry.types[parentId]?.children?.types).to.have.property(childId);
});
});
});
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
],
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "60.0",
"sourceBehaviorOptions": ["decomposeCustomLabelsBeta2"]
"sourceBehaviorOptions": ["decomposeCustomLabelsBeta"]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 comments on commit d78be22

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: d78be22 Previous: 3ea9983 Ratio
eda-componentSetCreate-linux 242 ms 239 ms 1.01
eda-sourceToMdapi-linux 2413 ms 2376 ms 1.02
eda-sourceToZip-linux 1885 ms 1871 ms 1.01
eda-mdapiToSource-linux 2950 ms 2921 ms 1.01
lotsOfClasses-componentSetCreate-linux 449 ms 471 ms 0.95
lotsOfClasses-sourceToMdapi-linux 3771 ms 3633 ms 1.04
lotsOfClasses-sourceToZip-linux 3353 ms 3201 ms 1.05
lotsOfClasses-mdapiToSource-linux 3688 ms 3529 ms 1.05
lotsOfClassesOneDir-componentSetCreate-linux 769 ms 742 ms 1.04
lotsOfClassesOneDir-sourceToMdapi-linux 6691 ms 6424 ms 1.04
lotsOfClassesOneDir-sourceToZip-linux 5846 ms 5568 ms 1.05
lotsOfClassesOneDir-mdapiToSource-linux 6672 ms 6374 ms 1.05

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: d78be22 Previous: 3ea9983 Ratio
eda-componentSetCreate-win32 623 ms 616 ms 1.01
eda-sourceToMdapi-win32 4453 ms 4313 ms 1.03
eda-sourceToZip-win32 3000 ms 2912 ms 1.03
eda-mdapiToSource-win32 5919 ms 5658 ms 1.05
lotsOfClasses-componentSetCreate-win32 1210 ms 1197 ms 1.01
lotsOfClasses-sourceToMdapi-win32 7982 ms 7684 ms 1.04
lotsOfClasses-sourceToZip-win32 5194 ms 5029 ms 1.03
lotsOfClasses-mdapiToSource-win32 8248 ms 7878 ms 1.05
lotsOfClassesOneDir-componentSetCreate-win32 2136 ms 2099 ms 1.02
lotsOfClassesOneDir-sourceToMdapi-win32 14771 ms 13810 ms 1.07
lotsOfClassesOneDir-sourceToZip-win32 9502 ms 8979 ms 1.06
lotsOfClassesOneDir-mdapiToSource-win32 14979 ms 14044 ms 1.07

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.