Skip to content

Commit

Permalink
[Code] change nodegit to @elastic/nodegit
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedragon committed Mar 7, 2019
1 parent 3f74652 commit 0c44d73
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 39 deletions.
3 changes: 1 addition & 2 deletions x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@types/nock": "^9.3.0",
"@types/node": "^10.12.27",
"@types/node-fetch": "^2.1.4",
"@types/nodegit": "^0.22.1",
"@types/papaparse": "^4.5.5",
"@types/pngjs": "^3.3.1",
"@types/prop-types": "^15.5.3",
Expand Down Expand Up @@ -160,6 +159,7 @@
"@elastic/lsp-extension": "^0.1.1",
"@elastic/node-crypto": "0.1.2",
"@elastic/numeral": "2.3.2",
"@elastic/nodegit": "0.24.0-alpha.10",
"@kbn/babel-preset": "1.0.0",
"@kbn/es-query": "1.0.0",
"@kbn/i18n": "1.0.0",
Expand Down Expand Up @@ -256,7 +256,6 @@
"monaco-editor": "^0.14.3",
"ngreact": "^0.5.1",
"node-fetch": "^2.1.2",
"nodegit": "git+https://github.com/elastic/nodegit.git#54173ad757bc09f155183bb27bce921b02fb8198",
"nodemailer": "^4.6.4",
"object-path-immutable": "^0.5.3",
"oppsy": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/__tests__/clone_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

import Git from '@elastic/nodegit';
import assert from 'assert';
import fs from 'fs';
import Git from 'nodegit';
import path from 'path';
import rimraf from 'rimraf';
import sinon from 'sinon';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/__tests__/git_operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import rimraf from 'rimraf';
import {getDefaultBranch, GitOperations} from '../git_operations';
import {ServerOptions} from "../server_options";
import * as mkdirp from "mkdirp";
import Git from 'nodegit';
import Git from '@elastic/nodegit';

