Skip to content

Commit c6af46f

Browse files
committed
fix: use .js extension for imports
1 parent e7e371b commit c6af46f

File tree

100 files changed

+264
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+264
-268
lines changed

e2e/node/basic/assets.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { existsSync, readFileSync, unlinkSync } from 'fs';
22
import path from 'path';
3-
import { makeAgent } from '../utils/agent';
3+
import { makeAgent } from '../utils/agent.ts';
44
import { Principal } from '@icp-sdk/core/principal';
55
import { AssetManager } from '@dfinity/assets';
66
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
77
import { Ed25519KeyIdentity } from '@icp-sdk/core/identity';
88
import { utf8ToBytes } from '@noble/hashes/utils';
9-
import { getCanisterId } from '../utils/canisterid';
9+
import { getCanisterId } from '../utils/canisterid.ts';
1010

1111
/**
1212
* Create (pseudo) random bytes Readable

e2e/node/basic/basic.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Certificate, LookupPathResultFound, LookupPathStatus } from '@icp-sdk/core/agent';
22
import { IDL, PipeArrayBuffer } from '@icp-sdk/core/candid';
33
import { Principal } from '@icp-sdk/core/principal';
4-
import agent from '../utils/agent';
4+
import agent from '../utils/agent.ts';
55
import { test, expect } from 'vitest';
66
import { utf8ToBytes } from '@noble/hashes/utils';
77

e2e/node/basic/canisterStatus.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { AgentError, CanisterStatus, HttpAgent } from '@icp-sdk/core/agent';
22
import { Principal } from '@icp-sdk/core/principal';
3-
import { makeAgent } from '../utils/agent';
3+
import { makeAgent } from '../utils/agent.ts';
44
import { describe, it, afterEach, expect } from 'vitest';
5-
import { getCanisterId } from '../utils/canisterid';
5+
import { getCanisterId } from '../utils/canisterid.ts';
66

77
afterEach(async () => {
88
await Promise.resolve();

e2e/node/basic/counter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Actor, HttpAgent, ActorMethod } from '@icp-sdk/core/agent';
2-
import { counterActor, counter2Actor, counterCanisterId, idl } from '../canisters/counter';
2+
import { counterActor, counter2Actor, counterCanisterId, idl } from '../canisters/counter.ts';
33
import { it, expect, describe, vi, beforeAll, beforeEach, afterAll } from 'vitest';
44

55
describe.sequential('counter', () => {

e2e/node/basic/identity.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
ECDSAKeyIdentity,
99
} from '@icp-sdk/core/identity';
1010
import { Secp256k1KeyIdentity } from '@icp-sdk/core/identity-secp256k1';
11-
import agent, { makeAgent } from '../utils/agent';
12-
import whoamiCanister from '../canisters/whoami';
11+
import agent, { makeAgent } from '../utils/agent.ts';
12+
import whoamiCanister from '../canisters/whoami.ts';
1313
import { test, expect } from 'vitest';
1414
import { IDL } from '@icp-sdk/core/candid';
1515

e2e/node/basic/mainnet.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { IDL } from '@icp-sdk/core/candid';
1313
import { Ed25519KeyIdentity } from '@icp-sdk/core/identity';
1414
import { Principal } from '@icp-sdk/core/principal';
1515
import { describe, it, expect, vi, test } from 'vitest';
16-
import { makeAgent } from '../utils/agent';
16+
import { makeAgent } from '../utils/agent.ts';
1717
import { hexToBytes } from '@noble/hashes/utils';
1818

1919
const { pollForResponse } = polling;

e2e/node/basic/mitm.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { createActor } from '../canisters/declarations/counter';
1+
import { createActor } from '../canisters/declarations/counter/index.ts';
22
import { test, expect, TestAPI } from 'vitest';
3-
import { makeAgent } from '../utils/agent';
3+
import { makeAgent } from '../utils/agent.ts';
44
import {
55
CertificateVerificationErrorCode,
66
QuerySignatureVerificationFailedErrorCode,
77
TrustError,
88
} from '@icp-sdk/core/agent';
9-
import { getCanisterId } from '../utils/canisterid';
9+
import { getCanisterId } from '../utils/canisterid.ts';
1010

1111
let mitmTest: TestAPI | typeof test.skip = test;
1212
if (!process.env['MITM']) {

e2e/node/basic/queryExpiry.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import {
44
prepareV2QueryResponse,
55
prepareV2ReadStateSubnetResponse,
66
prepareV2ReadStateTimeResponse,
7-
} from '../utils/mock-replica';
7+
} from '../utils/mock-replica.ts';
88
import { IDL } from '@icp-sdk/core/candid';
99
import { Principal } from '@icp-sdk/core/principal';
10-
import { KeyPair, randomIdentity, randomKeyPair } from '../utils/identity';
10+
import { KeyPair, randomIdentity, randomKeyPair } from '../utils/identity.ts';
1111
import {
1212
CertificateOutdatedErrorCode,
1313
HttpAgent,
1414
requestIdOf,
1515
TrustError,
1616
} from '@icp-sdk/core/agent';
17-
import { createActor } from '../canisters/counter';
17+
import { createActor } from '../canisters/counter.ts';
1818

1919
const MINUTE_TO_MSECS = 60 * 1_000;
2020

e2e/node/basic/syncTime.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import {
1313
import { Principal } from '@icp-sdk/core/principal';
1414
import { IDL } from '@icp-sdk/core/candid';
1515
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
16-
import { createActor } from '../canisters/counter';
16+
import { createActor } from '../canisters/counter.ts';
1717
import {
1818
MockReplica,
1919
prepareV2ReadStateTimeResponse,
2020
prepareV3Response,
21-
} from '../utils/mock-replica';
22-
import { randomIdentity, randomKeyPair } from '../utils/identity';
21+
} from '../utils/mock-replica.ts';
22+
import { randomIdentity, randomKeyPair } from '../utils/identity.ts';
2323
import { concatBytes } from '@noble/hashes/utils';
2424

2525
const INVALID_EXPIRY_ERROR =

e2e/node/canisters/counter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Actor, ActorSubclass, HttpAgentOptions, Agent, ActorConfig } from '@icp-sdk/core/agent';
2-
import { makeAgent } from '../utils/agent';
3-
import { type _SERVICE } from './declarations/counter/counter.did';
4-
import { getCanisterId } from '../utils/canisterid';
2+
import { makeAgent } from '../utils/agent.ts';
3+
import { type _SERVICE } from './declarations/counter/counter.did.ts';
4+
import { getCanisterId } from '../utils/canisterid.ts';
55
import { IDL } from '@icp-sdk/core/candid';
66
import { Principal } from '@icp-sdk/core/principal';
77

0 commit comments

Comments
 (0)