Cleanup scripts and config files

This commit is contained in:
Dirk Baeumer 2019-03-26 22:42:20 +01:00
Родитель e1ed4191dd
Коммит c70b2abbdb
16 изменённых файлов: 127 добавлений и 82 удалений

Просмотреть файл

@ -6,17 +6,19 @@ A first draft specification can be found [here](https://github.com/Microsoft/lan
## How to Run the tools
- `> git clone this repository`
- `> npm install`
- `> npm run compile`
- `> npm run lsif-ts` runs the indexer over the samples/typescript directory
- `> npm run lsif-ts-all` runs the indexed over the samples/typescript directory and pipes the output to the npm moniker rewriter.
- `> npm installl -g lsif-tsc` install the tsc LSIF tool.
- `> lsif-tsc -p .\tsconfig.json` creates a LSIF dump for the given typescript project. Output format is new line separated JSON.
If the project provides and npm package or is depending on other npm modules the TypeScript monikers can be converted into stable npm monikers. To do so run
- `> npm install -g lsif-npm` install the npm LSIF tools
- `> lsif-tsc -p .\tsconfig.json | lsif-npm -p .\package.json` creates an LSIF dump and converts the monikers to npm format.
Please note that the tools are work in progress and that we have not done any extensive testing so far. Known issues are:
1. Go to Declaration for function overloads doesn't honor the signature
1. Go to Type Declaration is not fully implement
1. Document link support is completely missing
1. Document link support and go to implementation is completely missing
1. Reference results are not always inlined when possible
## LSIF extension

69
npm/package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "npm-lsif",
"version": "0.1.0",
"name": "lsif-npm",
"version": "0.2.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -25,35 +25,62 @@
"@types/node": "*"
}
},
"lsif-protocol": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/lsif-protocol/-/lsif-protocol-0.2.1.tgz",
"integrity": "sha512-ilyGFwf4OPe8RE+t3rMSAAQWaUs1iLevyeR7ulylFzl7GkwdFke4tuIQIhnGE1UWcCE8kJwurRyKxSIl588XNQ==",
"requires": {
"vscode-languageserver-protocol": "^3.14.0"
},
"dependencies": {
"vscode-jsonrpc": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz",
"integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg=="
},
"vscode-languageserver-protocol": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz",
"integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==",
"requires": {
"vscode-jsonrpc": "^4.0.0",
"vscode-languageserver-types": "3.14.0"
}
},
"vscode-languageserver-types": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz",
"integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A=="
}
}
},
"lsif-tsc": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/lsif-tsc/-/lsif-tsc-0.2.3.tgz",
"integrity": "sha512-Z960XsbTZv5oHqnnpHS6VcQdiWepAIfkXzVnocID5I7K3Ur1T2GkYi0FFGCbktT78snAYgdEvwcg0QOTSqlASA==",
"requires": {
"lsif-protocol": "0.2.1",
"minimist": "^1.2.0",
"typescript": "^3.3.4000",
"uuid": "^3.3.2",
"vscode-uri": "^1.0.6"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
},
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"vscode-jsonrpc": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz",
"integrity": "sha512-T24Jb5V48e4VgYliUXMnZ379ItbrXgOimweKaJshD84z+8q7ZOZjJan0MeDe+Ugb+uqERDVV8SBmemaGMSMugA=="
},
"vscode-languageserver-protocol": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.12.0.tgz",
"integrity": "sha512-evY6hmyzLnwQrqlQWPrNBq1z8wrSNjLesmgPzeS6Zv11mVS5UJRel26hbM/DH5tHdn45huNzRW0eFHRmIm8LpA==",
"requires": {
"vscode-jsonrpc": "^3.6.2",
"vscode-languageserver-types": "^3.12.0"
}
},
"vscode-languageserver-types": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.13.0.tgz",
"integrity": "sha512-BnJIxS+5+8UWiNKCP7W3g9FlE7fErFw0ofP5BXJe7c2tl0VeWh+nNHFbwAS2vmVC4a5kYxHBjRy0UeOtziemVA=="
},
"vscode-uri": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz",

