Skip to content

Commit c70be8b

Browse files
authored
Handle nonmaster branches in user suite tests (microsoft#48128)
* Handle nonmaster branches in user suite tests * Fix remaining changed default branches, vscode & vue-next docker install scripts * NPM reformats these on install now, comitting so it doesnt need to be ignored * Accept current user suite baselines * Fix many trivially fixable user suite tests
1 parent 918f0ef commit c70be8b

Some content is hidden

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

44 files changed

+1957
-8777
lines changed

src/testRunner/externalCompileRunner.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace Harness {
1212
interface UserConfig {
1313
types: string[];
1414
cloneUrl: string;
15+
branch?: string;
1516
path?: string;
1617
}
1718

@@ -56,9 +57,10 @@ namespace Harness {
5657
ts.Debug.assert(!!config.cloneUrl, "Bad format from test.json: cloneUrl field must be present.");
5758
const submoduleDir = path.join(cwd, directoryName);
5859
if (!fs.existsSync(submoduleDir)) {
59-
exec("git", ["--work-tree", submoduleDir, "clone", config.cloneUrl, path.join(submoduleDir, ".git")], { cwd });
60+
exec("git", ["--work-tree", submoduleDir, "clone", "-b", config.branch || "master", config.cloneUrl, path.join(submoduleDir, ".git")], { cwd });
6061
}
6162
else {
63+
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "checkout", config.branch || "master"], { cwd: submoduleDir });
6264
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "reset", "HEAD", "--hard"], { cwd: submoduleDir });
6365
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "clean", "-f"], { cwd: submoduleDir });
6466
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "pull", "-f"], { cwd: submoduleDir });
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Exit Code: 2
2+
Standard output:
3+
node_modules/mongoose/index.d.ts(438,37): error TS2589: Type instantiation is excessively deep and possibly infinite.
4+
node_modules/mongoose/index.d.ts(1194,5): error TS2589: Type instantiation is excessively deep and possibly infinite.
5+
node_modules/mongoose/index.d.ts(1195,5): error TS2589: Type instantiation is excessively deep and possibly infinite.
6+
7+
8+
9+
Standard error:

tests/baselines/reference/user/TypeScript-React-Native-Starter.log

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Exit Code: 2
22
Standard output:
3-
node_modules/@types/react-native/index.d.ts(8745,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.
3+
node_modules/@types/react-native/index.d.ts(8685,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.
44

55

66

tests/baselines/reference/user/acorn.log

+532-13
Large diffs are not rendered by default.

tests/baselines/reference/user/adonis-framework.log

+11-10
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ node_modules/adonis-framework/src/Config/index.js(39,15): error TS2304: Cannot f
3535
node_modules/adonis-framework/src/Config/index.js(58,15): error TS2304: Cannot find name 'Mixed'.
3636
node_modules/adonis-framework/src/Encryption/index.js(53,15): error TS2304: Cannot find name 'Mixed'.
3737
node_modules/adonis-framework/src/Encryption/index.js(71,34): error TS2769: No overload matches this call.
38-
Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string', gave the following error.
38+
Overload 1 of 4, '(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string', gave the following error.
3939
Argument of type 'string' is not assignable to parameter of type 'undefined'.
40-
Overload 2 of 4, '(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string', gave the following error.
40+
Overload 2 of 4, '(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string', gave the following error.
4141
Argument of type 'string' is not assignable to parameter of type 'Encoding | undefined'.
4242
node_modules/adonis-framework/src/Encryption/index.js(77,27): error TS2322: Type 'string' is not assignable to type 'Buffer'.
4343
node_modules/adonis-framework/src/Encryption/index.js(77,50): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'.
4444
node_modules/adonis-framework/src/Encryption/index.js(85,23): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name.
4545
node_modules/adonis-framework/src/Encryption/index.js(87,15): error TS2304: Cannot find name 'Mixed'.
4646
node_modules/adonis-framework/src/Encryption/index.js(101,21): error TS2769: No overload matches this call.
47-
Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string', gave the following error.
47+
Overload 1 of 4, '(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string', gave the following error.
4848
Argument of type '"base64"' is not assignable to parameter of type 'undefined'.
49-
Overload 2 of 4, '(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string', gave the following error.
49+
Overload 2 of 4, '(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string', gave the following error.
5050
Argument of type 'string' is not assignable to parameter of type 'Encoding'.
5151
node_modules/adonis-framework/src/Encryption/index.js(102,5): error TS2322: Type 'string' is not assignable to type 'Buffer & string'.
5252
Type 'string' is not assignable to type 'Buffer'.
@@ -63,11 +63,11 @@ node_modules/adonis-framework/src/Env/index.js(54,15): error TS2304: Cannot find
6363
node_modules/adonis-framework/src/Env/index.js(56,15): error TS2304: Cannot find name 'Mixed'.
6464
node_modules/adonis-framework/src/Env/index.js(80,15): error TS2304: Cannot find name 'Mixed'.
6565
node_modules/adonis-framework/src/Event/index.js(13,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations.
66-
node_modules/adonis-framework/src/Event/index.js(128,12): error TS2740: Type '() => {}[]' is missing the following properties from type 'any[]': pop, push, concat, join, and 27 more.
66+
node_modules/adonis-framework/src/Event/index.js(128,12): error TS2322: Type '() => {}[]' is not assignable to type 'any[]'.
6767
node_modules/adonis-framework/src/Event/index.js(153,25): error TS2339: Property 'wildcard' does not exist on type 'EventEmitter2'.
6868
node_modules/adonis-framework/src/Event/index.js(188,17): error TS2304: Cannot find name 'Spread'.
69-
node_modules/adonis-framework/src/Event/index.js(201,27): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
70-
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more.
69+
node_modules/adonis-framework/src/Event/index.js(201,27): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'Spread[]'.
70+
Type 'IArguments' is missing the following properties from type 'Spread[]': pop, push, concat, join, and 27 more.
7171
node_modules/adonis-framework/src/Event/index.js(207,24): error TS2304: Cannot find name 'Sring'.
7272
node_modules/adonis-framework/src/Event/index.js(256,52): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'.
7373
Type 'Function' provides no match for the signature '(...values: any[]): void'.
@@ -91,6 +91,7 @@ node_modules/adonis-framework/src/Exceptions/index.js(164,14): error TS1056: Acc
9191
node_modules/adonis-framework/src/Exceptions/index.js(178,21): error TS2554: Expected 0 arguments, but got 3.
9292
node_modules/adonis-framework/src/Exceptions/index.js(191,21): error TS2554: Expected 0 arguments, but got 3.
9393
node_modules/adonis-framework/src/Exceptions/index.js(205,21): error TS2554: Expected 0 arguments, but got 3.
94+
node_modules/adonis-framework/src/File/index.js(139,22): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
9495
node_modules/adonis-framework/src/File/index.js(175,5): error TS2322: Type 'Promise<any>' is not assignable to type 'boolean'.
9596
node_modules/adonis-framework/src/File/index.js(273,5): error TS2322: Type 'string | boolean' is not assignable to type 'boolean'.
9697
Type 'string' is not assignable to type 'boolean'.
@@ -141,7 +142,7 @@ node_modules/adonis-framework/src/Response/index.js(299,15): error TS2304: Canno
141142
node_modules/adonis-framework/src/Response/index.js(323,15): error TS2304: Cannot find name 'Mixed'.
142143
node_modules/adonis-framework/src/Route/ResourceCollection.js(39,11): error TS1359: Identifier expected. 'this' is a reserved word that cannot be used here.
143144
node_modules/adonis-framework/src/Route/ResourceCollection.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
144-
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more.
145+
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 27 more.
145146
node_modules/adonis-framework/src/Route/ResourceCollection.js(56,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
146147
node_modules/adonis-framework/src/Route/ResourceMember.js(39,11): error TS1359: Identifier expected. 'this' is a reserved word that cannot be used here.
147148
node_modules/adonis-framework/src/Route/ResourceMember.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
@@ -166,7 +167,7 @@ node_modules/adonis-framework/src/Route/index.js(343,33): error TS2345: Argument
166167
node_modules/adonis-framework/src/Route/index.js(354,20): error TS2694: Namespace 'Route' has no exported member 'Group'.
167168
node_modules/adonis-framework/src/Route/index.js(368,3): error TS2322: Type 'null' is not assignable to type 'string'.
168169
node_modules/adonis-framework/src/Route/index.js(396,63): error TS2554: Expected 2 arguments, but got 3.
169-
node_modules/adonis-framework/src/Route/index.js(407,20): error TS2694: Namespace 'Route' has no exported member 'resources'.
170+
node_modules/adonis-framework/src/Route/index.js(407,14): error TS2749: 'Route.resources' refers to a value, but is being used as a type here. Did you mean 'typeof Route.resources'?
170171
node_modules/adonis-framework/src/Route/index.js(501,42): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'.
171172
Type 'undefined' is not assignable to type 'boolean'.
172173
node_modules/adonis-framework/src/Route/resource.js(92,25): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'string'.
@@ -183,7 +184,7 @@ node_modules/adonis-framework/src/Route/resource.js(209,45): error TS2345: Argum
183184
node_modules/adonis-framework/src/Route/resource.js(233,15): error TS2304: Cannot find name 'Mixed'.
184185
node_modules/adonis-framework/src/Route/resource.js(261,15): error TS2304: Cannot find name 'Mixed'.
185186
node_modules/adonis-framework/src/Route/resource.js(286,11): error TS1359: Identifier expected. 'this' is a reserved word that cannot be used here.
186-
node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'.
187+
node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[Mixed, ...any[]]'.
187188
node_modules/adonis-framework/src/Route/resource.js(296,15): error TS2304: Cannot find name 'Mixed'.
188189
node_modules/adonis-framework/src/Route/resource.js(314,62): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
189190
node_modules/adonis-framework/src/Server/helpers.js(17,29): error TS8024: JSDoc '@param' tag has name 'appNamespace', but there is no parameter with that name.

tests/baselines/reference/user/assert.log

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
Exit Code: 2
22
Standard output:
33
node_modules/assert/test.js(25,5): error TS2367: This condition will always return 'false' since the types 'string | undefined' and 'boolean' have no overlap.
4-
node_modules/assert/test.js(39,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
5-
node_modules/assert/test.js(55,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
6-
node_modules/assert/test.js(74,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
7-
node_modules/assert/test.js(84,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
8-
node_modules/assert/test.js(94,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
9-
node_modules/assert/test.js(103,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
10-
node_modules/assert/test.js(120,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
11-
node_modules/assert/test.js(128,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
4+
node_modules/assert/test.js(39,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
5+
node_modules/assert/test.js(55,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
6+
node_modules/assert/test.js(74,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
7+
node_modules/assert/test.js(84,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
8+
node_modules/assert/test.js(94,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
9+
node_modules/assert/test.js(103,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
10+
node_modules/assert/test.js(120,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
11+
node_modules/assert/test.js(128,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
1212
node_modules/assert/test.js(140,10): error TS2339: Property 'a' does not exist on type 'number[]'.
1313
node_modules/assert/test.js(141,10): error TS2339: Property 'b' does not exist on type 'number[]'.
1414
node_modules/assert/test.js(142,10): error TS2339: Property 'b' does not exist on type 'number[]'.
1515
node_modules/assert/test.js(143,10): error TS2339: Property 'a' does not exist on type 'number[]'.
16-
node_modules/assert/test.js(149,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
16+
node_modules/assert/test.js(149,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
1717
node_modules/assert/test.js(157,51): error TS2349: This expression is not callable.
1818
Type 'never' has no call signatures.
19-
node_modules/assert/test.js(161,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
20-
node_modules/assert/test.js(168,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
19+
node_modules/assert/test.js(161,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
20+
node_modules/assert/test.js(168,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
2121
node_modules/assert/test.js(182,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
2222
node_modules/assert/test.js(229,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
2323
node_modules/assert/test.js(235,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
@@ -27,7 +27,11 @@ node_modules/assert/test.js(256,55): error TS2345: Argument of type 'TypeError'
2727
node_modules/assert/test.js(262,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
2828
node_modules/assert/test.js(279,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
2929
node_modules/assert/test.js(285,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
30+
node_modules/assert/test.js(290,24): error TS2571: Object is of type 'unknown'.
3031
node_modules/assert/test.js(320,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
32+
node_modules/assert/test.js(329,22): error TS2571: Object is of type 'unknown'.
33+
node_modules/assert/test.js(336,22): error TS2571: Object is of type 'unknown'.
34+
node_modules/assert/test.js(342,22): error TS2571: Object is of type 'unknown'.
3135
node_modules/assert/test.js(346,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
3236

3337

0 commit comments

Comments
 (0)