Skip to content

Commit

Permalink
refactor: change internal imports to use node:* syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
edumudu committed Oct 19, 2023
1 parent 2f50848 commit e41cd35
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/cli/bin/index.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env node
import fs from 'fs';
import fs from 'node:fs';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import chalk from 'chalk';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/info.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs';
import fs from 'node:fs';
import chalk from 'chalk';

import { packagesInfoPath } from '../config/paths.mjs';
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/commands/install.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execSync } from 'child_process';
import fs from 'fs';
import { execSync } from 'node:child_process';
import fs from 'node:fs';
import chalk from 'chalk';

import { packagesInfoPath } from '../config/paths.mjs';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/list.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs';
import chalk from 'chalk';
import fs from 'fs';

import { packagesInfoPath } from '../config/paths.mjs';

Expand Down
8 changes: 4 additions & 4 deletions packages/cli/commands/publish.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { execSync } from 'child_process';
import { execSync } from 'node:child_process';
import fs from 'node:fs';
import { join } from 'node:path';
import process from 'node:process';
import chalk from 'chalk';
import fs from 'fs';
import { join } from 'path';
import process from 'process';

import { modulesRoot, packagesInfoPath } from '../config/paths.mjs';

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/unpublish.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs';
import chalk from 'chalk';
import fs from 'fs';

import { packagesInfoPath } from '../config/paths.mjs';

Expand Down
6 changes: 3 additions & 3 deletions packages/cli/config/paths.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import os from 'os';
import { createRequire } from 'module';
import path from 'node:path';
import os from 'node:os';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);
const { version } = require(path.join('..', 'package.json'));
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/utils/get-workdir-pkg-manager.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from 'path';
import path from 'node:path';
import chalk from 'chalk';

import { resolvePkgJson } from './resolve-pkg-json.mjs';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/utils/resolve-file.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import process from 'process';
import process from 'node:process';

import { findUpSync } from 'find-up';

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/utils/resolve-pkg-json.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFileSync } from 'fs';
import { readFileSync } from 'node:fs';

import { resolveFile } from './resolve-file.mjs';

Expand Down

0 comments on commit e41cd35

Please sign in to comment.