Просмотреть файл

@ -30,9 +30,10 @@
"scripts": {
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
"compile:prod": "node ../build/bin/tsc -p ./tsconfig.prod.json",
"watch": "node ../build/bin/tsc -w -b ./tsconfig.json",
"watch": "node ../build/bin/tsc -b ./tsconfig.json -w",
"clean": "node ../node_modules/rimraf/bin.js lib",
"clean-all": "node ../build/bin/tsc -b ./tsconfig.json --clean",
"prepublishOnly": "npm run clean && npm run compile",
"postpublish": "node ../build/bin/post-publish.js"
}
}
}

Просмотреть файл

@ -1,16 +1,12 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"composite": true,
"sourceMap": true,
"declaration": true,
"sourceRoot": "../src",
"rootDir": "./src",
"outDir": "lib",
"lib": [
"es6"
],
"baseUrl": "./src",
"paths": {
"lsif-protocol": ["../../protocol/lib/main"],

Просмотреть файл

@ -1,16 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"declaration": true,
"sourceRoot": "../src",
"rootDir": "./src",
"outDir": "lib",
"lib": [
"es6"
]
"outDir": "lib"
},
"include": [
"src/**/*.ts"

Просмотреть файл

@ -19,17 +19,13 @@
"rimraf": "^2.6.2"
},
"scripts": {
"postinstall": "cd shared && npm install && cd ../tsc-lsif && npm install && cd ../npm-lsif && npm install && cd .. && npm run symlink && cd samples/typescript && npm install && cd ../javascript && npm install && cd ../..",
"postinstall": "cd protocol && npm install && cd ../tsc && npm install && cd ../npm && npm install && cd .. && npm run symlink && cd samples/typescript && npm install && cd ../javascript && npm install && cd ../..",
"symlink": "node ./build/bin/symlink.js",
"compile": "npm run compile:tsc-lsif && npm run compile:npm-lsif",
"compile:tsc-lsif": "tsc -p ./tsc-lsif/tsconfig.json",
"compile:npm-lsif": "tsc -p ./npm-lsif/tsconfig.json",
"watch:tsc-lsif": "tsc -w -p ./tsc-lsif/tsconfig.json",
"watch:npm-lsif": "tsc -w -p ./npm-lsif/tsconfig.json",
"clean": "cd tsc-lsif && npm run clean && cd ../npm-lsif && npm run clean && cd ..",
"lsif-ts": "cd samples/typescript && node ../../tsc-lsif/lib/main.js -p ./tsconfig.json --outputFormat=line",
"lsif-ts-ref": "cd samples/typescript-ref && node ../../tsc-lsif/lib/main.js -p ./client/tsconfig.json --projectRoot . --outputFormat=json",
"lsif-ts-all": "cd samples/typescript && node ../../tsc-lsif/lib/main.js -p ./tsconfig.json --outputFormat=line | node ../../npm-lsif/lib/main.js ./package.json",
"lsif-js": "cd samples/javascript && node ../../tsc-lsif/lib/main.js -p ./jsconfig.json --outputFormat=line"
"compile": "tsc -b ./tsconfig.json",
"watch": "tsc -b ./tsconfig.json -w",
"clean": "cd protocol && npm run clean && cd ../tsc && npm run clean && cd ../npm && npm run clean && cd ..",
"lsif-ts": "cd samples/typescript && node ../../tsc/lib/main.js -p ./tsconfig.json --outputFormat=line",
"lsif-ts-ref": "cd samples/typescript-ref && node ../../tsc/lib/main.js -p ./client/tsconfig.json --projectRoot . --outputFormat=line",
"lsif-js": "cd samples/javascript && node ../../tsc/lib/main.js -p ./jsconfig.json --outputFormat=line"
}
}

