Skip to content

Commit

Permalink
fix: stl uses project api version
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Oct 2, 2023
1 parent 6c9296a commit 268df38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/sourceTracking.ts
Expand Up @@ -154,7 +154,7 @@ export class SourceTracking extends AsyncCreatable {
if (applyIgnore) {
this.forceIgnore ??= ForceIgnore.findAndCreate(this.project.getDefaultPackage().path);
}
const [changeResults, sourceBackedComponents] = await Promise.all([
const [changeResults, sourceBackedComponents, projectConfig] = await Promise.all([
// all changes based on remote tracking
this.getChanges({
origin: 'remote',
Expand All @@ -167,6 +167,9 @@ export class SourceTracking extends AsyncCreatable {
state: 'nondelete',
format: 'SourceComponent',
}),
this.project.resolveProjectConfig() as {
sourceApiVersion?: string;
},
]);
const componentSet = new ComponentSet(
applyIgnore
Expand All @@ -181,6 +184,9 @@ export class SourceTracking extends AsyncCreatable {
componentSet.add(mm);
});

if (projectConfig.sourceApiVersion) {
componentSet.sourceApiVersion = projectConfig.sourceApiVersion;
}
return componentSet;
}
/**
Expand Down

0 comments on commit 268df38

Please sign in to comment.