Skip to content

Commit

Permalink
Fix read-pkg-up
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Oct 31, 2021
1 parent 17da7f0 commit bf0e5d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/bin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dirname } from 'path'
import process from 'process'
import { fileURLToPath } from 'url'

import { readPackageUpAsync } from 'read-pkg-up'
import { readPackageUp } from 'read-pkg-up'
import UpdateNotifier from 'update-notifier'

import { normalizeError, getErrorProps } from '../error/main.js'
Expand Down Expand Up @@ -47,7 +47,7 @@ const runCli = async function () {
// TODO: use static JSON imports once those are possible
const checkUpdate = async function () {
const cwd = dirname(fileURLToPath(import.meta.url))
const { packageJson } = await readPackageUpAsync({ cwd, normalize: false })
const { packageJson } = await readPackageUp({ cwd, normalize: false })
UpdateNotifier({ pkg: packageJson }).notify()
}

Expand Down
4 changes: 2 additions & 2 deletions src/runners/node/launch/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dirname } from 'path'
import { fileURLToPath } from 'url'

import nvexeca from 'nvexeca'
import { readPackageUpAsync } from 'read-pkg-up'
import { readPackageUp } from 'read-pkg-up'
import semver from 'semver'

import { UserError } from '../../../error/main.js'
Expand Down Expand Up @@ -49,7 +49,7 @@ const getAllowedVersions = async function () {
packageJson: {
engines: { node: allowedVersions },
},
} = await readPackageUpAsync({ cwd })
} = await readPackageUp({ cwd })
return allowedVersions
}

Expand Down
4 changes: 2 additions & 2 deletions src/system/create/versions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dirname } from 'path'
import { fileURLToPath } from 'url'

import { readPackageUpAsync } from 'read-pkg-up'
import { readPackageUp } from 'read-pkg-up'

import { PluginError } from '../../error/main.js'
import { spawnProcess } from '../../utils/spawn.js'
Expand Down Expand Up @@ -32,7 +32,7 @@ const getSpydVersion = async function () {
const cwd = dirname(fileURLToPath(import.meta.url))
const {
packageJson: { version },
} = await readPackageUpAsync({ cwd, normalize: false })
} = await readPackageUp({ cwd, normalize: false })
return version
}

Expand Down

0 comments on commit bf0e5d7

Please sign in to comment.