mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)
This commit is contained in:
@@ -78,4 +78,42 @@ const processTreeDts = path.join('node_modules', 'windows-process-tree', 'typing
|
||||
if (fs.existsSync(processTreeDts)) {
|
||||
console.log('Removing windows-process-tree.d.ts');
|
||||
fs.unlinkSync(processTreeDts);
|
||||
}
|
||||
}
|
||||
|
||||
function getInstalledVersion(packageName, cwd) {
|
||||
const opts = {};
|
||||
if (cwd) {
|
||||
opts.cwd = cwd;
|
||||
}
|
||||
|
||||
const result = cp.spawnSync(yarn, ['list', '--pattern', packageName], opts);
|
||||
const stdout = result.stdout.toString();
|
||||
const match = stdout.match(new RegExp(packageName + '@(\\S+)'));
|
||||
if (!match || !match[1]) {
|
||||
throw new Error('Unexpected output from yarn list: ' + stdout);
|
||||
}
|
||||
|
||||
return match[1];
|
||||
}
|
||||
|
||||
function assertSameVersionsBetweenFolders(packageName, otherFolder) {
|
||||
const baseVersion = getInstalledVersion(packageName);
|
||||
const otherVersion = getInstalledVersion(packageName, otherFolder);
|
||||
|
||||
if (baseVersion !== otherVersion) {
|
||||
throw new Error(`Mismatched versions installed for ${packageName}: root has ${baseVersion}, ./${otherFolder} has ${otherVersion}. These should be the same!`);
|
||||
}
|
||||
}
|
||||
|
||||
// Check that modules in both the base package.json and remote/ have the same version installed
|
||||
const requireSameVersionsInRemote = [
|
||||
'xterm',
|
||||
'xterm-addon-search',
|
||||
'xterm-addon-web-links',
|
||||
'node-pty',
|
||||
'vscode-ripgrep'
|
||||
];
|
||||
|
||||
requireSameVersionsInRemote.forEach(packageName => {
|
||||
assertSameVersionsBetweenFolders(packageName, 'remote');
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
|
||||
if (packageJsonPathOverride) {
|
||||
packageJsonPath += packageJsonPathOverride;
|
||||
}
|
||||
packageJsonPath += '/package.json';
|
||||
packageJsonPath += 'package.json';
|
||||
for (let i = 0; i < cgmanifestRead.registrations.length; i++) {
|
||||
if (cgmanifestRead.registrations[i].component.git.repositoryUrl.substr(cgmanifestRead.registrations[i].component.git.repositoryUrl.length - repoId.length, repoId.length) === repoId) {
|
||||
cgmanifestRead.registrations[i].component.git.commitHash = info.commitSha;
|
||||
|
||||
Reference in New Issue
Block a user