From 11cf13e1edd7122193643bae59e50b694513cbfc Mon Sep 17 00:00:00 2001 From: Gytis Cepkauskas Date: Mon, 18 Nov 2024 13:47:44 +0200 Subject: [PATCH 1/5] Update TS compile target to ES2023 and module to ES2022 --- common/api/ecschema-metadata.api.md | 36 ++++++++----------- core/bentley/package.json | 2 +- core/common/package.json | 2 +- .../ecschema-editing/src/Editing/ECClasses.ts | 15 +++++--- core/ecschema-metadata/package.json | 2 +- core/ecschema-metadata/src/Metadata/Class.ts | 9 ++--- .../src/Metadata/Constant.ts | 3 +- .../src/Metadata/CustomAttributeClass.ts | 10 ++---- .../src/Metadata/EntityClass.ts | 10 ++---- .../src/Metadata/Enumeration.ts | 3 +- core/ecschema-metadata/src/Metadata/Format.ts | 4 +-- .../src/Metadata/InvertedUnit.ts | 8 +---- .../src/Metadata/KindOfQuantity.ts | 10 ++---- core/ecschema-metadata/src/Metadata/Mixin.ts | 3 +- .../src/Metadata/Phenomenon.ts | 3 +- .../src/Metadata/PropertyCategory.ts | 3 +- .../src/Metadata/RelationshipClass.ts | 4 +-- core/ecschema-metadata/src/Metadata/Unit.ts | 3 +- .../src/Metadata/UnitSystem.ts | 8 +---- core/ecschema-rpc/common/package.json | 2 +- core/ecsql/common/package.json | 2 +- core/frontend-devtools/package.json | 2 +- core/frontend/package.json | 2 +- core/geometry/package.json | 2 +- core/hypermodeling/package.json | 2 +- core/i18n/package.json | 2 +- core/markup/package.json | 2 +- core/orbitgt/package.json | 2 +- core/quantity/package.json | 2 +- core/telemetry/package.json | 2 +- core/webgl-compatibility/package.json | 2 +- editor/common/package.json | 2 +- editor/frontend/package.json | 2 +- extensions/frontend-tiles/package.json | 2 +- extensions/map-layers-auth/package.json | 2 +- extensions/map-layers-formats/package.json | 2 +- tools/build/tsconfig-base.json | 2 +- ui/appui-abstract/package.json | 2 +- 38 files changed, 64 insertions(+), 112 deletions(-) diff --git a/common/api/ecschema-metadata.api.md b/common/api/ecschema-metadata.api.md index 934a716f0f6a..adf07602c7ee 100644 --- a/common/api/ecschema-metadata.api.md +++ b/common/api/ecschema-metadata.api.md @@ -119,7 +119,7 @@ export class Constant extends SchemaItem { // (undocumented) protected _phenomenon?: LazyLoadedPhenomenon; // (undocumented) - readonly schemaItemType: SchemaItemType.Constant; + readonly schemaItemType = SchemaItemType.Constant; // @alpha protected setDefinition(definition: string): void; // @alpha @@ -158,7 +158,6 @@ export interface CustomAttribute { // @beta export class CustomAttributeClass extends ECClass { - constructor(schema: Schema, name: string, modifier?: ECClassModifier); // (undocumented) get appliesTo(): CustomAttributeContainerType; // (undocumented) @@ -170,7 +169,7 @@ export class CustomAttributeClass extends ECClass { // (undocumented) fromJSONSync(customAttributeProps: CustomAttributeClassProps): void; // (undocumented) - readonly schemaItemType: SchemaItemType.CustomAttributeClass; + readonly schemaItemType = SchemaItemType.CustomAttributeClass; // @alpha protected setAppliesTo(containerType: CustomAttributeContainerType): void; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): CustomAttributeClassProps; @@ -500,7 +499,6 @@ export class ECVersion { // @beta export class EntityClass extends ECClass { - constructor(schema: Schema, name: string, modifier?: ECClassModifier); // (undocumented) protected addMixin(mixin: Mixin): void; // (undocumented) @@ -524,7 +522,7 @@ export class EntityClass extends ECClass { // (undocumented) protected _mixins?: LazyLoadedMixin[]; // (undocumented) - readonly schemaItemType: SchemaItemType.EntityClass; + readonly schemaItemType = SchemaItemType.EntityClass; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): EntityClassProps; // @internal (undocumented) toXml(schemaXml: Document): Promise; @@ -562,7 +560,7 @@ export class Enumeration extends SchemaItem { // (undocumented) get isString(): boolean; // (undocumented) - readonly schemaItemType: SchemaItemType.Enumeration; + readonly schemaItemType = SchemaItemType.Enumeration; // @alpha protected setIsStrict(isStrict: boolean): void; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): EnumerationProps; @@ -661,7 +659,7 @@ export class Format extends SchemaItem { // (undocumented) get roundFactor(): number; // (undocumented) - readonly schemaItemType: SchemaItemType.Format; + readonly schemaItemType = SchemaItemType.Format; // (undocumented) get scientificType(): ScientificType | undefined; // @alpha @@ -708,7 +706,6 @@ export function getFormatProps(format: Format | OverrideFormat): FormatProps; // @beta export class InvertedUnit extends SchemaItem { - constructor(schema: Schema, name: string); // (undocumented) fromJSON(invertedUnitProps: InvertedUnitProps): Promise; // (undocumented) @@ -720,7 +717,7 @@ export class InvertedUnit extends SchemaItem { // @alpha (undocumented) static isInvertedUnit(object: any): object is InvertedUnit; // (undocumented) - readonly schemaItemType: SchemaItemType.InvertedUnit; + readonly schemaItemType = SchemaItemType.InvertedUnit; // @alpha protected setInvertsUnit(invertsUnit: LazyLoadedUnit): void; // @alpha @@ -803,7 +800,6 @@ export interface ISchemaPartVisitor { // @beta export class KindOfQuantity extends SchemaItem { - constructor(schema: Schema, name: string); // (undocumented) protected addPresentationFormat(format: Format | OverrideFormat, isDefault?: boolean): void; protected createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[Unit | InvertedUnit, string | undefined]>): OverrideFormat; @@ -825,7 +821,7 @@ export class KindOfQuantity extends SchemaItem { // (undocumented) protected _relativeError: number; // (undocumented) - readonly schemaItemType: SchemaItemType.KindOfQuantity; + readonly schemaItemType = SchemaItemType.KindOfQuantity; // @alpha protected setRelativeError(relativeError: number): void; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): KindOfQuantityProps; @@ -915,7 +911,7 @@ export class Mixin extends ECClass { // (undocumented) fromJSONSync(mixinProps: MixinProps): void; // (undocumented) - readonly schemaItemType: SchemaItemType.Mixin; + readonly schemaItemType = SchemaItemType.Mixin; // @alpha protected setAppliesTo(appliesTo: LazyLoadedEntityClass): void; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): MixinProps; @@ -1058,7 +1054,7 @@ export class Phenomenon extends SchemaItem { // (undocumented) fromJSONSync(phenomenonProps: PhenomenonProps): void; // (undocumented) - readonly schemaItemType: SchemaItemType.Phenomenon; + readonly schemaItemType = SchemaItemType.Phenomenon; // (undocumented) protected setDefinition(definition: string): Promise; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): PhenomenonProps; @@ -1287,7 +1283,7 @@ export class PropertyCategory extends SchemaItem { // (undocumented) protected _priority: number; // (undocumented) - readonly schemaItemType: SchemaItemType.PropertyCategory; + readonly schemaItemType = SchemaItemType.PropertyCategory; // @alpha protected setPriority(priority: number): void; toJSON(standalone?: boolean, includeSchemaVersion?: boolean): PropertyCategoryProps; @@ -1420,9 +1416,7 @@ export class RelationshipClass extends ECClass { // (undocumented) fromJSONSync(relationshipClassProps: RelationshipClassProps): void; // (undocumented) - readonly schema: Schema; - // (undocumented) - readonly schemaItemType: SchemaItemType.RelationshipClass; + readonly schemaItemType = SchemaItemType.RelationshipClass; // @alpha protected setSourceConstraint(source: RelationshipConstraint): void; // @alpha @@ -2100,9 +2094,8 @@ export interface StructArrayPropertyProps extends ArrayPropertyProps { // @beta export class StructClass extends ECClass { - constructor(schema: Schema, name: string, modifier?: ECClassModifier); // (undocumented) - readonly schemaItemType: SchemaItemType.StructClass; + readonly schemaItemType = SchemaItemType.StructClass; } // @beta (undocumented) @@ -2168,7 +2161,7 @@ export class Unit extends SchemaItem { // (undocumented) protected _phenomenon?: LazyLoadedPhenomenon; // (undocumented) - readonly schemaItemType: SchemaItemType.Unit; + readonly schemaItemType = SchemaItemType.Unit; // @alpha protected setDefinition(definition: string): Promise; // @alpha @@ -2209,9 +2202,8 @@ export class UnitConverter { // @beta (undocumented) export class UnitSystem extends SchemaItem { - constructor(schema: Schema, name: string); // (undocumented) - readonly schemaItemType: SchemaItemType.UnitSystem; + readonly schemaItemType = SchemaItemType.UnitSystem; } // @beta (undocumented) diff --git a/core/bentley/package.json b/core/bentley/package.json index 91d360a5c9eb..341bda8faba5 100644 --- a/core/bentley/package.json +++ b/core/bentley/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "extract-api": "betools extract-api --entry=core-bentley", "test": "vitest --run", diff --git a/core/common/package.json b/core/common/package.json index 223e8cc506d3..19b093932584 100644 --- a/core/common/package.json +++ b/core/common/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "docs": "betools docs --json=../../generated-docs/core/core-common/file.json --tsIndexFile=./core-common.ts --onlyJson", "extract-api": "betools extract-api --entry=core-common && npm run extract-extension-api", diff --git a/core/ecschema-editing/src/Editing/ECClasses.ts b/core/ecschema-editing/src/Editing/ECClasses.ts index 2762a4715cb4..423b78ba8b57 100644 --- a/core/ecschema-editing/src/Editing/ECClasses.ts +++ b/core/ecschema-editing/src/Editing/ECClasses.ts @@ -35,6 +35,11 @@ export class ECClasses extends SchemaItems{ protected constructor(schemaItemType: ECClassSchemaItems, schemaEditor: SchemaContextEditor) { super(schemaItemType, schemaEditor); this.schemaItemType = schemaItemType; + this.properties = new Properties(this.schemaItemType, this.schemaEditor); + this.arrayProperties = new ArrayProperties(this.schemaItemType, this.schemaEditor); + this.primitiveProperties = new PrimitiveProperties(this.schemaItemType, this.schemaEditor); + this.enumerationProperties = new EnumerationProperties(this.schemaItemType, this.schemaEditor); + this.structProperties = new StructProperties(this.schemaItemType, this.schemaEditor); } protected override schemaItemType: ECClassSchemaItems; @@ -42,23 +47,23 @@ export class ECClasses extends SchemaItems{ /** * Allows access for editing of base Property attributes. */ - public readonly properties = new Properties(this.schemaItemType, this.schemaEditor); + public readonly properties: Properties; /** * Allows access for editing of ArrayProperty attributes. */ - public readonly arrayProperties = new ArrayProperties(this.schemaItemType, this.schemaEditor); + public readonly arrayProperties: ArrayProperties; /** * Allows access for editing of PrimitiveProperty attributes. */ - public readonly primitiveProperties = new PrimitiveProperties(this.schemaItemType, this.schemaEditor); + public readonly primitiveProperties: PrimitiveProperties; /** * Allows access for editing of EnumerationProperty attributes. */ - public readonly enumerationProperties = new EnumerationProperties(this.schemaItemType, this.schemaEditor); + public readonly enumerationProperties: EnumerationProperties; /** * Allows access for editing of StructProperty attributes. */ - public readonly structProperties = new StructProperties(this.schemaItemType, this.schemaEditor); + public readonly structProperties: StructProperties; public async createClass(schemaKey: SchemaKey, type: SchemaItemType, create: CreateSchemaItem, name: string, baseClassKey?: SchemaItemKey, ...args: any[]): Promise { const newClass = await this.createSchemaItem(schemaKey, type, create, name, ...args); diff --git a/core/ecschema-metadata/package.json b/core/ecschema-metadata/package.json index 8acbb4a633d2..a8c248e36c66 100644 --- a/core/ecschema-metadata/package.json +++ b/core/ecschema-metadata/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs && npm run -s copy:test-assets", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:test-assets": "cpx \"./src/test/assets/**/*\" ./lib/cjs/test/assets", "extract-api": "betools extract-api --entry=ecschema-metadata", diff --git a/core/ecschema-metadata/src/Metadata/Class.ts b/core/ecschema-metadata/src/Metadata/Class.ts index 0912c33f99ac..bc97c0397aa9 100644 --- a/core/ecschema-metadata/src/Metadata/Class.ts +++ b/core/ecschema-metadata/src/Metadata/Class.ts @@ -411,7 +411,7 @@ export abstract class ECClass extends SchemaItem implements CustomAttributeConta if (undefined !== classProps.modifier) { const modifier = parseClassModifier(classProps.modifier); if (undefined === modifier) { - if (SchemaReadHelper.isECSpecVersionNewer({readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion} as ECSpecVersion)) + if (SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion } as ECSpecVersion)) this._modifier = ECClassModifier.None; else throw new ECObjectsError(ECObjectsStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`); @@ -696,12 +696,7 @@ export abstract class ECClass extends SchemaItem implements CustomAttributeConta * @beta */ export class StructClass extends ECClass { - public override readonly schemaItemType!: SchemaItemType.StructClass; - - constructor(schema: Schema, name: string, modifier?: ECClassModifier) { - super(schema, name, modifier); - this.schemaItemType = SchemaItemType.StructClass; - } + public override readonly schemaItemType = SchemaItemType.StructClass; } /** diff --git a/core/ecschema-metadata/src/Metadata/Constant.ts b/core/ecschema-metadata/src/Metadata/Constant.ts index 9665bf3d30d0..ad46f68e69b6 100644 --- a/core/ecschema-metadata/src/Metadata/Constant.ts +++ b/core/ecschema-metadata/src/Metadata/Constant.ts @@ -22,7 +22,7 @@ import { SchemaItem } from "./SchemaItem"; * @beta */ export class Constant extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.Constant; + public override readonly schemaItemType = SchemaItemType.Constant; protected _phenomenon?: LazyLoadedPhenomenon; protected _definition: string; protected _numerator?: number; @@ -30,7 +30,6 @@ export class Constant extends SchemaItem { constructor(schema: Schema, name: string) { super(schema, name); - this.schemaItemType = SchemaItemType.Constant; this._definition = ""; } diff --git a/core/ecschema-metadata/src/Metadata/CustomAttributeClass.ts b/core/ecschema-metadata/src/Metadata/CustomAttributeClass.ts index 4840e347a729..4fbc77eec0a0 100644 --- a/core/ecschema-metadata/src/Metadata/CustomAttributeClass.ts +++ b/core/ecschema-metadata/src/Metadata/CustomAttributeClass.ts @@ -8,18 +8,17 @@ import { CustomAttributeClassProps } from "../Deserialization/JsonProps"; import { - containerTypeToString, CustomAttributeContainerType, ECClassModifier, parseCustomAttributeContainerType, SchemaItemType, + containerTypeToString, CustomAttributeContainerType, parseCustomAttributeContainerType, SchemaItemType, } from "../ECObjects"; import { ECObjectsError, ECObjectsStatus } from "../Exception"; import { ECClass } from "./Class"; -import { Schema } from "./Schema"; /** * A Typescript class representation of an ECCustomAttributeClass. * @beta */ export class CustomAttributeClass extends ECClass { - public override readonly schemaItemType!: SchemaItemType.CustomAttributeClass; + public override readonly schemaItemType = SchemaItemType.CustomAttributeClass; protected _appliesTo?: CustomAttributeContainerType; /** @@ -35,11 +34,6 @@ export class CustomAttributeClass extends ECClass { return this._appliesTo; } - constructor(schema: Schema, name: string, modifier?: ECClassModifier) { - super(schema, name, modifier); - this.schemaItemType = SchemaItemType.CustomAttributeClass; - } - /** * Save this CustomAttributeClasses properties to an object for serializing to JSON. * @param standalone Serialization includes only this object (as opposed to the full schema). diff --git a/core/ecschema-metadata/src/Metadata/EntityClass.ts b/core/ecschema-metadata/src/Metadata/EntityClass.ts index 5e0179b3b496..ce29ae00ad8e 100644 --- a/core/ecschema-metadata/src/Metadata/EntityClass.ts +++ b/core/ecschema-metadata/src/Metadata/EntityClass.ts @@ -9,7 +9,7 @@ import { DelayedPromiseWithProps } from "../DelayedPromise"; import { EntityClassProps } from "../Deserialization/JsonProps"; import { XmlSerializationUtils } from "../Deserialization/XmlSerializationUtils"; -import { ECClassModifier, parseStrengthDirection, SchemaItemType, StrengthDirection } from "../ECObjects"; +import { parseStrengthDirection, SchemaItemType, StrengthDirection } from "../ECObjects"; import { ECObjectsError, ECObjectsStatus } from "../Exception"; import { LazyLoadedMixin } from "../Interfaces"; import { SchemaItemKey } from "../SchemaKey"; @@ -17,21 +17,15 @@ import { ECClass } from "./Class"; import { Mixin } from "./Mixin"; import { AnyProperty, NavigationProperty, Property } from "./Property"; import { RelationshipClass } from "./RelationshipClass"; -import { Schema } from "./Schema"; /** * A Typescript class representation of an ECEntityClass. * @beta */ export class EntityClass extends ECClass { - public override readonly schemaItemType!: SchemaItemType.EntityClass; + public override readonly schemaItemType = SchemaItemType.EntityClass; protected _mixins?: LazyLoadedMixin[]; - constructor(schema: Schema, name: string, modifier?: ECClassModifier) { - super(schema, name, modifier); - this.schemaItemType = SchemaItemType.EntityClass; - } - public get mixins(): LazyLoadedMixin[] { if (!this._mixins) return []; diff --git a/core/ecschema-metadata/src/Metadata/Enumeration.ts b/core/ecschema-metadata/src/Metadata/Enumeration.ts index 70ff928f473e..11b5beeb8b56 100644 --- a/core/ecschema-metadata/src/Metadata/Enumeration.ts +++ b/core/ecschema-metadata/src/Metadata/Enumeration.ts @@ -30,7 +30,7 @@ export type AnyEnumerator = Enumerator; * @beta */ export class Enumeration extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.Enumeration; + public override readonly schemaItemType = SchemaItemType.Enumeration; protected _type?: PrimitiveType.Integer | PrimitiveType.String; protected _isStrict: boolean; protected _enumerators: AnyEnumerator[]; @@ -41,7 +41,6 @@ export class Enumeration extends SchemaItem { constructor(schema: Schema, name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String) { super(schema, name); - this.schemaItemType = SchemaItemType.Enumeration; this._type = primitiveType; this._isStrict = true; this._enumerators = []; diff --git a/core/ecschema-metadata/src/Metadata/Format.ts b/core/ecschema-metadata/src/Metadata/Format.ts index 957e46c2d8a9..e0888e7d38aa 100644 --- a/core/ecschema-metadata/src/Metadata/Format.ts +++ b/core/ecschema-metadata/src/Metadata/Format.ts @@ -23,14 +23,12 @@ import { Unit } from "./Unit"; * @beta */ export class Format extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.Format; + public override readonly schemaItemType = SchemaItemType.Format; protected _base: BaseFormat; protected _units?: Array<[Unit | InvertedUnit, string | undefined]>; constructor(schema: Schema, name: string) { super(schema, name); - this.schemaItemType = SchemaItemType.Format; - this._base = new BaseFormat(name); } diff --git a/core/ecschema-metadata/src/Metadata/InvertedUnit.ts b/core/ecschema-metadata/src/Metadata/InvertedUnit.ts index a2e27f1e0680..1c08a04ae462 100644 --- a/core/ecschema-metadata/src/Metadata/InvertedUnit.ts +++ b/core/ecschema-metadata/src/Metadata/InvertedUnit.ts @@ -13,7 +13,6 @@ import { SchemaItemType } from "../ECObjects"; import { ECObjectsError, ECObjectsStatus } from "../Exception"; import { LazyLoadedUnit, LazyLoadedUnitSystem } from "../Interfaces"; import { SchemaItemKey } from "../SchemaKey"; -import { Schema } from "./Schema"; import { SchemaItem } from "./SchemaItem"; import { Unit } from "./Unit"; import { UnitSystem } from "./UnitSystem"; @@ -23,15 +22,10 @@ import { UnitSystem } from "./UnitSystem"; * @beta */ export class InvertedUnit extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.InvertedUnit; + public override readonly schemaItemType = SchemaItemType.InvertedUnit; protected _invertsUnit?: LazyLoadedUnit; // required protected _unitSystem?: LazyLoadedUnitSystem; // required - constructor(schema: Schema, name: string) { - super(schema, name); - this.schemaItemType = SchemaItemType.InvertedUnit; - } - public get invertsUnit(): LazyLoadedUnit | undefined { return this._invertsUnit; } public get unitSystem(): LazyLoadedUnitSystem | undefined { return this._unitSystem; } diff --git a/core/ecschema-metadata/src/Metadata/KindOfQuantity.ts b/core/ecschema-metadata/src/Metadata/KindOfQuantity.ts index f04e7dcc4425..8873e6db3493 100644 --- a/core/ecschema-metadata/src/Metadata/KindOfQuantity.ts +++ b/core/ecschema-metadata/src/Metadata/KindOfQuantity.ts @@ -15,7 +15,6 @@ import { LazyLoadedInvertedUnit, LazyLoadedUnit } from "../Interfaces"; import { Format } from "./Format"; import { InvertedUnit } from "./InvertedUnit"; import { OverrideFormat, OverrideFormatProps } from "./OverrideFormat"; -import { Schema } from "./Schema"; import { SchemaItem } from "./SchemaItem"; import { Unit } from "./Unit"; @@ -23,7 +22,7 @@ import { Unit } from "./Unit"; * @beta */ export class KindOfQuantity extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.KindOfQuantity; + public override readonly schemaItemType = SchemaItemType.KindOfQuantity; // Needed to allow both run-time and compile-time check. protected _relativeError: number = 1.0; protected _presentationFormats: Array = new Array(); protected _persistenceUnit?: LazyLoadedUnit | LazyLoadedInvertedUnit; @@ -35,15 +34,10 @@ export class KindOfQuantity extends SchemaItem { public get presentationFormats(): Array { return this._presentationFormats; } public get persistenceUnit(): LazyLoadedUnit | LazyLoadedInvertedUnit | undefined { return this._persistenceUnit; } - protected set persistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined) { this._persistenceUnit = value; } + protected set persistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined) { this._persistenceUnit = value; } public get relativeError() { return this._relativeError; } - constructor(schema: Schema, name: string) { - super(schema, name); - this.schemaItemType = SchemaItemType.KindOfQuantity; // Needed to allow both run-time and compile-time check. - } - /** * * @param format The Format to add to this KindOfQuantity diff --git a/core/ecschema-metadata/src/Metadata/Mixin.ts b/core/ecschema-metadata/src/Metadata/Mixin.ts index 6c77a30cb3eb..a8149e6534fe 100644 --- a/core/ecschema-metadata/src/Metadata/Mixin.ts +++ b/core/ecschema-metadata/src/Metadata/Mixin.ts @@ -24,7 +24,7 @@ import { Schema } from "./Schema"; * @beta */ export class Mixin extends ECClass { - public override readonly schemaItemType!: SchemaItemType.Mixin; + public override readonly schemaItemType = SchemaItemType.Mixin; protected _appliesTo?: LazyLoadedEntityClass; public get appliesTo(): LazyLoadedEntityClass | undefined { @@ -33,7 +33,6 @@ export class Mixin extends ECClass { constructor(schema: Schema, name: string) { super(schema, name, ECClassModifier.Abstract); - this.schemaItemType = SchemaItemType.Mixin; } /** diff --git a/core/ecschema-metadata/src/Metadata/Phenomenon.ts b/core/ecschema-metadata/src/Metadata/Phenomenon.ts index ab58be85c0cc..b2290e0bd73d 100644 --- a/core/ecschema-metadata/src/Metadata/Phenomenon.ts +++ b/core/ecschema-metadata/src/Metadata/Phenomenon.ts @@ -14,12 +14,11 @@ import { SchemaItem } from "./SchemaItem"; /** @beta */ export class Phenomenon extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.Phenomenon; + public override readonly schemaItemType = SchemaItemType.Phenomenon; protected _definition: string; // Contains a combination of Phenomena names which form this Phenomenon. Each Phenomena name is separated by a * and may have an exponent, specified using parentheses constructor(schema: Schema, name: string) { super(schema, name); - this.schemaItemType = SchemaItemType.Phenomenon; this._definition = ""; } diff --git a/core/ecschema-metadata/src/Metadata/PropertyCategory.ts b/core/ecschema-metadata/src/Metadata/PropertyCategory.ts index 4dcf4d705636..0d0ce75c731b 100644 --- a/core/ecschema-metadata/src/Metadata/PropertyCategory.ts +++ b/core/ecschema-metadata/src/Metadata/PropertyCategory.ts @@ -15,14 +15,13 @@ import { SchemaItem } from "./SchemaItem"; * @beta */ export class PropertyCategory extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.PropertyCategory; + public override readonly schemaItemType = SchemaItemType.PropertyCategory; protected _priority: number; public get priority() { return this._priority; } constructor(schema: Schema, name: string) { super(schema, name); - this.schemaItemType = SchemaItemType.PropertyCategory; this._priority = 0; } diff --git a/core/ecschema-metadata/src/Metadata/RelationshipClass.ts b/core/ecschema-metadata/src/Metadata/RelationshipClass.ts index 339fa4db6123..8bb1728f0ef3 100644 --- a/core/ecschema-metadata/src/Metadata/RelationshipClass.ts +++ b/core/ecschema-metadata/src/Metadata/RelationshipClass.ts @@ -32,8 +32,7 @@ type AnyConstraintClass = EntityClass | Mixin | RelationshipClass; * @beta */ export class RelationshipClass extends ECClass { - public override readonly schema!: Schema; - public override readonly schemaItemType!: SchemaItemType.RelationshipClass; + public override readonly schemaItemType = SchemaItemType.RelationshipClass; protected _strength: StrengthType; protected _strengthDirection: StrengthDirection; protected _source: RelationshipConstraint; @@ -41,7 +40,6 @@ export class RelationshipClass extends ECClass { constructor(schema: Schema, name: string, modifier?: ECClassModifier) { super(schema, name, modifier); - this.schemaItemType = SchemaItemType.RelationshipClass; this._strengthDirection = StrengthDirection.Forward; this._strength = StrengthType.Referencing; this._source = new RelationshipConstraint(this, RelationshipEnd.Source); diff --git a/core/ecschema-metadata/src/Metadata/Unit.ts b/core/ecschema-metadata/src/Metadata/Unit.ts index 73fb539dc5e8..e488fe2f1377 100644 --- a/core/ecschema-metadata/src/Metadata/Unit.ts +++ b/core/ecschema-metadata/src/Metadata/Unit.ts @@ -24,7 +24,7 @@ import { UnitSystem } from "./UnitSystem"; * @beta */ export class Unit extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.Unit; + public override readonly schemaItemType = SchemaItemType.Unit; protected _phenomenon?: LazyLoadedPhenomenon; protected _unitSystem?: LazyLoadedUnitSystem; protected _definition: string; @@ -34,7 +34,6 @@ export class Unit extends SchemaItem { constructor(schema: Schema, name: string) { super(schema, name); - this.schemaItemType = SchemaItemType.Unit; this._definition = ""; } diff --git a/core/ecschema-metadata/src/Metadata/UnitSystem.ts b/core/ecschema-metadata/src/Metadata/UnitSystem.ts index 70596305d5a0..7c0231e4a56e 100644 --- a/core/ecschema-metadata/src/Metadata/UnitSystem.ts +++ b/core/ecschema-metadata/src/Metadata/UnitSystem.ts @@ -7,19 +7,13 @@ */ import { SchemaItemType } from "../ECObjects"; -import { Schema } from "./Schema"; import { SchemaItem } from "./SchemaItem"; /** * @beta */ export class UnitSystem extends SchemaItem { - public override readonly schemaItemType!: SchemaItemType.UnitSystem; - - constructor(schema: Schema, name: string) { - super(schema, name); - this.schemaItemType = SchemaItemType.UnitSystem; - } + public override readonly schemaItemType = SchemaItemType.UnitSystem; } /** diff --git a/core/ecschema-rpc/common/package.json b/core/ecschema-rpc/common/package.json index 219689c658c8..26a2f99d8fae 100644 --- a/core/ecschema-rpc/common/package.json +++ b/core/ecschema-rpc/common/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "cover": "", "docs": "", diff --git a/core/ecsql/common/package.json b/core/ecsql/common/package.json index 1a4a7184c994..81d6968d3aa2 100644 --- a/core/ecsql/common/package.json +++ b/core/ecsql/common/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "docs": "betools docs --json=../../../generated-docs/core/ecsql-common/file.json --tsIndexFile=./ecsql-common.ts --onlyJson", "extract-api": "betools extract-api --entry=ecsql-common", diff --git a/core/frontend-devtools/package.json b/core/frontend-devtools/package.json index bd53b7d0ae97..621b4e6b10dc 100644 --- a/core/frontend-devtools/package.json +++ b/core/frontend-devtools/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "copy:public": "cpx \"./public/**/*\" ./lib/public", "clean": "rimraf lib .rush/temp/package-deps*.json", "docs": "betools docs --json=../../generated-docs/core/frontend-devtools/file.json --tsIndexFile=./frontend-devtools.ts --onlyJson", diff --git a/core/frontend/package.json b/core/frontend/package.json index e874868c6a5e..2e62ebe4baba 100644 --- a/core/frontend/package.json +++ b/core/frontend/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers", "build:cjs": "npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs", - "build:esm": "npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:public": "cpx \"./src/public/**/*\" ./lib/public", "copy:js:cjs": "cpx \"./src/**/*.js\" ./lib/cjs", diff --git a/core/geometry/package.json b/core/geometry/package.json index 1664ea292ba8..553c5655cf63 100644 --- a/core/geometry/package.json +++ b/core/geometry/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json ./src/test/output", "watch": "tsc --watch", "test": "vitest --run", diff --git a/core/hypermodeling/package.json b/core/hypermodeling/package.json index c227e63a7faf..12b1ce94681d 100644 --- a/core/hypermodeling/package.json +++ b/core/hypermodeling/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:public": "cpx \"./src/public/**/*\" ./lib/public", "cover": "npm -s test", diff --git a/core/i18n/package.json b/core/i18n/package.json index 5454dfc6ce45..3799f81e36a8 100644 --- a/core/i18n/package.json +++ b/core/i18n/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm && npm run -s webpack:test", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "docs": "betools docs --json=../../generated-docs/core/core-i18n/file.json --tsIndexFile=./core-i18n.ts --onlyJson", "extract-api": "betools extract-api --entry=core-i18n", diff --git a/core/markup/package.json b/core/markup/package.json index d25297a1ad2a..cf17b0dac33e 100644 --- a/core/markup/package.json +++ b/core/markup/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:public": "cpx \"./src/public/**/*\" ./lib/public", "cover": "npm -s test", diff --git a/core/orbitgt/package.json b/core/orbitgt/package.json index 314fe7ccb556..968ff051c715 100644 --- a/core/orbitgt/package.json +++ b/core/orbitgt/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs && npm run -s copy:test-assets", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:test-assets": "cpx \"./src/test/assets/**/*\" ./lib/cjs/test/assets", "docs": "betools docs --json=../../generated-docs/core/core-orbitgt/file.json --tsIndexFile=./core-orbitgt.ts --onlyJson", diff --git a/core/quantity/package.json b/core/quantity/package.json index 9dc5f673a1a2..30e1ced6c798 100644 --- a/core/quantity/package.json +++ b/core/quantity/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json .nyc_output", "extract-api": "betools extract-api --entry=core-quantity", "lint": "eslint \"./src/**/*.ts\" 1>&2", diff --git a/core/telemetry/package.json b/core/telemetry/package.json index 5521d6b0fa02..b19628e33ed0 100644 --- a/core/telemetry/package.json +++ b/core/telemetry/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "cover": "", "test": "", diff --git a/core/webgl-compatibility/package.json b/core/webgl-compatibility/package.json index a956eccff196..141ecc741e61 100644 --- a/core/webgl-compatibility/package.json +++ b/core/webgl-compatibility/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "cover": "npm -s test", "docs": "betools docs --json=../../generated-docs/core/webgl-compatibility/file.json --tsIndexFile=./webgl-compatibility.ts --onlyJson", diff --git a/editor/common/package.json b/editor/common/package.json index 78f88bb0a381..7ed895d693ab 100644 --- a/editor/common/package.json +++ b/editor/common/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "docs": "betools docs --json=../../generated-docs/editor/editor-common/file.json --tsIndexFile=./editor-common.ts --onlyJson", "extract-api": "betools extract-api --entry=editor-common", diff --git a/editor/frontend/package.json b/editor/frontend/package.json index 6148c4720a39..f539abdc34d5 100644 --- a/editor/frontend/package.json +++ b/editor/frontend/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s copy:locale && npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:locale": "cpx \"./src/public/**/*\" ./lib/public", "docs": "betools docs --json=../../generated-docs/editor/editor-frontend/file.json --tsIndexFile=./editor-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives --excludeGlob=**/*-css.ts", diff --git a/extensions/frontend-tiles/package.json b/extensions/frontend-tiles/package.json index 3d1d8743de4d..9123b136a532 100644 --- a/extensions/frontend-tiles/package.json +++ b/extensions/frontend-tiles/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "cover": "npm -s test", "docs": "", diff --git a/extensions/map-layers-auth/package.json b/extensions/map-layers-auth/package.json index ec792f242fb8..c1e2bce2d9a9 100644 --- a/extensions/map-layers-auth/package.json +++ b/extensions/map-layers-auth/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "cover": "nyc npm -s test", "docs": "", diff --git a/extensions/map-layers-formats/package.json b/extensions/map-layers-formats/package.json index 98e40ce08d42..9840c92b70b0 100644 --- a/extensions/map-layers-formats/package.json +++ b/extensions/map-layers-formats/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "npm run -s copy:locale && npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "clean": "rimraf lib .rush/temp/package-deps*.json", "copy:locale": "cpx \"./src/public/**/*\" ./lib/public", "cover": "nyc npm -s test", diff --git a/tools/build/tsconfig-base.json b/tools/build/tsconfig-base.json index f2a7721c5b6d..66241c10afb1 100644 --- a/tools/build/tsconfig-base.json +++ b/tools/build/tsconfig-base.json @@ -23,6 +23,6 @@ "strict": true, "strictNullChecks": true, "stripInternal": false, - "target": "ES2021" + "target": "ES2023" } } diff --git a/ui/appui-abstract/package.json b/ui/appui-abstract/package.json index 262502a266b4..73af05b0643b 100644 --- a/ui/appui-abstract/package.json +++ b/ui/appui-abstract/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "npm run -s build:cjs && npm run -s build:esm", "build:cjs": "tsc 1>&2 --outDir lib/cjs", - "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm", + "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm", "copy:locale": "cpx \"./public/**/*\" ./lib/public", "pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./public/locales/en-PSEUDO", "clean": "rimraf lib .rush/temp/package-deps*.json", From 4432b78f944ecb2e3214b4a53fb8701adcc82cf7 Mon Sep 17 00:00:00 2001 From: Gytis Cepkauskas Date: Mon, 18 Nov 2024 13:56:41 +0200 Subject: [PATCH 2/5] Update missed options --- presentation/common/tsconfig.esm.json | 4 ++-- presentation/frontend/tsconfig.esm.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/presentation/common/tsconfig.esm.json b/presentation/common/tsconfig.esm.json index 0377d56a6a36..6160bd4c9478 100644 --- a/presentation/common/tsconfig.esm.json +++ b/presentation/common/tsconfig.esm.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "ES2020", + "module": "ES2022", "outDir": "lib/esm", }, -} \ No newline at end of file +} diff --git a/presentation/frontend/tsconfig.esm.json b/presentation/frontend/tsconfig.esm.json index 0377d56a6a36..6160bd4c9478 100644 --- a/presentation/frontend/tsconfig.esm.json +++ b/presentation/frontend/tsconfig.esm.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "ES2020", + "module": "ES2022", "outDir": "lib/esm", }, -} \ No newline at end of file +} From dbf69392789fceeb4ee0140aebed22aa9226020d Mon Sep 17 00:00:00 2001 From: Gytis Cepkauskas Date: Mon, 18 Nov 2024 14:30:05 +0200 Subject: [PATCH 3/5] Changelogs --- ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ ...bump-compile-target-to-es2023_2024-11-18-12-29.json | 10 ++++++++++ docs/changehistory/NextVersion.md | 5 +++++ docs/learning/SupportedPlatforms.md | 2 +- 27 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 common/changes/@itwin/appui-abstract/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/build-tools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-bentley/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-geometry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-i18n/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-markup/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-orbitgt/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-quantity/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/core-telemetry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/ecschema-editing/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/ecschema-metadata/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/ecschema-rpcinterface-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/ecsql-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/editor-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/editor-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/frontend-devtools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/frontend-tiles/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/hypermodeling-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/map-layers-auth/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/map-layers-formats/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/presentation-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/presentation-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json create mode 100644 common/changes/@itwin/webgl-compatibility/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json diff --git a/common/changes/@itwin/appui-abstract/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/appui-abstract/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..65d633404adc --- /dev/null +++ b/common/changes/@itwin/appui-abstract/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/appui-abstract", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/appui-abstract" +} \ No newline at end of file diff --git a/common/changes/@itwin/build-tools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/build-tools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..2a477d337e9c --- /dev/null +++ b/common/changes/@itwin/build-tools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/build-tools", + "comment": "Upgrade compile target to ES2023", + "type": "none" + } + ], + "packageName": "@itwin/build-tools" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-bentley/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-bentley/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..7e9bdf39d64a --- /dev/null +++ b/common/changes/@itwin/core-bentley/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-bentley", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-bentley" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..b8d80eef8032 --- /dev/null +++ b/common/changes/@itwin/core-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-common", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-common" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..e679524481a8 --- /dev/null +++ b/common/changes/@itwin/core-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-frontend", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-frontend" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-geometry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-geometry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..5e217261f334 --- /dev/null +++ b/common/changes/@itwin/core-geometry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-geometry", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-geometry" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-i18n/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-i18n/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..9c6ecc3cbbea --- /dev/null +++ b/common/changes/@itwin/core-i18n/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-i18n", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-i18n" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-markup/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-markup/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..7a422536f88e --- /dev/null +++ b/common/changes/@itwin/core-markup/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-markup", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-markup" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-orbitgt/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-orbitgt/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..3a82c305a727 --- /dev/null +++ b/common/changes/@itwin/core-orbitgt/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-orbitgt", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-orbitgt" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-quantity/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-quantity/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..7df878b4494c --- /dev/null +++ b/common/changes/@itwin/core-quantity/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-quantity", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-quantity" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-telemetry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/core-telemetry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..dabdd4187ea3 --- /dev/null +++ b/common/changes/@itwin/core-telemetry/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-telemetry", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/core-telemetry" +} \ No newline at end of file diff --git a/common/changes/@itwin/ecschema-editing/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/ecschema-editing/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..193cd0371043 --- /dev/null +++ b/common/changes/@itwin/ecschema-editing/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/ecschema-editing", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/ecschema-editing" +} \ No newline at end of file diff --git a/common/changes/@itwin/ecschema-metadata/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/ecschema-metadata/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..8cd3ed025d48 --- /dev/null +++ b/common/changes/@itwin/ecschema-metadata/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/ecschema-metadata", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/ecschema-metadata" +} \ No newline at end of file diff --git a/common/changes/@itwin/ecschema-rpcinterface-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/ecschema-rpcinterface-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..7ab9d8ac2084 --- /dev/null +++ b/common/changes/@itwin/ecschema-rpcinterface-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/ecschema-rpcinterface-common", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/ecschema-rpcinterface-common" +} \ No newline at end of file diff --git a/common/changes/@itwin/ecsql-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/ecsql-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..c86f53cb3a82 --- /dev/null +++ b/common/changes/@itwin/ecsql-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/ecsql-common", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/ecsql-common" +} \ No newline at end of file diff --git a/common/changes/@itwin/editor-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/editor-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..c22a8982b36e --- /dev/null +++ b/common/changes/@itwin/editor-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/editor-common", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/editor-common" +} \ No newline at end of file diff --git a/common/changes/@itwin/editor-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/editor-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..79b12f7a6d94 --- /dev/null +++ b/common/changes/@itwin/editor-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/editor-frontend", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/editor-frontend" +} \ No newline at end of file diff --git a/common/changes/@itwin/frontend-devtools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/frontend-devtools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..590f5f30ada2 --- /dev/null +++ b/common/changes/@itwin/frontend-devtools/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/frontend-devtools", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/frontend-devtools" +} \ No newline at end of file diff --git a/common/changes/@itwin/frontend-tiles/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/frontend-tiles/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..0326cca935f1 --- /dev/null +++ b/common/changes/@itwin/frontend-tiles/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/frontend-tiles", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/frontend-tiles" +} \ No newline at end of file diff --git a/common/changes/@itwin/hypermodeling-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/hypermodeling-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..5e41ef8a5ccf --- /dev/null +++ b/common/changes/@itwin/hypermodeling-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/hypermodeling-frontend", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/hypermodeling-frontend" +} \ No newline at end of file diff --git a/common/changes/@itwin/map-layers-auth/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/map-layers-auth/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..ee1de269822d --- /dev/null +++ b/common/changes/@itwin/map-layers-auth/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/map-layers-auth", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/map-layers-auth" +} \ No newline at end of file diff --git a/common/changes/@itwin/map-layers-formats/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/map-layers-formats/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..edf0b45d091a --- /dev/null +++ b/common/changes/@itwin/map-layers-formats/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/map-layers-formats", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/map-layers-formats" +} \ No newline at end of file diff --git a/common/changes/@itwin/presentation-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/presentation-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..db650a875a70 --- /dev/null +++ b/common/changes/@itwin/presentation-common/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/presentation-common", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/presentation-common" +} \ No newline at end of file diff --git a/common/changes/@itwin/presentation-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/presentation-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..be0a0e10d27c --- /dev/null +++ b/common/changes/@itwin/presentation-frontend/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/presentation-frontend", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/presentation-frontend" +} \ No newline at end of file diff --git a/common/changes/@itwin/webgl-compatibility/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json b/common/changes/@itwin/webgl-compatibility/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json new file mode 100644 index 000000000000..12f5bee488db --- /dev/null +++ b/common/changes/@itwin/webgl-compatibility/gytis-bump-compile-target-to-es2023_2024-11-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/webgl-compatibility", + "comment": "Upgrade compile target to ES2023 and module to ES2022", + "type": "none" + } + ], + "packageName": "@itwin/webgl-compatibility" +} \ No newline at end of file diff --git a/docs/changehistory/NextVersion.md b/docs/changehistory/NextVersion.md index 7a9fc3038fa2..4477198484f7 100644 --- a/docs/changehistory/NextVersion.md +++ b/docs/changehistory/NextVersion.md @@ -13,6 +13,7 @@ Table of contents: - [Updated minimum requirements](#updated-minimum-requirements) - [Node.js](#nodejs) - [Electron](#electron) + - [ECMAScript](#ecmascript) - [Deprecated API removals](#deprecated-api-removals) ## API deprecations @@ -39,6 +40,10 @@ Node 18 will reach [end-of-life](https://github.com/nodejs/release?tab=readme-ov iTwin.js now supports only the latest Electron release (Electron 33) and has dropped support for all older Electron releases. This decision was made because Electron releases major updates much more frequently than iTwin.js and it is difficult to support a high number of major versions. +#### ECMAScript + +`@itwin/build-tools` has bumped the [TypeScript compilation target](https://www.typescriptlang.org/tsconfig#target) from [ES2021](https://262.ecma-international.org/12.0/) to [ES2023](https://262.ecma-international.org/14.0/). This means that JavaScript files provided by core packages should be run in [environments supporting ES2023 features](https://compat-table.github.io/compat-table/es2016plus/). + ### Deprecated API removals The following previously-deprecated APIs have been removed: diff --git a/docs/learning/SupportedPlatforms.md b/docs/learning/SupportedPlatforms.md index 8ada1ab89811..587cb66e1a46 100644 --- a/docs/learning/SupportedPlatforms.md +++ b/docs/learning/SupportedPlatforms.md @@ -36,7 +36,7 @@ The following Node.js versions are officially supported by the iTwin.js backend ## Supported Browsers -iTwin.js strives to support as many modern browsers as possible, though it requires complete JavaScript ES6 support. The quality of the web browser's WebGL implementation has a substantial impact on display performance. +iTwin.js strives to support as many modern browsers as possible, though it requires JavaScript ES2023 support. The quality of the web browser's WebGL implementation has a substantial impact on display performance. - Chrome (recommended for development) - Firefox From 83d66df492779608818891db630ee4a87c615106 Mon Sep 17 00:00:00 2001 From: Gytis Cepkauskas Date: Mon, 9 Dec 2024 22:56:23 +0200 Subject: [PATCH 4/5] Set /useDefineForClassFields to alse in ts config --- tools/build/tsconfig-base.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/tsconfig-base.json b/tools/build/tsconfig-base.json index 66241c10afb1..70efba29f04a 100644 --- a/tools/build/tsconfig-base.json +++ b/tools/build/tsconfig-base.json @@ -23,6 +23,7 @@ "strict": true, "strictNullChecks": true, "stripInternal": false, + "useDefineForClassFields": false, "target": "ES2023" } } From 7d41fac21124ca9b09d62ec55f4a244f1b1321a8 Mon Sep 17 00:00:00 2001 From: Gytis Cepkauskas Date: Fri, 20 Dec 2024 15:53:11 +0200 Subject: [PATCH 5/5] Restore accidentally deleted class field --- common/api/ecschema-metadata.api.md | 2 ++ core/ecschema-metadata/src/Metadata/RelationshipClass.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/common/api/ecschema-metadata.api.md b/common/api/ecschema-metadata.api.md index cb8319c4dba1..89e85f104720 100644 --- a/common/api/ecschema-metadata.api.md +++ b/common/api/ecschema-metadata.api.md @@ -1416,6 +1416,8 @@ export class RelationshipClass extends ECClass { // (undocumented) fromJSONSync(relationshipClassProps: RelationshipClassProps): void; // (undocumented) + readonly schema: Schema; + // (undocumented) readonly schemaItemType = SchemaItemType.RelationshipClass; // @alpha protected setSourceConstraint(source: RelationshipConstraint): void; diff --git a/core/ecschema-metadata/src/Metadata/RelationshipClass.ts b/core/ecschema-metadata/src/Metadata/RelationshipClass.ts index 8bb1728f0ef3..335fcc399a64 100644 --- a/core/ecschema-metadata/src/Metadata/RelationshipClass.ts +++ b/core/ecschema-metadata/src/Metadata/RelationshipClass.ts @@ -32,6 +32,7 @@ type AnyConstraintClass = EntityClass | Mixin | RelationshipClass; * @beta */ export class RelationshipClass extends ECClass { + public override readonly schema!: Schema; public override readonly schemaItemType = SchemaItemType.RelationshipClass; protected _strength: StrengthType; protected _strengthDirection: StrengthDirection;