Skip to content

Commit

Permalink
chore: remove pkg-dir dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
josa42 committed Jun 10, 2022
1 parent 6773fcc commit 69312d8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
},
"dependencies": {
"bash-language-server": "3.0.3",
"pkg-dir": "^6.0.1",
"tslib": "^2.4.0"
}
}
3 changes: 1 addition & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from 'path'
import fs from 'fs'
import { packageDirectory as pkgDir } from 'pkg-dir'
import { ExtensionContext, LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, commands, services, window, workspace } from 'coc.nvim'

interface ShConfig {
Expand Down Expand Up @@ -43,7 +42,7 @@ export async function activate(context: ExtensionContext): Promise<void> {
context.subscriptions.push(
services.registLanguageClient(client),
commands.registerCommand("sh.version", async () => {
const rootDir = await pkgDir({ cwd: __dirname })
const rootDir = path.join(__dirname, '..')
const { version } = JSON.parse(fs.readFileSync(path.resolve(rootDir, 'package.json'), 'utf-8'))

window.showMessage(`Version: ${version} [node: ${process.versions.node}]`, 'more')
Expand Down
46 changes: 0 additions & 46 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -775,14 +775,6 @@ fill-range@^7.0.1:
dependencies:
to-regex-range "^5.0.1"

find-up@^6.1.0:
version "6.3.0"
resolved "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz"
integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==
dependencies:
locate-path "^7.1.0"
path-exists "^5.0.0"

flat-cache@^3.0.4:
version "3.0.4"
resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz"
Expand Down Expand Up @@ -1073,13 +1065,6 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"

locate-path@^7.1.0:
version "7.1.1"
resolved "https://registry.npmjs.org/locate-path/-/locate-path-7.1.1.tgz"
integrity sha512-vJXaRMJgRVD3+cUZs3Mncj2mxpt5mP0EmNOsxRSZRMlbqjvxzDEOIUWXGmavo0ZC9+tNZCBLQ66reA11nbpHZg==
dependencies:
p-locate "^6.0.0"

lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz"
Expand Down Expand Up @@ -1182,32 +1167,13 @@ optionator@^0.9.1:
type-check "^0.4.0"
word-wrap "^1.2.3"

p-limit@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz"
integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==
dependencies:
yocto-queue "^1.0.0"

p-locate@^6.0.0:
version "6.0.0"
resolved "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz"
integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==
dependencies:
p-limit "^4.0.0"

parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz"
integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
dependencies:
callsites "^3.0.0"

path-exists@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz"
integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==

path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
Expand All @@ -1233,13 +1199,6 @@ picomatch@^2.2.3:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

pkg-dir@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-6.0.1.tgz"
integrity sha512-C9R+PTCKGA32HG0n5I4JMYkdLL58ZpayVuncQHQrGeKa8o26A4o2x0u6BKekHG+Au0jv5ZW7Xfq1Cj6lm9Ag4w==
dependencies:
find-up "^6.1.0"

prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz"
Expand Down Expand Up @@ -1669,8 +1628,3 @@ yargs@^16.0.3:
string-width "^4.2.0"
y18n "^5.0.5"
yargs-parser "^20.2.2"

yocto-queue@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz"
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==

0 comments on commit 69312d8

Please sign in to comment.