Skip to content

Commit dc218b0

Browse files
georgemoscuGeorge Moscu
authored andcommitted
Modified loaders to work with new infrastructure
1 parent d1d4bd3 commit dc218b0

29 files changed

+786
-188
lines changed

babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313

1414
module.exports = {
1515
presets: [['@babel/preset-env', {targets: {node: 'current'}}], '@babel/preset-typescript'],
16+
plugins: [
17+
['@babel/plugin-proposal-decorators', {legacy: true}],
18+
['@babel/plugin-proposal-class-properties', {loose: true}],
19+
],
1620
};

package-lock.json

Lines changed: 655 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@
3232
},
3333
"devDependencies": {
3434
"@babel/core": "^7.22.9",
35+
"@babel/plugin-proposal-class-properties": "^7.18.6",
36+
"@babel/plugin-proposal-decorators": "^7.24.7",
3537
"@babel/preset-env": "^7.22.9",
3638
"@babel/preset-typescript": "^7.22.5",
3739
"@types/jest": "^29.5.3",
3840
"@types/n3": "1.16.4",
3941
"@types/node": "^20.4.2",
4042
"@typescript-eslint/eslint-plugin": "^6.1.0",
4143
"@typescript-eslint/parser": "^6.1.0",
42-
"babel-jest": "^29.6.2",
44+
"babel-core": "^6.26.3",
45+
"babel-jest": "^29.7.0",
4346
"copyfiles": "2.4.1",
4447
"create-ts-index": "1.14.0",
4548
"eslint": "^8.45.0",
@@ -48,6 +51,7 @@
4851
"npm-snapshot": "1.1.1",
4952
"nyc": "15.1.0",
5053
"prettier": "^2.8.8",
54+
"regenerator-runtime": "^0.14.1",
5155
"rimraf": "5.0.5",
5256
"source-map-support": "0.5.21",
5357
"ts-loader": "9.5.0",

src/aspect-meta-model/characteristic/default-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class DefaultList extends DefaultCollection {
2121
this.ordered = true;
2222
}
2323

24-
getCollectionType(): CollectionType {
24+
override getCollectionType(): CollectionType {
2525
return CollectionType.LIST;
2626
}
2727
}

src/aspect-meta-model/characteristic/default-scalar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class DefaultScalar extends Type {
2323
this.scalar = true;
2424
}
2525

26-
public isScalar(): boolean {
26+
override isScalar(): boolean {
2727
return true;
2828
}
2929

src/aspect-meta-model/characteristic/default-set.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class DefaultSet extends DefaultCollection {
2121
this.ordered = false;
2222
}
2323

24-
getCollectionType(): CollectionType {
24+
override getCollectionType(): CollectionType {
2525
return CollectionType.SET;
2626
}
2727
}

src/aspect-meta-model/characteristic/default-sorted-set.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class DefaultSortedSet extends DefaultCollection {
2121
this.ordered = true;
2222
}
2323

24-
getCollectionType(): CollectionType {
24+
override getCollectionType(): CollectionType {
2525
return CollectionType.SORTEDSET;
2626
}
2727
}

src/aspect-meta-model/characteristic/default-trait.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ export class DefaultTrait extends DefaultCharacteristic implements Trait {
4242
return this.constraints;
4343
}
4444

45-
getDatatype(): Type {
45+
override getDatatype(): Type {
4646
return this.baseCharacteristic?.getDatatype();
4747
}
4848

49-
accept<T, U>(visitor: ModelVisitor<T, U>, context: U): T {
49+
override accept<T, U>(visitor: ModelVisitor<T, U>, context: U): T {
5050
return visitor.visitCharacteristic(this, context);
5151
}
5252
}

src/aspect-meta-model/complex-type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {EntityProps} from '../shared/props';
1919

2020
export interface ComplexType extends Type, StructureElement {}
2121
export abstract class ComplexType extends StructureElement implements ComplexType {
22-
@use(Type) _: ComplexType;
22+
@use(Type) declare _: ComplexType;
2323

2424
isAbstractEntity_: boolean = false;
2525
extends_: ComplexType = null;
@@ -32,7 +32,7 @@ export abstract class ComplexType extends StructureElement implements ComplexTyp
3232
this.extendingElements = props.extendingElements || [];
3333
}
3434

35-
isComplexType() {
35+
override isComplexType() {
3636
return true;
3737
}
3838

src/aspect-meta-model/default-entity-instance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class DefaultEntityInstance extends NamedElement implements EntityInstanc
3636
constructor(props: EntityInstanceProps) {
3737
super(props);
3838
this.type = props.type;
39-
this.assertions = props.assertions;
39+
this.assertions = props.assertions || new Map();
4040
}
4141

4242
getType(): Entity {

0 commit comments

Comments
 (0)