Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@typescript/github-link

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript/github-link - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

@@ -19,3 +19,3 @@ "use strict";

}
gh.getGithubUrl(localPath, !!lineNumber ? +lineNumber : undefined).then(url => {
gh.getGithubLink(localPath, !!lineNumber ? +lineNumber : undefined).then(url => {
console.log(url);

@@ -22,0 +22,0 @@ }, err => {

@@ -9,3 +9,3 @@ export interface SourceLocation {

*/
export declare function getGithubUrl(path: string, lineNumber?: number): Promise<string>;
export declare function getGithubLink(path: string, lineNumber?: number): Promise<string>;
/**

@@ -15,2 +15,2 @@ * Returns a GitHub URL (or a file URL, if untracked) for each location.

*/
export declare function getGithubUrls(locations: readonly SourceLocation[]): Promise<string[]>;
export declare function getGithubLinks(locations: readonly SourceLocation[]): Promise<string[]>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGithubUrls = exports.getGithubUrl = void 0;
exports.getGithubLinks = exports.getGithubLink = void 0;
const cp = require("child_process");

@@ -11,6 +11,6 @@ const path = require("path");

*/
async function getGithubUrl(path, lineNumber) {
return (await getGithubUrlWorker([{ path, lineNumber }]))[0];
async function getGithubLink(path, lineNumber) {
return (await getGithubLinkWorker([{ path, lineNumber }]))[0];
}
exports.getGithubUrl = getGithubUrl;
exports.getGithubLink = getGithubLink;
/**

@@ -20,7 +20,7 @@ * Returns a GitHub URL (or a file URL, if untracked) for each location.

*/
async function getGithubUrls(locations) {
return await getGithubUrlWorker(locations);
async function getGithubLinks(locations) {
return await getGithubLinkWorker(locations);
}
exports.getGithubUrls = getGithubUrls;
async function getGithubUrlWorker(locations) {
exports.getGithubLinks = getGithubLinks;
async function getGithubLinkWorker(locations) {
if (!locations.length) {

@@ -27,0 +27,0 @@ return [];

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/microsoft/typescript-github-link#readme",
"version": "0.1.0",
"version": "0.2.0",
"license": "MIT",

@@ -8,0 +8,0 @@ "description": "Determine the Github URL corresponding to a file (position) on disk",

Sorry, the diff of this file is not supported yet