Skip to content

Commit e907c68

Browse files
committed
fix: deploying an APEX class or Metadata file with unsaved changes causes it to deploy the version of the metadata before the changes are saved.
1 parent 49ddc12 commit e907c68

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/salesforce/src/deploy/packageBuilder.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import chalk from 'chalk';
33
import ZipArchive from 'jszip';
44

55
import { Logger, injectable, CachedFileSystemAdapter , FileSystem, Container, container } from '@vlocode/core';
6-
import { cache, substringAfterLast , Iterable, XML, CancellationToken, FileSystemUri, substringBeforeLast, stringEquals } from '@vlocode/util';
6+
import { cache, substringAfterLast , Iterable, XML, CancellationToken, FileSystemUri, substringBeforeLast, stringEquals, clearCache } from '@vlocode/util';
77

88
import { PackageManifest } from './maifest';
99
import { SalesforcePackage, SalesforcePackageComponent, SalesforcePackageComponentFile } from './package';
@@ -111,7 +111,7 @@ class TokenReplacement {
111111
}
112112
}
113113

114-
@injectable()
114+
@injectable.transient()
115115
export class SalesforcePackageBuilder {
116116

117117
/**
@@ -164,6 +164,7 @@ export class SalesforcePackageBuilder {
164164
* @returns {this} The current instance for method chaining.
165165
*/
166166
public rebuildPackage(token?: CancellationToken): Promise<this> {
167+
clearCache(this.fs);
167168
const sources = this.mdPackage.files();
168169
if (sources.size === 0) {
169170
// There is no point in rebuilding the package when no files are added

0 commit comments

Comments
 (0)