Skip to content

Commit e4bb48b

Browse files
authored
Merge branch 'master' into git-ext-strict
2 parents d901df3 + 04fc390 commit e4bb48b

434 files changed

Lines changed: 2100 additions & 2495 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/tasks.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
"task": "tslint",
3434
"label": "Run tslint",
3535
"problemMatcher": [
36-
"$tslint4"
36+
"$tslint5"
3737
]
3838
},
3939
{
40-
"taskName": "Run tests",
40+
"label": "Run tests",
4141
"type": "shell",
4242
"command": "./scripts/test.sh",
4343
"windows": {
@@ -50,7 +50,7 @@
5050
}
5151
},
5252
{
53-
"taskName": "Run Dev",
53+
"label": "Run Dev",
5454
"type": "shell",
5555
"command": "./scripts/code.sh",
5656
"windows": {

build/gulpfile.hygiene.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ const tslintFilter = [
123123
'!**/node_modules/**',
124124
'!extensions/typescript/test/colorize-fixtures/**',
125125
'!extensions/vscode-api-tests/testWorkspace/**',
126-
'!extensions/**/*.test.ts'
126+
'!extensions/**/*.test.ts',
127+
'!extensions/html/server/lib/jquery.d.ts'
127128
];
128129

129130
const copyrightHeader = [
@@ -133,17 +134,6 @@ const copyrightHeader = [
133134
' *--------------------------------------------------------------------------------------------*/'
134135
].join('\n');
135136

136-
function reportFailures(failures) {
137-
failures.forEach(failure => {
138-
const name = failure.name || failure.fileName;
139-
const position = failure.startPosition;
140-
const line = position.lineAndCharacter ? position.lineAndCharacter.line : position.line;
141-
const character = position.lineAndCharacter ? position.lineAndCharacter.character : position.character;
142-
143-
console.error(`${name}:${line + 1}:${character + 1}:${failure.failure}`);
144-
});
145-
}
146-
147137
gulp.task('eslint', () => {
148138
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
149139
.pipe(filter(eslintFilter))
@@ -153,12 +143,12 @@ gulp.task('eslint', () => {
153143
});
154144

155145
gulp.task('tslint', () => {
156-
const options = { summarizeFailureOutput: true };
146+
const options = { emitError: false };
157147

158148
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
159149
.pipe(filter(tslintFilter))
160150
.pipe(gulptslint({ rulesDirectory: 'build/lib/tslint' }))
161-
.pipe(gulptslint.report(reportFailures, options));
151+
.pipe(gulptslint.report(options));
162152
});
163153

164154
const hygiene = exports.hygiene = (some, options) => {
@@ -219,6 +209,17 @@ const hygiene = exports.hygiene = (some, options) => {
219209
cb(err);
220210
});
221211
});
212+
213+
function reportFailures(failures) {
214+
failures.forEach(failure => {
215+
const name = failure.name || failure.fileName;
216+
const position = failure.startPosition;
217+
const line = position.lineAndCharacter ? position.lineAndCharacter.line : position.line;
218+
const character = position.lineAndCharacter ? position.lineAndCharacter.character : position.character;
219+
220+
console.error(`${name}:${line + 1}:${character + 1}:${failure.failure}`);
221+
});
222+
}
222223

223224
const tsl = es.through(function (file) {
224225
const configuration = tslint.Configuration.findConfiguration(null, '.');

build/gulpfile.vscode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
452452
const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
453453
gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () => {
454454
const branch = process.env.BUILD_SOURCEBRANCH;
455-
if (!branch.endsWith('/master') && !branch.indexOf('/release/') >= 0) {
455+
if (!branch.endsWith('/master') && !branch.startsWith('release/')) {
456456
console.log(`Only runs on master and release branches, not ${branch}`);
457457
return;
458458
}

build/lib/tslint/noUnexternalizedStringsRule.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ var NoUnexternalizedStringsRuleWalker = /** @class */ (function (_super) {
8888
var info = this.findDescribingParent(node);
8989
// Ignore strings in import and export nodes.
9090
if (info && info.isImport && doubleQuoted) {
91-
this.addFailureAtNode(node, NoUnexternalizedStringsRuleWalker.ImportFailureMessage, new Lint.Fix(NoUnexternalizedStringsRuleWalker.ImportFailureMessage, [
92-
this.createReplacement(node.getStart(), 1, '\''),
93-
this.createReplacement(node.getStart() + text.length - 1, 1, '\''),
94-
]));
91+
var fix = [
92+
Lint.Replacement.replaceFromTo(node.getStart(), 1, '\''),
93+
Lint.Replacement.replaceFromTo(node.getStart() + text.length - 1, 1, '\''),
94+
];
95+
this.addFailureAtNode(node, NoUnexternalizedStringsRuleWalker.ImportFailureMessage, fix);
9596
return;
9697
}
9798
var callInfo = info ? info.callInfo : null;
@@ -101,8 +102,9 @@ var NoUnexternalizedStringsRuleWalker = /** @class */ (function (_super) {
101102
}
102103
if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) {
103104
var s = node.getText();
104-
var replacement = new Lint.Replacement(node.getStart(), node.getWidth(), "nls.localize('KEY-" + s.substring(1, s.length - 1) + "', " + s + ")");
105-
var fix = new Lint.Fix('Unexternalitzed string', [replacement]);
105+
var fix = [
106+
Lint.Replacement.replaceFromTo(node.getStart(), node.getWidth(), "nls.localize('KEY-" + s.substring(1, s.length - 1) + "', " + s + ")"),
107+
];
106108
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Unexternalized string found: " + node.getText(), fix));
107109
return;
108110
}

build/lib/tslint/noUnexternalizedStringsRule.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,14 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker {
104104
let info = this.findDescribingParent(node);
105105
// Ignore strings in import and export nodes.
106106
if (info && info.isImport && doubleQuoted) {
107+
const fix = [
108+
Lint.Replacement.replaceFromTo(node.getStart(), 1, '\''),
109+
Lint.Replacement.replaceFromTo(node.getStart() + text.length - 1, 1, '\''),
110+
];
107111
this.addFailureAtNode(
108112
node,
109113
NoUnexternalizedStringsRuleWalker.ImportFailureMessage,
110-
new Lint.Fix(NoUnexternalizedStringsRuleWalker.ImportFailureMessage, [
111-
this.createReplacement(node.getStart(), 1, '\''),
112-
this.createReplacement(node.getStart() + text.length - 1, 1, '\''),
113-
])
114+
fix
114115
);
115116
return;
116117
}
@@ -122,8 +123,9 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker {
122123

123124
if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) {
124125
const s = node.getText();
125-
const replacement = new Lint.Replacement(node.getStart(), node.getWidth(), `nls.localize('KEY-${s.substring(1, s.length - 1)}', ${s})`);
126-
const fix = new Lint.Fix('Unexternalitzed string', [replacement]);
126+
const fix = [
127+
Lint.Replacement.replaceFromTo(node.getStart(), node.getWidth(), `nls.localize('KEY-${s.substring(1, s.length - 1)}', ${s})`),
128+
];
127129
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Unexternalized string found: ${node.getText()}`, fix));
128130
return;
129131
}

build/tfs/linux/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
pat
1+
pat
2+
*.js

build/tfs/linux/frozen-check.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
'use strict';
7+
8+
import { DocumentClient } from 'documentdb';
9+
10+
interface Config {
11+
id: string;
12+
frozen: boolean;
13+
}
14+
15+
function createDefaultConfig(quality: string): Config {
16+
return {
17+
id: quality,
18+
frozen: false
19+
};
20+
}
21+
22+
function getConfig(quality: string): Promise<Config> {
23+
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
24+
const collection = 'dbs/builds/colls/config';
25+
const query = {
26+
query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`,
27+
parameters: [
28+
{ name: '@quality', value: quality }
29+
]
30+
};
31+
32+
return new Promise<Config>((c, e) => {
33+
client.queryDocuments(collection, query).toArray((err, results) => {
34+
if (err && err.code !== 409) { return e(err); }
35+
36+
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config);
37+
});
38+
});
39+
}
40+
41+
getConfig(process.argv[2])
42+
.then(c => console.log(c.frozen), e => console.error(e));

build/tfs/linux/release.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ step "Publish RPM package" \
5555
# SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)"
5656
# SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME"
5757

58+
IS_FROZEN="$(node build/tfs/linux/frozen-check.js $VSCODE_QUALITY)"
59+
5860
if [ -z "$VSCODE_QUALITY" ]; then
5961
echo "VSCODE_QUALITY is not set, skipping repo package publish"
62+
elif [ "$IS_FROZEN" = "true" ]; then
63+
echo "$VSCODE_QUALITY is frozen, skipping repo package publish"
6064
else
6165
if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then
6266
if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then

extensions/css/client/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "es5",
44
"module": "commonjs",
55
"outDir": "./out",
6+
"noUnusedLocals": true,
67
"lib": [
78
"es5", "es2015.promise"
89
]

extensions/css/language-configuration.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@
2020
["(", ")"],
2121
["\"", "\""],
2222
["'", "'"]
23-
]
24-
}
23+
],
24+
"folding": {
25+
"markers": {
26+
"start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
27+
"end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)