Skip to content

Commit

Permalink
Remove dependency on read-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroasm committed Oct 17, 2021
1 parent 30a1665 commit 7727e61
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 71 deletions.
4 changes: 2 additions & 2 deletions lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';

import arrify from 'arrify';
import ciParallelVars from 'ci-parallel-vars';
import del from 'del';
import figures from 'figures';
import {readPackageSync} from 'read-pkg';
import yargs from 'yargs';
import {hideBin} from 'yargs/helpers'; // eslint-disable-line node/file-extension-in-import

Expand Down Expand Up @@ -313,7 +313,7 @@ export default async function loadCli() { // eslint-disable-line complexity

let pkg;
try {
pkg = readPackageSync({cwd: projectDir});
pkg = JSON.parse(fs.readFileSync(path.resolve(projectDir, 'package.json')));
} catch (error) {
if (error.code !== 'ENOENT') {
throw error;
Expand Down
Loading

0 comments on commit 7727e61

Please sign in to comment.