Skip to content

Commit

Permalink
fix: create folders on load
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Oct 20, 2023
1 parent 9761f1a commit 63180e6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<<<<<<< HEAD

## [9.7.8](https://github.com/forcedotcom/source-deploy-retrieve/compare/9.7.7...9.7.8) (2023-08-27)

### Bug Fixes

=======

## [9.7.27](https://github.com/forcedotcom/source-deploy-retrieve/compare/9.7.26...9.7.27) (2023-10-17)

### Bug Fixes
Expand Down Expand Up @@ -120,8 +114,6 @@

### Bug Fixes

> > > > > > > main
- **deps:** bump @salesforce/kit from 3.0.9 to 3.0.11 ([#1090](https://github.com/forcedotcom/source-deploy-retrieve/issues/1090)) ([17c4ef0](https://github.com/forcedotcom/source-deploy-retrieve/commit/17c4ef059d9f9585613c2ee6707ffe8449358600))

## [9.7.7](https://github.com/forcedotcom/source-deploy-retrieve/compare/9.7.6...9.7.7) (2023-08-22)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const componentIsExpandedArchive = async (component: SourceComponent): Promise<b
async function getStaticResourceZip(component: SourceComponent, content: string): Promise<JSZip> {
try {
const staticResourceZip = await component.tree.readFile(content);
return await JSZip.loadAsync(staticResourceZip);
return await JSZip.loadAsync(staticResourceZip, { createFolders: true });
} catch (e) {
throw new SfError(`Unable to open zip file ${content} for ${component.name} (${component.xml})`, 'BadZipFile', [
'Check that your file really is a valid zip archive',
Expand Down
2 changes: 1 addition & 1 deletion src/resolve/treeContainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class ZipTreeContainer extends TreeContainer {
}

public static async create(buffer: Buffer): Promise<ZipTreeContainer> {
const zip = await JSZip.loadAsync(buffer);
const zip = await JSZip.loadAsync(buffer, { createFolders: true });
return new ZipTreeContainer(zip);
}

Expand Down

2 comments on commit 63180e6

@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: 63180e6 Previous: 792e959 Ratio
eda-componentSetCreate-linux 335 ms 270 ms 1.24
eda-sourceToMdapi-linux 7088 ms 7001 ms 1.01
eda-sourceToZip-linux 5909 ms 5704 ms 1.04
eda-mdapiToSource-linux 4642 ms 4003 ms 1.16
lotsOfClasses-componentSetCreate-linux 692 ms 659 ms 1.05
lotsOfClasses-sourceToMdapi-linux 10426 ms 10153 ms 1.03
lotsOfClasses-sourceToZip-linux 8614 ms 8572 ms 1.00
lotsOfClasses-mdapiToSource-linux 5735 ms 4645 ms 1.23
lotsOfClassesOneDir-componentSetCreate-linux 1022 ms 937 ms 1.09
lotsOfClassesOneDir-sourceToMdapi-linux 14566 ms 12858 ms 1.13
lotsOfClassesOneDir-sourceToZip-linux 14141 ms 12930 ms 1.09
lotsOfClassesOneDir-mdapiToSource-linux 10121 ms 8443 ms 1.20

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: 63180e6 Previous: 792e959 Ratio
eda-componentSetCreate-win32 475 ms 634 ms 0.75
eda-sourceToMdapi-win32 9156 ms 10380 ms 0.88
eda-sourceToZip-win32 6325 ms 7267 ms 0.87
eda-mdapiToSource-win32 7768 ms 9772 ms 0.79
lotsOfClasses-componentSetCreate-win32 1039 ms 1381 ms 0.75
lotsOfClasses-sourceToMdapi-win32 14496 ms 16529 ms 0.88
lotsOfClasses-sourceToZip-win32 9331 ms 11535 ms 0.81
lotsOfClasses-mdapiToSource-win32 9810 ms 11992 ms 0.82
lotsOfClassesOneDir-componentSetCreate-win32 1875 ms 2321 ms 0.81
lotsOfClassesOneDir-sourceToMdapi-win32 22986 ms 26820 ms 0.86
lotsOfClassesOneDir-sourceToZip-win32 16302 ms 18368 ms 0.89
lotsOfClassesOneDir-mdapiToSource-win32 17214 ms 21422 ms 0.80

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

Please sign in to comment.