From dc8dc5bfbc2e98f8c40cd57d43dcf53cd1ee39b8 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Thu, 21 Nov 2024 12:09:22 +0100 Subject: [PATCH] Use node named import --- package.json | 1 - packages/as-sha256/scripts/codegen.ts | 2 +- packages/ssz/test/spec/downloadTests.ts | 4 ++-- packages/ssz/test/spec/generic/index.test.ts | 4 ++-- packages/ssz/test/spec/ssz_static.ts | 4 ++-- packages/ssz/test/spec/testRunner.ts | 4 ++-- packages/ssz/test/specTestVersioning.ts | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 5cae13232..066b084b5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "build": "yarn clean && lerna run build", "lint": "lerna run lint", "check-types": "lerna run check-types", - "test:unit": "lerna run test:unit", "test:browsers": "lerna run test:browsers", "test": "lerna run test", "benchmark:files": "NODE_OPTIONS=--max_old_space_size=4096 benchmark --config .benchrc.yaml", diff --git a/packages/as-sha256/scripts/codegen.ts b/packages/as-sha256/scripts/codegen.ts index d15b813a3..57388d865 100644 --- a/packages/as-sha256/scripts/codegen.ts +++ b/packages/as-sha256/scripts/codegen.ts @@ -2,7 +2,7 @@ // we preprocess the binary data into valid javascript code, a single exportable object. // which can be statically imported. -import fs from "fs"; +import fs from "node:fs"; const INPUT = "build/optimized.wasm"; const OUTPUT = "src/wasmCode.ts"; diff --git a/packages/ssz/test/spec/downloadTests.ts b/packages/ssz/test/spec/downloadTests.ts index 9c69fbe2d..29b68c305 100644 --- a/packages/ssz/test/spec/downloadTests.ts +++ b/packages/ssz/test/spec/downloadTests.ts @@ -1,5 +1,5 @@ -import fs from "fs"; -import path from "path"; +import fs from "node:fs"; +import path from "node:path"; import {execSync} from "child_process"; import {SPEC_TEST_LOCATION, SPEC_TEST_VERSION, SPEC_TEST_REPO_URL} from "../specTestVersioning"; diff --git a/packages/ssz/test/spec/generic/index.test.ts b/packages/ssz/test/spec/generic/index.test.ts index 0d03f3439..39c68e2af 100644 --- a/packages/ssz/test/spec/generic/index.test.ts +++ b/packages/ssz/test/spec/generic/index.test.ts @@ -1,6 +1,6 @@ import {describe, it, expect} from "vitest"; -import path from "path"; -import fs from "fs"; +import path from "node:path"; +import fs from "node:fs"; import {SPEC_TEST_LOCATION} from "../../specTestVersioning"; import {parseSszGenericValidTestcase, parseSszGenericInvalidTestcase} from "../testRunner"; import {runValidSszTest} from "../runValidTest"; diff --git a/packages/ssz/test/spec/ssz_static.ts b/packages/ssz/test/spec/ssz_static.ts index 100a12003..f20253f0b 100644 --- a/packages/ssz/test/spec/ssz_static.ts +++ b/packages/ssz/test/spec/ssz_static.ts @@ -1,5 +1,5 @@ -import fs from "fs"; -import path from "path"; +import fs from "node:fs"; +import path from "node:path"; import {describe, it, vi} from "vitest"; import {isCompositeType, Type} from "../../src"; import {ssz} from "../lodestarTypes"; diff --git a/packages/ssz/test/spec/testRunner.ts b/packages/ssz/test/spec/testRunner.ts index 1310fe88e..aa236db8f 100644 --- a/packages/ssz/test/spec/testRunner.ts +++ b/packages/ssz/test/spec/testRunner.ts @@ -1,5 +1,5 @@ -import path from "path"; -import fs from "fs"; +import path from "node:path"; +import fs from "node:fs"; import {uncompress} from "snappyjs"; import jsyaml from "js-yaml"; import {schema} from "./sszYamlSchema"; diff --git a/packages/ssz/test/specTestVersioning.ts b/packages/ssz/test/specTestVersioning.ts index eaa96504d..ff21c2cf7 100644 --- a/packages/ssz/test/specTestVersioning.ts +++ b/packages/ssz/test/specTestVersioning.ts @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; // WARNING! Don't move or rename this file !!! //