Skip to content

Commit

Permalink
refactor: use build-in node import instead (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastián García authored Apr 23, 2024
1 parent 5aa7d23 commit 1b3023f
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/actions/add-action.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-var */
import type {SAFE_ANY} from '@helpers/type';

import {existsSync, writeFileSync} from 'fs';
import {existsSync, writeFileSync} from 'node:fs';

import chalk from 'chalk';

Expand Down
2 changes: 1 addition & 1 deletion src/actions/doctor-action.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {basename} from 'path';
import {basename} from 'node:path';

import chalk from 'chalk';

Expand Down
2 changes: 1 addition & 1 deletion src/actions/init-action.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {rename} from 'fs';
import {rename} from 'node:fs';

import chalk from 'chalk';
import {oraPromise} from 'ora';
Expand Down
2 changes: 1 addition & 1 deletion src/actions/remove-action.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-var */
import type {SAFE_ANY} from '@helpers/type';

import {existsSync, readFileSync, writeFileSync} from 'fs';
import {existsSync, readFileSync, writeFileSync} from 'node:fs';

import chalk from 'chalk';

Expand Down
2 changes: 1 addition & 1 deletion src/constants/required.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {existsSync} from 'fs';
import {existsSync} from 'node:fs';

import fg from 'fast-glob';

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/check.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {RequiredKey, SAFE_ANY} from './type';
import type {ProblemRecord} from 'src/actions/doctor-action';

import {readFileSync} from 'fs';
import {readFileSync} from 'node:fs';

import chalk from 'chalk';

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/package.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {readFileSync} from 'fs';
import {readFileSync} from 'node:fs';

import {type NextUIComponents} from 'src/constants/component';
import {NEXT_UI} from 'src/constants/required';
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/remove.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {NextUIComponents} from 'src/constants/component';

import {existsSync, readFileSync, writeFileSync} from 'fs';
import {existsSync, readFileSync, writeFileSync} from 'node:fs';

import {tailwindRequired} from 'src/constants/required';

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {exec} from 'child_process';
import {existsSync, readFileSync, writeFileSync} from 'fs';
import {existsSync, readFileSync, writeFileSync} from 'node:fs';

import retry from 'async-retry';

Expand Down
4 changes: 2 additions & 2 deletions src/scripts/path.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {resolve} from 'path';
import {fileURLToPath} from 'url';
import {resolve} from 'node:path';
import {fileURLToPath} from 'node:url';

export const ROOT = resolve(fileURLToPath(import.meta.url), '../..');

Expand Down

0 comments on commit 1b3023f

Please sign in to comment.