Skip to content

Commit 3a8a6dc

Browse files
committed
Fix imports
1 parent be1b20b commit 3a8a6dc

25 files changed

+75
-75
lines changed

test/examples/catTypeAndEntity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { typePredicateParser } from '../../src/lib/support/entitySupport'
2-
import { Entity } from '../../src/lib/entities'
1+
import { typePredicateParser } from '../../src/lib/support/entitySupport.js'
2+
import { Entity } from '../../src/lib/entities.js'
33

44
export interface Cat {
55
farm: string

test/examples/chickenTypeAndEntity.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { typePredicateParser } from '../../src/lib/support/entitySupport'
1+
import { typePredicateParser } from '../../src/lib/support/entitySupport.js'
22
import {
33
rangeWhereSkBeginsWith,
44
rangeWhereSkGreaterThan,
55
rangeWhereSkLessThan
6-
} from '../../src/lib/support/querySupport'
7-
import { Entity } from '../../src/lib/entities'
6+
} from '../../src/lib/support/querySupport.js'
7+
import { Entity } from '../../src/lib/entities.js'
88

99
export interface Chicken {
1010
breed: string

test/examples/dogTypeAndEntity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { typePredicateParser } from '../../src/lib/support/entitySupport'
2-
import { Entity } from '../../src/lib/entities'
1+
import { typePredicateParser } from '../../src/lib/support/entitySupport.js'
2+
import { Entity } from '../../src/lib/entities.js'
33

44
export interface Dog {
55
farm: string

test/examples/duckTypeAndEntity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { typePredicateParser } from '../../src/lib/support/entitySupport'
2-
import { Entity } from '../../src/lib/entities'
1+
import { typePredicateParser } from '../../src/lib/support/entitySupport.js'
2+
import { Entity } from '../../src/lib/entities.js'
33

44
export interface Duck {
55
breed: string

test/examples/farmTypeAndEntity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { DynamoDBValues, MetaAttributeNames } from '../../src/lib/entities'
2-
import { entityFromPkOnlyEntity, getPKValue, keyOnlyFormatter } from '../../src/lib/support/entitySupport'
1+
import { DynamoDBValues, MetaAttributeNames } from '../../src/lib/entities.js'
2+
import { entityFromPkOnlyEntity, getPKValue, keyOnlyFormatter } from '../../src/lib/support/entitySupport.js'
33

44
export interface Farm {
55
name: string

test/examples/sheepTypeAndEntity.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { createEntity } from '../../src/lib/support/entitySupport'
2-
import { rangeWhereSkBetween } from '../../src/lib/support/querySupport'
3-
import { DynamoDBValues } from '../../src/lib'
1+
import { createEntity } from '../../src/lib/support/entitySupport.js'
2+
import { rangeWhereSkBetween } from '../../src/lib/support/querySupport.js'
3+
import { DynamoDBValues } from '../../src/lib/index.js'
44

55
export interface Sheep {
66
breed: string

test/examples/testData.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Chicken } from './chickenTypeAndEntity'
2-
import { Duck } from './duckTypeAndEntity'
3-
import { Sheep } from './sheepTypeAndEntity'
4-
import { Dog } from './dogTypeAndEntity'
5-
import { Cat } from './catTypeAndEntity'
6-
import { Farm } from './farmTypeAndEntity'
1+
import { Chicken } from './chickenTypeAndEntity.js'
2+
import { Duck } from './duckTypeAndEntity.js'
3+
import { Sheep } from './sheepTypeAndEntity.js'
4+
import { Dog } from './dogTypeAndEntity.js'
5+
import { Cat } from './catTypeAndEntity.js'
6+
import { Farm } from './farmTypeAndEntity.js'
77

88
export const shaunIdentifier = { breed: 'merino', name: 'shaun' }
99
export const shaunTheSheep: Sheep = { ...shaunIdentifier, ageInYears: 3 }

test/integration/integrationTests.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { beforeAll, beforeEach, describe, expect, test } from 'vitest'
3-
import { initAWSResources } from './testSupportCode/integrationTestEnvironment'
4-
import { rangeWhereNameBetween, Sheep, SHEEP_ENTITY } from '../examples/sheepTypeAndEntity'
3+
import { initAWSResources } from './testSupportCode/integrationTestEnvironment.js'
4+
import { rangeWhereNameBetween, Sheep, SHEEP_ENTITY } from '../examples/sheepTypeAndEntity.js'
55
import {
66
alisonIdentifier,
77
alisonTheAlpaca,
@@ -19,7 +19,7 @@ import {
1919
sunflowerFarm,
2020
waddles,
2121
yolko
22-
} from '../examples/testData'
22+
} from '../examples/testData.js'
2323
import { DeleteCommand, DynamoDBDocumentClient, ScanCommand } from '@aws-sdk/lib-dynamodb'
2424
import {
2525
AllEntitiesStore,
@@ -31,20 +31,20 @@ import {
3131
noopLogger,
3232
SingleEntityOperations,
3333
TablesConfig
34-
} from '../../src/lib'
34+
} from '../../src/lib/index.js'
3535
import {
3636
Chicken,
3737
CHICKEN_ENTITY,
3838
findOlderThan,
3939
findYoungerThan,
4040
gsiBreed,
4141
TWO_GSI_CHICKEN_ENTITY
42-
} from '../examples/chickenTypeAndEntity'
43-
import { FARM_ENTITY } from '../examples/farmTypeAndEntity'
44-
import { FakeClock } from '../unit/testSupportCode/fakes/fakeClock'
45-
import { DUCK_ENTITY } from '../examples/duckTypeAndEntity'
46-
import { DOG_ENTITY } from '../examples/dogTypeAndEntity'
47-
import { CAT_ENTITY } from '../examples/catTypeAndEntity'
42+
} from '../examples/chickenTypeAndEntity.js'
43+
import { FARM_ENTITY } from '../examples/farmTypeAndEntity.js'
44+
import { FakeClock } from '../unit/testSupportCode/fakes/fakeClock.js'
45+
import { DUCK_ENTITY } from '../examples/duckTypeAndEntity.js'
46+
import { DOG_ENTITY } from '../examples/dogTypeAndEntity.js'
47+
import { CAT_ENTITY } from '../examples/catTypeAndEntity.js'
4848

4949
// I've put all of the integration tests in this one file to slightly speed up test runs by only
5050
// looking up CloudFormation values once. I couldn't find a way to do this otherwise with vitest

test/integration/testSupportCode/integrationTestEnvironment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CloudFormationClient, DescribeStacksCommand } from '@aws-sdk/client-cloudformation'
2-
import { throwError } from '../../../src/lib'
2+
import { throwError } from '../../../src/lib/index.js'
33
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'
44
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'
55

test/unit/dateAndTime.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
dateTimeAddHours,
55
dateTimeAddMinutes,
66
dateTimeAddSeconds
7-
} from '../../src/lib/util/dateAndTime'
7+
} from '../../src/lib/util/dateAndTime.js'
88

99
test('dateTimeAdd', () => {
1010
expect(dateTimeAddDays(new Date('2023-03-01T01:23:45'), 3)).toEqual(new Date('2023-03-04T01:23:45'))

0 commit comments

Comments
 (0)