diff --git a/.ncurc.js b/.ncurc.js index 1b47e3bf..abe893f2 100644 --- a/.ncurc.js +++ b/.ncurc.js @@ -4,8 +4,6 @@ module.exports = { // ESM only modules // https://github.com/microsoft/TypeScript/issues/46452 'find-up', - 'get-stdin', - 'globby', /* pin to 4.0.0 to match make-fetch-happen/cacache. */ 'p-map', 'remote-git-tags', diff --git a/package-lock.json b/package-lock.json index d90b7407..5a5c5bab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^1.0.2", - "get-stdin": "^8.0.0", "hosted-git-info": "^5.1.0", "ini": "^4.1.1", "js-yaml": "^4.1.0", @@ -4379,18 +4378,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", diff --git a/package.json b/package.json index bf0f9836..dfed0058 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^1.0.2", - "get-stdin": "^8.0.0", "hosted-git-info": "^5.1.0", "ini": "^4.1.1", "js-yaml": "^4.1.0", diff --git a/src/lib/findPackage.ts b/src/lib/findPackage.ts index 5998c9e6..19cd8a39 100644 --- a/src/lib/findPackage.ts +++ b/src/lib/findPackage.ts @@ -1,6 +1,6 @@ import findUp from 'find-up' import fs from 'fs/promises' -import getstdin from 'get-stdin' +import { text } from 'node:stream/consumers' import path from 'path' import { print } from '../lib/logging' import { Options } from '../types/Options' @@ -65,7 +65,7 @@ async function findPackage(options: Options): Promise<{ // get data from stdin // trim stdin to account for \r\n - const stdinData = await getstdin() + const stdinData = await text(process.stdin) const data = stdinData.trim().length > 0 ? stdinData : null // if no stdin content fall back to searching for package.json from pwd and up to root