Skip to content

Commit ef38ffa

Browse files
Move resolution of package.json path to inside deployPackage
1 parent f195e93 commit ef38ffa

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

extensions/ql-vscode/gulpfile.ts/deploy.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ async function copyPackage(
4747
);
4848
}
4949

50-
export async function deployPackage(
51-
packageJsonPath: string,
52-
): Promise<DeployedPackage> {
50+
export async function deployPackage(): Promise<DeployedPackage> {
5351
try {
5452
const packageJson: typeof packageJsonType = JSON.parse(
55-
await readFile(packageJsonPath, "utf8"),
53+
await readFile(resolve(__dirname, "../package.json"), "utf8"),
5654
);
5755

5856
const distDir = join(__dirname, "../../../dist");

extensions/ql-vscode/gulpfile.ts/package.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { deployPackage } from "./deploy";
33
import { spawn } from "child-process-promise";
44

55
export async function packageExtension(): Promise<void> {
6-
const deployedPackage = await deployPackage(
7-
resolve(__dirname, "../package.json"),
8-
);
6+
const deployedPackage = await deployPackage();
97
console.log(
108
`Packaging extension '${deployedPackage.name}@${deployedPackage.version}'...`,
119
);

0 commit comments

Comments
 (0)