From 1efe750d9c15c1f1f8532c3c0a13646a66979055 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Thu, 10 Mar 2022 17:29:48 -0500 Subject: [PATCH 1/4] fix: add separate import path for test utilities Signed-off-by: Matt Rice --- index.ts | 5 ----- test.ts | 10 ++++++++++ tsconfig.json | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 test.ts diff --git a/index.ts b/index.ts index 6ca6bbf93..515806496 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1 @@ -export * from "./test/fixtures/SpokePool.Fixture"; -export * from "./test/fixtures/HubPool.Fixture"; -export * from "./test/fixtures/MerkleLib.Fixture"; -export * from "./test/constants"; -export * from "./test/utils"; export * from "./typechain"; diff --git a/test.ts b/test.ts new file mode 100644 index 000000000..84a363fda --- /dev/null +++ b/test.ts @@ -0,0 +1,10 @@ +// Note: this file sits on a separate export path and is intended to export test utilities and code: +// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/test. +// This is separated because this code assumes the caller has a hardhat config because it imports +// hardhat. For non-test code, import the standard index file: +// import * as contracts-v2 from "@across-protocol/contracts-v2" +export * from "./test/fixtures/SpokePool.Fixture"; +export * from "./test/fixtures/HubPool.Fixture"; +export * from "./test/fixtures/MerkleLib.Fixture"; +export * from "./test/constants"; +export * from "./test/utils"; diff --git a/tsconfig.json b/tsconfig.json index 3d233e5df..fc3213213 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,6 @@ "declaration": true, "skipLibCheck": true }, - "include": ["./scripts", "./test", "./typechain", "./index.ts"], + "include": ["./scripts", "./test", "./typechain", "./index.ts", "./test.ts"], "files": ["./hardhat.config.ts"] } From 7796af062551f01f17a4c6b78fe02df19543e084 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Thu, 10 Mar 2022 17:48:50 -0500 Subject: [PATCH 2/4] WIP Signed-off-by: Matt Rice --- test.ts => test-utils.ts | 2 +- tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename test.ts => test-utils.ts (94%) diff --git a/test.ts b/test-utils.ts similarity index 94% rename from test.ts rename to test-utils.ts index 84a363fda..c5ef9bf4d 100644 --- a/test.ts +++ b/test-utils.ts @@ -1,5 +1,5 @@ // Note: this file sits on a separate export path and is intended to export test utilities and code: -// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/test. +// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/test-utils. // This is separated because this code assumes the caller has a hardhat config because it imports // hardhat. For non-test code, import the standard index file: // import * as contracts-v2 from "@across-protocol/contracts-v2" diff --git a/tsconfig.json b/tsconfig.json index fc3213213..c4b670412 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,6 @@ "declaration": true, "skipLibCheck": true }, - "include": ["./scripts", "./test", "./typechain", "./index.ts", "./test.ts"], + "include": ["./scripts", "./test", "./typechain", "./index.ts", "./test-utils.ts"], "files": ["./hardhat.config.ts"] } From 10d1770284aff0ad5307bb9cecb3f079c9bb10b2 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Fri, 11 Mar 2022 09:41:59 -0500 Subject: [PATCH 3/4] WIP Signed-off-by: Matt Rice --- test-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-utils.ts b/test-utils.ts index c5ef9bf4d..ed5247170 100644 --- a/test-utils.ts +++ b/test-utils.ts @@ -1,5 +1,5 @@ // Note: this file sits on a separate export path and is intended to export test utilities and code: -// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/test-utils. +// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/test-utils". // This is separated because this code assumes the caller has a hardhat config because it imports // hardhat. For non-test code, import the standard index file: // import * as contracts-v2 from "@across-protocol/contracts-v2" From 3f25b8a3b54e1ef596e9921943111ddaf3632375 Mon Sep 17 00:00:00 2001 From: chrismaree Date: Fri, 11 Mar 2022 11:22:26 -0500 Subject: [PATCH 4/4] nit Signed-off-by: chrismaree --- package.json | 2 +- test-utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cc35fc5c0..7c21103d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@across-protocol/contracts-v2", - "version": "0.0.24", + "version": "0.0.25", "author": "UMA Team", "license": "AGPL-3.0", "repository": { diff --git a/test-utils.ts b/test-utils.ts index ed5247170..fd65e9ddd 100644 --- a/test-utils.ts +++ b/test-utils.ts @@ -1,5 +1,5 @@ // Note: this file sits on a separate export path and is intended to export test utilities and code: -// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/test-utils". +// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/dist/test-utils". // This is separated because this code assumes the caller has a hardhat config because it imports // hardhat. For non-test code, import the standard index file: // import * as contracts-v2 from "@across-protocol/contracts-v2"