Skip to content

Commit

Permalink
remove node: prefix from imports
Browse files Browse the repository at this point in the history
fixes #323
  • Loading branch information
d-fischer committed Sep 4, 2023
1 parent bd90c89 commit 4b47a7c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Explorer.ts
@@ -1,5 +1,5 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import fs from 'fs/promises';
import path from 'path';
import { isDirectory } from 'path-type';
import { ExplorerBase, getExtensionDescription } from './ExplorerBase.js';
import { loadJson } from './loaders.js';
Expand Down
2 changes: 1 addition & 1 deletion src/ExplorerBase.ts
@@ -1,4 +1,4 @@
import path from 'node:path';
import path from 'path';
import {
AsyncCache,
Cache,
Expand Down
4 changes: 2 additions & 2 deletions src/ExplorerSync.ts
@@ -1,5 +1,5 @@
import fs from 'node:fs';
import path from 'node:path';
import fs from 'fs';
import path from 'path';
import { isDirectorySync } from 'path-type';
import { ExplorerBase, getExtensionDescription } from './ExplorerBase.js';
import { loadJson } from './loaders.js';
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
export * from './types.js';

import os from 'node:os';
import os from 'os';
import { Explorer } from './Explorer.js';
import { ExplorerSync } from './ExplorerSync.js';
import {
Expand Down
8 changes: 4 additions & 4 deletions src/loaders.ts
@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-require-imports */

import { existsSync, rmSync, writeFileSync } from 'node:fs';
import { rm, writeFile } from 'node:fs/promises';
import path from 'node:path';
import { pathToFileURL } from 'node:url';
import { existsSync, rmSync, writeFileSync } from 'fs';
import { rm, writeFile } from 'fs/promises';
import path from 'path';
import { pathToFileURL } from 'url';
import { Loader, LoaderSync } from './types.js';

let importFresh: typeof import('import-fresh');
Expand Down
4 changes: 2 additions & 2 deletions test/caches.test.ts
Expand Up @@ -7,8 +7,8 @@ import {
test,
vi,
} from 'vitest';
import fs from 'node:fs';
import fsPromises from 'node:fs/promises';
import fs from 'fs';
import fsPromises from 'fs/promises';
import { cosmiconfig, cosmiconfigSync } from '../src';
import { isNotMjs, TempDir } from './util';

Expand Down
4 changes: 2 additions & 2 deletions test/failed-directories.test.ts
@@ -1,6 +1,6 @@
import { beforeEach, afterAll, describe, expect, test, vi } from 'vitest';
import fs from 'node:fs';
import fsPromises from 'node:fs/promises';
import fs from 'fs';
import fsPromises from 'fs/promises';
import {
cosmiconfig,
cosmiconfigSync,
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.ts
Expand Up @@ -16,7 +16,7 @@ import { ExplorerOptions, ExplorerOptionsSync, Loaders } from '../src/types';
import { TempDir } from './util';
import { ExplorerSync } from '../src/ExplorerSync';
import { Explorer } from '../src/Explorer';
import path from 'node:path';
import path from 'path';

vi.mock('../src/ExplorerSync', async () => {
const { ExplorerSync } = await vi.importActual<
Expand Down

0 comments on commit 4b47a7c

Please sign in to comment.