Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unmaintained child-process-promise #3839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions extensions/ql-vscode/gulpfile.ts/package.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from "path";
import { deployPackage } from "./deploy";
import { spawn } from "child-process-promise";
import { spawn } from "cross-spawn";

export async function packageExtension(): Promise<void> {
const deployedPackage = await deployPackage();
Expand All @@ -16,16 +16,22 @@ export async function packageExtension(): Promise<void> {
`${deployedPackage.name}-${deployedPackage.version}.vsix`,
),
"--no-dependencies",
"--skip-license",
];
const proc = spawn(resolve(__dirname, "../node_modules/.bin/vsce"), args, {
cwd: deployedPackage.distPath,
});
proc.childProcess.stdout!.on("data", (data) => {
console.log(data.toString());
});
proc.childProcess.stderr!.on("data", (data) => {
console.error(data.toString());
stdio: ["ignore", "inherit", "inherit"],
});

await proc;
await new Promise((resolve, reject) => {
proc.on("error", reject);

proc.on("close", (code) => {
if (code === 0) {
resolve(undefined);
} else {
reject(new Error(`Failed to package extension with code ${code}`));
}
});
});
}
Loading
Loading