Skip to content

Commit

Permalink
fix issues after 1.57.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Jun 16, 2021
1 parent c0f308c commit bcd47c1
Show file tree
Hide file tree
Showing 33 changed files with 1,315 additions and 1,190 deletions.
2 changes: 1 addition & 1 deletion build/azure-pipelines/common/createBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function main() {
};
const client = new cosmos_1.CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT'], key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const scripts = client.database('builds').container(quality).scripts;
await (0, retry_1.retry)(() => scripts.storedProcedure('createBuild').execute('', [Object.assign(Object.assign({}, build), { _partitionKey: '' })]));
await retry_1.retry(() => scripts.storedProcedure('createBuild').execute('', [Object.assign(Object.assign({}, build), { _partitionKey: '' })]));
}
main().then(() => {
console.log('Build successfully created');
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/common/installPlaywright.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ const retry_1 = require("./retry");
const { installBrowsersWithProgressBar } = require('playwright/lib/install/installer');
const playwrightPath = path.dirname(require.resolve('playwright'));
async function install() {
await (0, retry_1.retry)(() => installBrowsersWithProgressBar(playwrightPath));
await retry_1.retry(() => installBrowsersWithProgressBar(playwrightPath));
}
install();
4 changes: 2 additions & 2 deletions build/azure-pipelines/common/publish-webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function publish(commit, files) {
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
await assertContainer(blobService, commit);
for (const file of files) {
const blobName = (0, path_1.basename)(file);
const blobName = path_1.basename(file);
const blobExists = await doesBlobExist(blobService, commit, blobName);
if (blobExists) {
console.log(`Blob ${commit}, ${blobName} already exists, not publishing again.`);
Expand All @@ -58,7 +58,7 @@ function main() {
}
const opts = minimist(process.argv.slice(2));
const [directory] = opts._;
const files = fileNames.map(fileName => (0, path_1.join)(directory, fileName));
const files = fileNames.map(fileName => path_1.join(directory, fileName));
publish(commit, files).catch(err => {
console.error(err);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/common/releaseBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function main() {
}
console.log(`Releasing build ${commit}...`);
const scripts = client.database('builds').container(quality).scripts;
await (0, retry_1.retry)(() => scripts.storedProcedure('releaseBuild').execute('', [commit]));
await retry_1.retry(() => scripts.storedProcedure('releaseBuild').execute('', [commit]));
}
main().then(() => {
console.log('Build successfully released');
Expand Down
2 changes: 1 addition & 1 deletion build/darwin/create-universal-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function main() {
const outAppPath = path.join(buildDir, `VSCode-darwin-${arch}`, appName);
const productJsonPath = path.resolve(outAppPath, 'Contents', 'Resources', 'app', 'product.json');
const infoPlistPath = path.resolve(outAppPath, 'Contents', 'Info.plist');
await (0, vscode_universal_1.makeUniversalApp)({
await vscode_universal_1.makeUniversalApp({
x64AppPath,
arm64AppPath,
x64AsarPath,
Expand Down
2 changes: 1 addition & 1 deletion build/lib/builtInExtensionsCG.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function downloadExtensionDetails(extension) {
const promises = [];
for (const fileName of contentFileNames) {
promises.push(new Promise(resolve => {
(0, got_1.default)(`${repositoryContentBaseUrl}/${fileName}`)
got_1.default(`${repositoryContentBaseUrl}/${fileName}`)
.then(response => {
resolve({ fileName, body: response.rawBody });
})
Expand Down
2 changes: 1 addition & 1 deletion build/lib/compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ansiColors = require("ansi-colors");
const os = require("os");
const replace = require('gulp-replace');
const watch = require('./watch');
const reporter = (0, reporter_1.createReporter)();
const reporter = reporter_1.createReporter();
function getTypeScriptCompilerOptions(src) {
const rootDir = path.join(__dirname, `../../${src}`);
let options = {};
Expand Down
4 changes: 2 additions & 2 deletions build/lib/eslint/code-import-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ module.exports = new class {
const configs = context.options;
for (const config of configs) {
if (minimatch(context.getFilename(), config.target)) {
return (0, utils_1.createImportRuleListener)((node, value) => this._checkImport(context, config, node, value));
return utils_1.createImportRuleListener((node, value) => this._checkImport(context, config, node, value));
}
}
return {};
}
_checkImport(context, config, node, path) {
// resolve relative paths
if (path[0] === '.') {
path = (0, path_1.join)(context.getFilename(), path);
path = path_1.join(context.getFilename(), path);
}
let restrictions;
if (typeof config.restrictions === 'string') {
Expand Down
8 changes: 4 additions & 4 deletions build/lib/eslint/code-layering.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = new class {
};
}
create(context) {
const fileDirname = (0, path_1.dirname)(context.getFilename());
const fileDirname = path_1.dirname(context.getFilename());
const parts = fileDirname.split(/\\|\//);
const ruleArgs = context.options[0];
let config;
Expand All @@ -39,11 +39,11 @@ module.exports = new class {
// nothing
return {};
}
return (0, utils_1.createImportRuleListener)((node, path) => {
return utils_1.createImportRuleListener((node, path) => {
if (path[0] === '.') {
path = (0, path_1.join)((0, path_1.dirname)(context.getFilename()), path);
path = path_1.join(path_1.dirname(context.getFilename()), path);
}
const parts = (0, path_1.dirname)(path).split(/\\|\//);
const parts = path_1.dirname(path).split(/\\|\//);
for (let i = parts.length - 1; i >= 0; i--) {
const part = parts[i];
if (config.allowed.has(part)) {
Expand Down
4 changes: 2 additions & 2 deletions build/lib/eslint/code-no-nls-in-standalone-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ module.exports = new class NoNlsInStandaloneEditorRule {
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(fileName)
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(fileName)
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(fileName)) {
return (0, utils_1.createImportRuleListener)((node, path) => {
return utils_1.createImportRuleListener((node, path) => {
// resolve relative paths
if (path[0] === '.') {
path = (0, path_1.join)(context.getFilename(), path);
path = path_1.join(context.getFilename(), path);
}
if (/vs(\/|\\)nls/.test(path)) {
context.report({
Expand Down
4 changes: 2 additions & 2 deletions build/lib/eslint/code-no-standalone-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ module.exports = new class NoNlsInStandaloneEditorRule {
// the vs/editor folder is allowed to use the standalone editor
return {};
}
return (0, utils_1.createImportRuleListener)((node, path) => {
return utils_1.createImportRuleListener((node, path) => {
// resolve relative paths
if (path[0] === '.') {
path = (0, path_1.join)(context.getFilename(), path);
path = path_1.join(context.getFilename(), path);
}
if (/vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(path)
|| /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(path)
Expand Down
4 changes: 2 additions & 2 deletions build/lib/eslint/code-translation-remind.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = new (_a = class TranslationRemind {
};
}
create(context) {
return (0, utils_1.createImportRuleListener)((node, path) => this._checkImport(context, node, path));
return utils_1.createImportRuleListener((node, path) => this._checkImport(context, node, path));
}
_checkImport(context, node, path) {
if (path !== TranslationRemind.NLS_MODULE) {
Expand All @@ -31,7 +31,7 @@ module.exports = new (_a = class TranslationRemind {
let resourceDefined = false;
let json;
try {
json = (0, fs_1.readFileSync)('./build/lib/i18n.resources.json', 'utf8');
json = fs_1.readFileSync('./build/lib/i18n.resources.json', 'utf8');
}
catch (e) {
console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.');
Expand Down
4 changes: 2 additions & 2 deletions build/lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName) {
console.error(packagedDependencies);
result.emit('error', err);
});
return result.pipe((0, stats_1.createStatsStream)(path.basename(extensionPath)));
return result.pipe(stats_1.createStatsStream(path.basename(extensionPath)));
}
function fromLocalNormal(extensionPath) {
const result = es.through();
Expand All @@ -162,7 +162,7 @@ function fromLocalNormal(extensionPath) {
es.readArray(files).pipe(result);
})
.catch(err => result.emit('error', err));
return result.pipe((0, stats_1.createStatsStream)(path.basename(extensionPath)));
return result.pipe(stats_1.createStatsStream(path.basename(extensionPath)));
}
const baseHeaders = {
'X-Market-Client-Id': 'VSCode Build',
Expand Down
Loading

0 comments on commit bcd47c1

Please sign in to comment.