From a1a1890a06c1c806c63c09f7bb8de1f860156e99 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:39:11 -0500 Subject: [PATCH] rm another semver check --- packages/transformer/src/IModelTransformer.ts | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/packages/transformer/src/IModelTransformer.ts b/packages/transformer/src/IModelTransformer.ts index dd45aba5..e1621ec1 100644 --- a/packages/transformer/src/IModelTransformer.ts +++ b/packages/transformer/src/IModelTransformer.ts @@ -24,7 +24,6 @@ import { } from "@itwin/core-bentley"; import * as ECSchemaMetaData from "@itwin/ecschema-metadata"; import { Point3d, Transform } from "@itwin/core-geometry"; -import * as coreBackendPkgJson from "@itwin/core-backend/package.json"; import { BriefcaseManager, ChangedECInstance, @@ -397,9 +396,6 @@ export class IModelTransformer extends IModelExportHandler { "targetScopeElementId" | "danglingReferencesBehavior" >; - /** @see hasDefinitionContainerDeletionFeature */ - private _hasDefinitionContainerDeletionFeature?: boolean; - /** * A private variable meant to be set by tests which have an outdated way of setting up transforms. In all synchronizations today we expect to find an ESA in the branch db which describes the master -> branch relationship. * The exception to this is the first transform aka the provenance initializing transform which requires that the master imodel and the branch imodel are identical at the time of provenance initialization. @@ -905,20 +901,6 @@ export class IModelTransformer extends IModelExportHandler { private _cachedSynchronizationVersion: ChangesetIndexAndId | undefined = undefined; - /** - * As of itwinjs 4.6.0, definitionContainers are now deleted as if they were DefinitionPartitions as opposed to Definitions. - * This variable being true will be used to special case the deletion of DefinitionContainers the same way DefinitionPartitions are deleted. - */ - protected get hasDefinitionContainerDeletionFeature(): boolean { - if (this._hasDefinitionContainerDeletionFeature === undefined) { - this._hasDefinitionContainerDeletionFeature = Semver.satisfies( - coreBackendPkgJson.version, - "^4.6.0" - ); - } - return this._hasDefinitionContainerDeletionFeature; - } - /** * We cache the synchronization version to avoid querying the target scoping ESA multiple times. * If the target scoping ESA is ever updated we need to clear any potentially cached sync version otherwise we will get stale values. @@ -1973,9 +1955,7 @@ export class IModelTransformer extends IModelExportHandler { if (!Id64.isValidId64(targetModelId)) return; - let sql: string; - if (this.hasDefinitionContainerDeletionFeature) { - sql = ` + const sql = ` SELECT 1 FROM bis.DefinitionPartition WHERE ECInstanceId=:targetModelId @@ -1984,13 +1964,6 @@ export class IModelTransformer extends IModelExportHandler { FROM bis.DefinitionContainer WHERE ECInstanceId=:targetModelId `; - } else { - sql = ` - SELECT 1 - FROM bis.DefinitionPartition - WHERE ECInstanceId=:targetModelId - `; - } if (this.exporter.sourceDbChanges?.element.deleteIds.has(sourceModelId)) { const isDefinitionPartition = this.targetDb.withPreparedStatement(