2
protocol/package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "lsif-protocol",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

Просмотреть файл

@ -20,11 +20,11 @@
"@types/node": "^10.14.3"
},
"scripts": {
"compile": "node ../build/bin/tsc -p ./tsconfig.json",
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
"compile:prod": "node ../build/bin/tsc -p ./tsconfig.prod.json",
"watch": "node ../build/bin/tsc -w -p ./tsconfig.json",
"watch": "node ../build/bin/tsc -b ./tsconfig.json -w",
"clean": "node ../node_modules/rimraf/bin.js lib",
"prepublishOnly": "npm run clean && npm run compile:prod",
"postpublish": "node ../build/bin/post-publish.js"
}
}
}

Просмотреть файл

@ -1,17 +1,12 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"declaration": true,
"composite": true,
"sourceRoot": "../src",
"rootDir": "./src",
"outDir": "lib",
"lib": [
"es6"
]
"outDir": "lib"
},
"include": [
"src/**/*.ts"

Просмотреть файл

@ -1,16 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"declaration": true,
"sourceRoot": "../src",
"rootDir": "./src",
"outDir": "lib",
"lib": [
"es6"
]
"outDir": "lib"
},
"include": [
"src/**/*.ts"

29
tsc/package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "lsif-tsc",
"version": "0.0.2",
"version": "0.2.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -25,6 +25,14 @@
"@types/node": "*"
}
},
"lsif-protocol": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/lsif-protocol/-/lsif-protocol-0.2.1.tgz",
"integrity": "sha512-ilyGFwf4OPe8RE+t3rMSAAQWaUs1iLevyeR7ulylFzl7GkwdFke4tuIQIhnGE1UWcCE8kJwurRyKxSIl588XNQ==",
"requires": {
"vscode-languageserver-protocol": "^3.14.0"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
@ -40,6 +48,25 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"vscode-jsonrpc": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz",
"integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg=="
},
"vscode-languageserver-protocol": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz",
"integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==",
"requires": {
"vscode-jsonrpc": "^4.0.0",
"vscode-languageserver-types": "3.14.0"
}
},
"vscode-languageserver-types": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz",
"integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A=="
},
"vscode-uri": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz",

Просмотреть файл

@ -30,8 +30,8 @@
},
"scripts": {
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
"compile:prod": "node ../build/bin/tsc -b ./tsconfig.prod.json",
"watch": "node ../build/bin/tsc -w -b ./tsconfig.json",
"compile:prod": "node ../build/bin/tsc -p ./tsconfig.prod.json",
"watch": "node ../build/bin/tsc -b ./tsconfig.json -w",
"clean": "node ../node_modules/rimraf/bin.js lib",
"clean-all": "node ../build/bin/tsc -b ./tsconfig.json --clean",
"prepublishOnly": "npm run clean && npm run compile:prod",

Просмотреть файл

@ -1,17 +1,12 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"declaration": true,
"composite": true,
"sourceRoot": "../src",
"rootDir": "./src",
"outDir": "lib",
"lib": [
"es6"
],
"baseUrl": "./src",
"paths": {
"lsif-protocol": ["../../protocol/lib/main"],

Просмотреть файл

@ -1,16 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"declaration": true,
"sourceRoot": "../src",
"rootDir": "./src",
"outDir": "lib",
"lib": [
"es6"
]
"outDir": "lib"
},
"include": [
"src/**/*.ts"

Просмотреть файл

@ -1,8 +1,13 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"strict": true
"strict": true,
"lib": [
"es6"
]
}
}

16
tsconfig.json Normal file
Просмотреть файл

@ -0,0 +1,16 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
},
"references": [
{ "path": "./tsc/tsconfig.json" },
{ "path": "./npm/tsconfig.json" }
],
"exclude": [
"node_modules",
"samples",
"protocol",
"npm",
"tsc"
]
}