From 19c4ad0f46b8dcef867d536db15fa179b94e86c8 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Tue, 16 Aug 2022 15:11:12 -0500 Subject: [PATCH] chore(deps-dev): bring in types for `@npmcli/ci-detect` (#569) --- package-lock.json | 13 +++++++++++++ package.json | 1 + src/.sink.d.ts | 1 - src/lib/versionSelect.ts | 3 +-- tsconfig.json | 1 - 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2b4a722be..a1a06312f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,6 +47,7 @@ "@types/jest": "^28.1.6", "@types/mime-types": "^2.1.1", "@types/node-fetch": "^2.6.2", + "@types/npmcli__ci-detect": "^2.0.0", "@types/parse-link-header": "^2.0.0", "@types/read": "^0.0.29", "@types/semver": "^7.3.10", @@ -1878,6 +1879,12 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, + "node_modules/@types/npmcli__ci-detect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/npmcli__ci-detect/-/npmcli__ci-detect-2.0.0.tgz", + "integrity": "sha512-Nzom9KQvlBNk3gLWKThXZ+DhX/uZ6sDOltOgPFNONo30wi9fePwuwd6V+4+ES9vY+/SVMP4S7Z3QQHXhidAYyg==", + "dev": true + }, "node_modules/@types/parse-link-header": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/parse-link-header/-/parse-link-header-2.0.0.tgz", @@ -14286,6 +14293,12 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, + "@types/npmcli__ci-detect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/npmcli__ci-detect/-/npmcli__ci-detect-2.0.0.tgz", + "integrity": "sha512-Nzom9KQvlBNk3gLWKThXZ+DhX/uZ6sDOltOgPFNONo30wi9fePwuwd6V+4+ES9vY+/SVMP4S7Z3QQHXhidAYyg==", + "dev": true + }, "@types/parse-link-header": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/parse-link-header/-/parse-link-header-2.0.0.tgz", diff --git a/package.json b/package.json index 68fb6c5fe..b0de2d4fc 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@types/jest": "^28.1.6", "@types/mime-types": "^2.1.1", "@types/node-fetch": "^2.6.2", + "@types/npmcli__ci-detect": "^2.0.0", "@types/parse-link-header": "^2.0.0", "@types/read": "^0.0.29", "@types/semver": "^7.3.10", diff --git a/src/.sink.d.ts b/src/.sink.d.ts index c1440bd7f..eebce80a4 100644 --- a/src/.sink.d.ts +++ b/src/.sink.d.ts @@ -1,3 +1,2 @@ // These packages don't have any TS types so we need to declare a module in order to use them. -declare module '@npmcli/ci-detect'; declare module 'editor'; diff --git a/src/lib/versionSelect.ts b/src/lib/versionSelect.ts index d65c07cc1..014bb7236 100644 --- a/src/lib/versionSelect.ts +++ b/src/lib/versionSelect.ts @@ -1,9 +1,8 @@ +import ciDetect from '@npmcli/ci-detect'; import config from 'config'; import { prompt } from 'enquirer'; import { Headers } from 'node-fetch'; -import ciDetect from '@npmcli/ci-detect'; - import APIError from './apiError'; import fetch, { cleanHeaders, handleRes } from './fetch'; import { warn } from './logger'; diff --git a/tsconfig.json b/tsconfig.json index bf9098b9f..c9b8d7c40 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,6 @@ "noImplicitAny": true, "outDir": "dist/", "paths": { - "@npmcli/ci-detect": [".sink.d.ts"], "editor": [".sink.d.ts"] }, "resolveJsonModule": true,