describe('git_operations', () => {
it('get default branch from a non master repo', async () => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/__tests__/lsp_indexer_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

import Git, { CloneOptions } from '@elastic/nodegit';
import assert from 'assert';
import fs from 'fs';
import Git, { CloneOptions } from 'nodegit';
import path from 'path';
import rimraf from 'rimraf';
import sinon from 'sinon';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/__tests__/lsp_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* tslint:disable */

import fs from 'fs';
import Git from 'nodegit';
import Git from '@elastic/nodegit';
// import rimraf from 'rimraf';
import sinon from 'sinon';
import path from 'path';
Expand Down
12 changes: 11 additions & 1 deletion x-pack/plugins/code/server/git_operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@
* you may not use this file except in compliance with the Elastic License.
*/

import {
Blame,
Commit,
Error,
Object,
Oid,
Reference,
Repository,
Tree,
TreeEntry,
} from '@elastic/nodegit';
import Boom from 'boom';
import { Blame, Commit, Error, Object, Oid, Reference, Repository, Tree, TreeEntry } from 'nodegit';
import * as Path from 'path';
import { GitBlame } from '../common/git_blame';
import { CommitDiff, DiffKind } from '../common/git_diff';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/lsp/test_repo_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* tslint:disable */

import fs from 'fs';
import Git from 'nodegit';
import Git from '@elastic/nodegit';
import rimraf from 'rimraf';

import { TestConfig, Repo } from '../../model/test_config';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/lsp/workspace_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { Clone, Commit, Error as GitError, Repository, Reset } from '@elastic/nodegit';
import Boom from 'boom';
import del from 'del';
import fs from 'fs';
import { delay } from 'lodash';
import mkdirp from 'mkdirp';
import { Clone, Commit, Error as GitError, Repository, Reset } from 'nodegit';
import path from 'path';
import { ResponseMessage } from 'vscode-jsonrpc/lib/messages';
import { Hover, Location, TextDocumentPositionParams } from 'vscode-languageserver';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/server/repository_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

import Git from '@elastic/nodegit';
import del from 'del';
import fs from 'fs';
import mkdirp from 'mkdirp';
import Git from 'nodegit';
import path from 'path';
import { RepositoryUtils } from '../common/repository_utils';
import {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/code/server/routes/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { Reference } from '@elastic/nodegit';
import { Commit, Revwalk } from '@elastic/nodegit';
import Boom from 'boom';
import fileType from 'file-type';
import hapi, { RequestQuery } from 'hapi';
import { Reference } from 'nodegit';
import { Commit, Revwalk } from 'nodegit';
import { ReferenceInfo } from '../../model/commit';
import {
commitInfo,
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/code/tasks/nodegit_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint-disable */
export { default } from '@elastic/nodegit/dist/utils/binary_info';

export { default } from 'nodegit/lib/utils/binary_info';
46 changes: 20 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,26 @@
resolved "https://registry.yarnpkg.com/@elastic/node-crypto/-/node-crypto-0.1.2.tgz#c18ac282f635e88f041cc1555d806e492ca8f3b1"
integrity sha1-wYrCgvY16I8EHMFVXYBuSSyo87E=

"@elastic/[email protected]":
version "0.24.0-alpha.10"
resolved "https://registry.yarnpkg.com/@elastic/nodegit/-/nodegit-0.24.0-alpha.10.tgz#aff30d245a9155620b08af494643efcd12c39313"
integrity sha512-9vQRbl/jOqRb20AceYdcwzYBNFxsh7pWAeKMfHJmLTRqTxCjvvFeOpIFW1FLAe56zj6Qd04xrE8OWE9Htxvn2Q==
dependencies:
babel-cli "^6.7.7"
babel-preset-es2015 "^6.6.0"
combyne "~0.8.1"
fs-extra "^7.0.0"
js-beautify "~1.5.10"
lodash "^4.17.11"
nan "^2.11.1"
node-gyp "^3.8.0"
node-pre-gyp "^0.11.0"
promisify-node "~0.3.0"
ramda "^0.25.0"
request-promise-native "^1.0.5"
tar-fs "^1.16.3"
walk "^2.3.9"

"@elastic/[email protected]":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@elastic/numeral/-/numeral-2.3.2.tgz#06c9ef22f18dd8c2b39ffe353868d4d0c13ea4f9"
Expand Down Expand Up @@ -2150,13 +2170,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.27.tgz#eb3843f15d0ba0986cc7e4d734d2ee8b50709ef8"
integrity sha512-e9wgeY6gaY21on3ve0xAjgBVjGDWq/xUteK0ujsE53bUoxycMkqfnkUgMt6ffZtykZ5X12Mg3T7Pw4TRCObDKg==

"@types/nodegit@^0.22.1":
version "0.22.7"
resolved "https://registry.yarnpkg.com/@types/nodegit/-/nodegit-0.22.7.tgz#e4e3f9f2a0e8a6f13234748e6e12c06c864879ba"
integrity sha512-ZMsQfod9Lsxn5V5yS2Pyf46S31CGD26gP1uKmth041NhNyd3qcJvkhe/2072TgwwdXx4f+W6wdh1Vvu1e34l/A==
dependencies:
"@types/node" "*"

"@types/normalize-package-data@*":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
Expand Down Expand Up @@ -17245,25 +17258,6 @@ nodegit-promise@~4.0.0:
dependencies:
asap "~2.0.3"

"nodegit@git+https://github.com/elastic/nodegit.git#54173ad757bc09f155183bb27bce921b02fb8198":
version "0.24.0-alpha.6"
resolved "git+https://github.com/elastic/nodegit.git#54173ad757bc09f155183bb27bce921b02fb8198"
dependencies:
babel-cli "^6.7.7"
babel-preset-es2015 "^6.6.0"
combyne "~0.8.1"
fs-extra "^7.0.0"
js-beautify "~1.5.10"
lodash "^4.17.11"
nan "^2.11.1"
node-gyp "^3.8.0"
node-pre-gyp "^0.11.0"
promisify-node "~0.3.0"
ramda "^0.25.0"
request-promise-native "^1.0.5"
tar-fs "^1.16.3"
walk "^2.3.9"

nodemailer@^4.6.4:
version "4.6.4"
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-4.6.4.tgz#f0d72d0c6a6ec5f4369fa8f4bf5127a31baa2014"
Expand Down

0 comments on commit 0c44d73

Please sign in to comment.