chore: move to swc/jest (#7739)
* chore: move to swc * chore: fix tax rate tests * chore: undo failed test * chore: fix unit tests script * chore: use node 20 * Update scripts/run-workspace-unit-tests-in-chunks.sh
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
createPsqlIndexStatementHelper,
|
||||
DALUtils,
|
||||
generateEntityId,
|
||||
Searchable,
|
||||
} from "@medusajs/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Collection,
|
||||
@@ -9,13 +15,8 @@ import {
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import {
|
||||
createPsqlIndexStatementHelper,
|
||||
DALUtils,
|
||||
generateEntityId,
|
||||
Searchable,
|
||||
} from "@medusajs/utils"
|
||||
|
||||
import { DAL } from "@medusajs/types"
|
||||
import { InventoryLevel } from "./inventory-level"
|
||||
@@ -117,7 +118,7 @@ export class InventoryItem {
|
||||
cascade: ["soft-remove" as any],
|
||||
}
|
||||
)
|
||||
location_levels = new Collection<InventoryLevel>(this)
|
||||
location_levels = new Collection<Rel<InventoryLevel>>(this)
|
||||
|
||||
@OneToMany(
|
||||
() => ReservationItem,
|
||||
@@ -126,7 +127,7 @@ export class InventoryItem {
|
||||
cascade: ["soft-remove" as any],
|
||||
}
|
||||
)
|
||||
reservation_items = new Collection<ReservationItem>(this)
|
||||
reservation_items = new Collection<Rel<ReservationItem>>(this)
|
||||
|
||||
@Formula(
|
||||
(item) =>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { DALUtils, isDefined } from "@medusajs/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Entity,
|
||||
@@ -7,12 +8,14 @@ import {
|
||||
OnLoad,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
import { DALUtils, isDefined } from "@medusajs/utils"
|
||||
|
||||
import {
|
||||
createPsqlIndexStatementHelper,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
import { InventoryItem } from "./inventory-item"
|
||||
import { createPsqlIndexStatementHelper } from "@medusajs/utils"
|
||||
import { generateEntityId } from "@medusajs/utils"
|
||||
|
||||
const InventoryLevelDeletedAtIndex = createPsqlIndexStatementHelper({
|
||||
tableName: "inventory_level",
|
||||
@@ -90,7 +93,7 @@ export class InventoryLevel {
|
||||
@ManyToOne(() => InventoryItem, {
|
||||
persist: false,
|
||||
})
|
||||
inventory_item: InventoryItem
|
||||
inventory_item: Rel<InventoryItem>
|
||||
|
||||
available_quantity: number | null = null
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
OnInit,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
|
||||
import {
|
||||
@@ -98,7 +99,7 @@ export class ReservationItem {
|
||||
@ManyToOne(() => InventoryItem, {
|
||||
persist: false,
|
||||
})
|
||||
inventory_item: InventoryItem
|
||||
inventory_item: Rel<InventoryItem>
|
||||
|
||||
@BeforeCreate()
|
||||
private beforeCreate(): void {
|
||||
|
||||
Reference in New Issue
Block a user