Comparing version 0.2.3 to 0.2.5
import * as minimist from 'minimist'; | ||
interface Options extends minimist.ParsedArgs { | ||
package?: string; | ||
projectRoot?: string; | ||
file?: string; | ||
projectRoot?: string; | ||
} | ||
@@ -6,0 +7,0 @@ export declare namespace Options { |
@@ -24,4 +24,5 @@ "use strict"; | ||
_: [], | ||
file: undefined, | ||
projectRoot: undefined | ||
package: undefined, | ||
projectRoot: undefined, | ||
file: undefined | ||
}; | ||
@@ -65,3 +66,3 @@ })(Options = exports.Options || (exports.Options = {})); | ||
handleMoniker(moniker) { | ||
if (moniker.schema !== moniker_1.TscMoniker.schema) { | ||
if (moniker.scheme !== moniker_1.TscMoniker.scheme) { | ||
emit(moniker); | ||
@@ -78,3 +79,3 @@ return; | ||
} | ||
moniker.schema = moniker_1.NpmMoniker.schema; | ||
moniker.scheme = moniker_1.NpmMoniker.schema; | ||
this.emitPackageInformation(moniker); | ||
@@ -147,3 +148,3 @@ } | ||
if (moniker !== undefined) { | ||
if (moniker.kind === lsif_protocol_1.MonikerKind.import && moniker.schema === moniker_1.TscMoniker.schema && packageInfo !== undefined && packageInfo.manager === moniker_1.NpmMoniker.schema) { | ||
if (moniker.kind === lsif_protocol_1.MonikerKind.import && moniker.scheme === moniker_1.TscMoniker.scheme && packageInfo !== undefined && packageInfo.manager === moniker_1.NpmMoniker.schema) { | ||
const tscMoniker = moniker_1.TscMoniker.parse(moniker.identifier); | ||
@@ -162,3 +163,3 @@ if (moniker_1.TscMoniker.hasPath(tscMoniker)) { | ||
} | ||
moniker.schema = moniker_1.NpmMoniker.schema; | ||
moniker.scheme = moniker_1.NpmMoniker.schema; | ||
} | ||
@@ -206,6 +207,6 @@ } | ||
string: [ | ||
'file', 'projectRoot' | ||
'package', 'projectRoot', 'file', | ||
] | ||
})); | ||
let packageFile = options._[0]; | ||
let packageFile = options.package; | ||
if (packageFile === undefined) { | ||
@@ -212,0 +213,0 @@ packageFile = 'package.json'; |
{ | ||
"name": "lsif-npm", | ||
"description": "A tools to rewrite Typescript LSIF monikers into npm monikers", | ||
"version": "0.2.3", | ||
"version": "0.2.5", | ||
"author": "Microsoft Corporation", | ||
@@ -22,4 +22,4 @@ "license": "MIT", | ||
"uuid": "^3.3.2", | ||
"lsif-protocol": "0.2.1", | ||
"lsif-tsc": "0.2.3" | ||
"lsif-protocol": "0.2.3", | ||
"lsif-tsc": "0.2.5" | ||
}, | ||
@@ -33,8 +33,9 @@ "devDependencies": { | ||
"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", | ||
"compile:publish": "node ../build/bin/tsc -p ./tsconfig.publish.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", | ||
"clean-all": "node ../build/bin/tsc -b ./tsconfig.json --clean", | ||
"prepublishOnly": "npm run clean && npm run compile:publish", | ||
"postpublish": "node ../build/bin/post-publish.js" | ||
} | ||
} | ||
} |
@@ -28,4 +28,5 @@ /* -------------------------------------------------------------------------------------------- | ||
interface Options extends minimist.ParsedArgs { | ||
package?: string; | ||
projectRoot?: string; | ||
file?: string; | ||
projectRoot?: string; | ||
} | ||
@@ -36,4 +37,5 @@ | ||
_: [], | ||
file: undefined, | ||
projectRoot: undefined | ||
package: undefined, | ||
projectRoot: undefined, | ||
file: undefined | ||
}; | ||
@@ -83,3 +85,3 @@ } | ||
public handleMoniker(moniker: Moniker): void { | ||
if (moniker.schema !== TscMoniker.schema) { | ||
if (moniker.scheme !== TscMoniker.scheme) { | ||
emit(moniker); | ||
@@ -95,3 +97,3 @@ return; | ||
} | ||
moniker.schema = NpmMoniker.schema; | ||
moniker.scheme = NpmMoniker.schema; | ||
this.emitPackageInformation(moniker); | ||
@@ -177,3 +179,3 @@ } | ||
if (moniker !== undefined) { | ||
if (moniker.kind === MonikerKind.import && moniker.schema === TscMoniker.schema && packageInfo !== undefined && packageInfo.manager === NpmMoniker.schema) { | ||
if (moniker.kind === MonikerKind.import && moniker.scheme === TscMoniker.scheme && packageInfo !== undefined && packageInfo.manager === NpmMoniker.schema) { | ||
const tscMoniker = TscMoniker.parse(moniker.identifier); | ||
@@ -191,3 +193,3 @@ if (TscMoniker.hasPath(tscMoniker)) { | ||
} | ||
moniker.schema = NpmMoniker.schema; | ||
moniker.scheme = NpmMoniker.schema; | ||
} | ||
@@ -237,6 +239,6 @@ } | ||
string: [ | ||
'file', 'projectRoot' | ||
'package', 'projectRoot', 'file', | ||
] | ||
})); | ||
let packageFile: string | undefined = options._[0]; | ||
let packageFile: string | undefined = options.package; | ||
if (packageFile === undefined) { | ||
@@ -243,0 +245,0 @@ packageFile = 'package.json' |
{ | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es6", | ||
"composite": true, | ||
"sourceMap": true, | ||
@@ -11,5 +10,2 @@ "declaration": true, | ||
"outDir": "lib", | ||
"lib": [ | ||
"es6" | ||
], | ||
"baseUrl": "./src", | ||
@@ -16,0 +12,0 @@ "paths": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42694
713
+ Addedlsif-protocol@0.2.3(transitive)
+ Addedlsif-tsc@0.2.5(transitive)
- Removedlsif-protocol@0.2.1(transitive)
- Removedlsif-tsc@0.2.3(transitive)
Updatedlsif-protocol@0.2.3
Updatedlsif-tsc@0.2.5