Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import fs from 'fs';
7
import path from 'path';
8
import crypto from 'crypto';
9
10
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../../product.json'), 'utf8'));
11
const shasum = crypto.createHash('sha256');
12
13
for (const ext of productjson.builtInExtensions) {
14
shasum.update(`${ext.name}@${ext.version}`);
15
}
16
17
process.stdout.write(shasum.digest('hex'));
18
19