Skip to content

Commit 0fdc3b7

Browse files
committed
feat: remove @vscode/vsce-sign
1 parent 9a2ae38 commit 0fdc3b7

File tree

3 files changed

+8
-230
lines changed

3 files changed

+8
-230
lines changed

package-lock.json

Lines changed: 2 additions & 208 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"@secretlint/secretlint-formatter-sarif": "^10.1.2",
4444
"@secretlint/secretlint-rule-no-dotenv": "^10.1.2",
4545
"@secretlint/secretlint-rule-preset-recommend": "^10.1.2",
46-
"@vscode/vsce-sign": "^2.0.0",
4746
"azure-devops-node-api": "^12.5.0",
4847
"chalk": "^4.1.2",
4948
"cheerio": "^1.0.0-rc.9",

src/package.ts

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { detectYarn, getDependencies } from './npm';
2727
import * as GitHost from 'hosted-git-info';
2828
import parseSemver from 'parse-semver';
2929
import * as jsonc from 'jsonc-parser';
30-
import * as vsceSign from '@vscode/vsce-sign';
3130
import { getRuleNameFromRuleId, lintFiles, lintText, prettyPrintLintResult } from './secretLint';
3231

3332
const MinimatchOptions: minimatch.IOptions = { dot: true };
@@ -1951,31 +1950,17 @@ export async function signPackage(packageFile: string, signTool: string): Promis
19511950
}
19521951

19531952
// Generate the signature manifest file
1954-
export function generateManifest(packageFile: string, outputFile?: string): Promise<string> {
1955-
if (!outputFile) {
1956-
const packageFolder = path.dirname(packageFile);
1957-
const packageName = path.basename(packageFile, '.vsix');
1958-
outputFile = path.join(packageFolder, `${packageName}.manifest`);
1959-
}
1960-
return vsceSign.generateManifest(packageFile, outputFile);
1953+
export function generateManifest(_packageFile: string, _outputFile?: string): Promise<string> {
1954+
throw new Error('Not Supported');
19611955
}
19621956

1963-
export async function verifySignature(packageFile: string, manifestFile: string, signatureFile: string): Promise<void> {
1964-
const sigzipPath = await createSignatureArchive(manifestFile, signatureFile);
1965-
try {
1966-
const result = await vsceSign.verify(packageFile, sigzipPath, true);
1967-
console.log(`Signature verification result: ${result.code}`);
1968-
if (result.output) {
1969-
console.log(result.output)
1970-
}
1971-
} finally {
1972-
await fs.promises.unlink(sigzipPath);
1973-
}
1957+
export async function verifySignature(_packageFile: string, _manifestFile: string, _signatureFile: string): Promise<void> {
1958+
throw new Error('Not Supported');
19741959
}
19751960

19761961
// Create a signature zip file containing the manifest and signature file
1977-
export async function createSignatureArchive(manifestFile: string, signatureFile: string, outputFile?: string): Promise<string> {
1978-
return vsceSign.zip(manifestFile, signatureFile, outputFile)
1962+
export async function createSignatureArchive(_manifestFile: string, _signatureFile: string, _outputFile?: string): Promise<string> {
1963+
throw new Error('Not Supported');
19791964
}
19801965

19811966
export async function packageCommand(options: IPackageOptions = {}): Promise<any> {

0 commit comments

Comments
 (0)