Skip to content

Commit

Permalink
use node prefix (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi authored Feb 2, 2025
1 parent bf3eb50 commit 666d9f8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { promisify } from 'util';
import { promisify } from 'node:util';
import { join as pathJoin } from 'node:path';
import type { ModuleGraph, ModuleNode } from 'vite';
import _webfontGenerator from '@vusion/webfonts-generator';
import { setupWatcher, MIME_TYPES, ensureDirExistsAndWriteFile, getTmpDir, getBufferHash, rmDir } from './utils';
import { parseOptions, parseFiles } from './optionParser';
import type { ModuleGraph, ModuleNode } from 'vite';
import type { GeneratedFontTypes, WebfontsGeneratorResult } from '@vusion/webfonts-generator';
import type { IconPluginOptions } from './optionParser';
import type { GeneratedWebfont } from './types/generatedWebfont';
import type { CompatiblePlugin, PublicApi } from './types/publicApi';
import { join as pathJoin } from 'node:path';

const ac = new AbortController();
const webfontGenerator = promisify(_webfontGenerator);
Expand Down
2 changes: 1 addition & 1 deletion src/optionParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path';
import { resolve } from 'node:path';
import { globSync } from 'glob';
import { hasFileExtension } from './utils';
import { InvalidWriteFilesTypeError, NoIconsAvailableError } from './errors';
Expand Down
2 changes: 1 addition & 1 deletion src/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from 'fs/promises';
import * as fs from 'node:fs/promises';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import * as utils from './utils';

Expand Down
12 changes: 6 additions & 6 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { constants, rm as fsRm, mkdtempSync } from 'fs';
import { resolve, dirname, join as pathJoin } from 'path';
import { watch, access, mkdir, writeFile } from 'fs/promises';
import type { FileChangeInfo } from 'fs/promises';
import type { GeneratedFontTypes } from '@vusion/webfonts-generator';
import { tmpdir as osTmpdir } from 'node:os';
import { createHash } from 'node:crypto';
import { tmpdir as osTmpdir } from 'node:os';
import { constants, rm as fsRm, mkdtempSync } from 'node:fs';
import { resolve, dirname, join as pathJoin } from 'node:path';
import { watch, access, mkdir, writeFile } from 'node:fs/promises';
import type { FileChangeInfo } from 'node:fs/promises';
import type { GeneratedFontTypes } from '@vusion/webfonts-generator';

let watcher: ReturnType<typeof watch> | undefined;
export const MIME_TYPES: Record<GeneratedFontTypes, string> = {
Expand Down

0 comments on commit 666d9f8

Please sign in to comment.