From b3e1ebb75fc12d193d2e185f5790f279565c9b4b Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 9 Sep 2024 14:47:32 +0900 Subject: [PATCH] refactor(assert,expect): import internal APIs from more specific paths (#5923) --- assert/equals.ts | 6 +++++- assert/strict_equals.ts | 6 +++++- expect/_build_message.ts | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/assert/equals.ts b/assert/equals.ts index 669c668ee..03e014853 100644 --- a/assert/equals.ts +++ b/assert/equals.ts @@ -1,7 +1,11 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module is browser compatible. import { equal } from "./equal.ts"; -import { buildMessage, diff, diffStr, format } from "@std/internal"; +import { buildMessage } from "@std/internal/build-message"; +import { diff } from "@std/internal/diff"; +import { diffStr } from "@std/internal/diff-str"; +import { format } from "@std/internal/format"; + import { AssertionError } from "./assertion_error.ts"; /** diff --git a/assert/strict_equals.ts b/assert/strict_equals.ts index 81a170d91..db70d879d 100644 --- a/assert/strict_equals.ts +++ b/assert/strict_equals.ts @@ -1,6 +1,10 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module is browser compatible. -import { buildMessage, diff, diffStr, format, red } from "@std/internal"; +import { buildMessage } from "@std/internal/build-message"; +import { diff } from "@std/internal/diff"; +import { diffStr } from "@std/internal/diff-str"; +import { format } from "@std/internal/format"; +import { red } from "@std/internal/styles"; import { AssertionError } from "./assertion_error.ts"; /** diff --git a/expect/_build_message.ts b/expect/_build_message.ts index ef3394f18..e13fd3058 100644 --- a/expect/_build_message.ts +++ b/expect/_build_message.ts @@ -1,6 +1,9 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { buildMessage, diff, diffStr, format } from "@std/internal"; +import { buildMessage } from "@std/internal/build-message"; +import { diff } from "@std/internal/diff"; +import { diffStr } from "@std/internal/diff-str"; +import { format } from "@std/internal/format"; import type { EqualOptions } from "./_types.ts"; type EqualErrorMessageOptions = Pick<