Skip to content

Commit 15d3281

Browse files
committed
Bump Npm packages
1 parent 087e623 commit 15d3281

13 files changed

+4150
-4286
lines changed

.prettierrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2+
"arrowParens": "avoid",
23
"printWidth": 120,
3-
"trailingComma": "all",
4-
"singleQuote": true
4+
"singleQuote": true,
5+
"trailingComma": "all"
56
}
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`it detects errors 1`] = `"41:43 - Cannot assign object literal to \`unknownProperty\` because property \`unknownProperty\` is missing in \`Properties\` [1] but exists in object literal [2]."`;
3+
exports[`it detects errors 1`] = `"41:43 - Cannot assign object literal to \`unknownProperty\` because property \`unknownProperty\` is missing in \`Properties\` [1] but exists in object literal [2]. [prop-missing]"`;
44

5-
exports[`it detects errors 2`] = `"47:10 - Cannot assign object literal to \`cssWithDisallowedValue\` because in property \`order\`: Either string [1] is incompatible with enum [2]. Or string [1] is incompatible with number [3]."`;
5+
exports[`it detects errors 2`] = `"47:10 - Cannot assign object literal to \`cssWithDisallowedValue\` because in property \`order\`: [incompatible-type] Either string [1] is incompatible with literal union [2]. Or string [1] is incompatible with number [3]."`;
66

7-
exports[`it detects errors 3`] = `"52:11 - Cannot assign object literal to \`cssWithDisallowedFallbackValues\` because in property \`bottom\`: Either array literal [1] is incompatible with string literal \`-moz-initial\` [2]. Or array literal [1] is incompatible with string literal \`inherit\` [3]. Or array literal [1] is incompatible with string literal \`initial\` [4]. Or array literal [1] is incompatible with string literal \`revert\` [5]. Or array literal [1] is incompatible with string literal \`unset\` [6]. Or array literal [1] is incompatible with string [7]. Or array literal [1] is incompatible with number literal \`0\` [8]. Or array literal [1] is incompatible with string literal \`auto\` [9]. Or array literal [1] is incompatible with string [10]."`;
7+
exports[`it detects errors 3`] = `"52:11 - Cannot assign object literal to \`cssWithDisallowedFallbackValues\` because in property \`bottom\`: [incompatible-type] Either array literal [1] is incompatible with string literal \`-moz-initial\` [2]. Or array literal [1] is incompatible with string literal \`inherit\` [3]. Or array literal [1] is incompatible with string literal \`initial\` [4]. Or array literal [1] is incompatible with string literal \`revert\` [5]. Or array literal [1] is incompatible with string literal \`unset\` [6]. Or array literal [1] is incompatible with string [7]. Or array literal [1] is incompatible with number literal \`0\` [8]. Or array literal [1] is incompatible with string literal \`auto\` [9]. Or array literal [1] is incompatible with string [10]."`;
88

9-
exports[`it detects errors 4`] = `"53:10 - Cannot assign object literal to \`cssWithDisallowedFallbackValues\` because in property \`order\`: Either array literal [1] is incompatible with string literal \`-moz-initial\` [2]. Or array literal [1] is incompatible with string literal \`inherit\` [3]. Or array literal [1] is incompatible with string literal \`initial\` [4]. Or array literal [1] is incompatible with string literal \`revert\` [5]. Or array literal [1] is incompatible with string literal \`unset\` [6]. Or array literal [1] is incompatible with number [7]."`;
9+
exports[`it detects errors 4`] = `"53:10 - Cannot assign object literal to \`cssWithDisallowedFallbackValues\` because in property \`order\`: [incompatible-type] Either array literal [1] is incompatible with string literal \`-moz-initial\` [2]. Or array literal [1] is incompatible with string literal \`inherit\` [3]. Or array literal [1] is incompatible with string literal \`initial\` [4]. Or array literal [1] is incompatible with string literal \`revert\` [5]. Or array literal [1] is incompatible with string literal \`unset\` [6]. Or array literal [1] is incompatible with number [7]."`;

__tests__/__snapshots__/dist.typescript.ts.snap

+74
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,77 @@ exports[`Typescript 3.7 detects errors 14`] = `
152152
Type '[1]' is not assignable to type '[Width<0 | (string & {})>]'.
153153
Type '1' is not assignable to type 'Width<0 | (string & {})>'."
154154
`;
155+
156+
exports[`Typescript 3.8 detects errors 1`] = `
157+
"45:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
158+
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
159+
`;
160+
161+
exports[`Typescript 3.8 detects errors 2`] = `"49:11 - Type 'number' is not assignable to type 'string'."`;
162+
163+
exports[`Typescript 3.8 detects errors 3`] = `"50:10 - Type 'number' is not assignable to type 'string'."`;
164+
165+
exports[`Typescript 3.8 detects errors 4`] = `
166+
"55:6 - Type '{}' is not assignable to type 'string & {}'.
167+
Type '{}' is not assignable to type 'string'."
168+
`;
169+
170+
exports[`Typescript 3.8 detects errors 5`] = `
171+
"60:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
172+
Type 'string & {}' is not assignable to type '\\"auto\\"'."
173+
`;
174+
175+
exports[`Typescript 3.8 detects errors 6`] = `"67:6 - Type '1' is not assignable to type 'string | 0'."`;
176+
177+
exports[`Typescript 3.8 detects errors 7`] = `"79:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;
178+
179+
exports[`Typescript 3.8 detects errors 8`] = `"93:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;
180+
181+
exports[`Typescript 3.8 detects errors 9`] = `"103:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;
182+
183+
exports[`Typescript 3.8 detects errors 10`] = `"104:15 - Type 'number' is not assignable to type 'string | 0'."`;
184+
185+
exports[`Typescript 3.8 detects errors 11`] = `"117:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;
186+
187+
exports[`Typescript 3.8 detects errors 12`] = `"131:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;
188+
189+
exports[`Typescript 3.8 detects errors 13`] = `"141:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;
190+
191+
exports[`Typescript 3.8 detects errors 14`] = `"142:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;
192+
193+
exports[`Typescript 3.9 detects errors 1`] = `
194+
"45:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
195+
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
196+
`;
197+
198+
exports[`Typescript 3.9 detects errors 2`] = `"49:11 - Type 'number' is not assignable to type 'string'."`;
199+
200+
exports[`Typescript 3.9 detects errors 3`] = `"50:10 - Type 'number' is not assignable to type 'string'."`;
201+
202+
exports[`Typescript 3.9 detects errors 4`] = `
203+
"55:6 - Type '{}' is not assignable to type 'string & {}'.
204+
Type '{}' is not assignable to type 'string'."
205+
`;
206+
207+
exports[`Typescript 3.9 detects errors 5`] = `
208+
"60:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
209+
Type 'string & {}' is not assignable to type '\\"auto\\"'."
210+
`;
211+
212+
exports[`Typescript 3.9 detects errors 6`] = `"67:6 - Type '1' is not assignable to type 'string | 0'."`;
213+
214+
exports[`Typescript 3.9 detects errors 7`] = `"79:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;
215+
216+
exports[`Typescript 3.9 detects errors 8`] = `"93:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;
217+
218+
exports[`Typescript 3.9 detects errors 9`] = `"103:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;
219+
220+
exports[`Typescript 3.9 detects errors 10`] = `"104:15 - Type '1' is not assignable to type 'string | 0'."`;
221+
222+
exports[`Typescript 3.9 detects errors 11`] = `"117:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;
223+
224+
exports[`Typescript 3.9 detects errors 12`] = `"131:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;
225+
226+
exports[`Typescript 3.9 detects errors 13`] = `"141:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;
227+
228+
exports[`Typescript 3.9 detects errors 14`] = `"142:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;

__tests__/dist.typescript.ts

+37-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const COMPILER_OPTIONS = {
55
strict: true,
66
};
77

8-
describe('Typescript 3.7', () => {
8+
describe('Typescript 3.9', () => {
99
it('detects errors', async () => {
1010
const ts = await import('typescript');
1111
const program = ts.createProgram([path.resolve(__dirname, '__fixtures__/typecheck.ts')], COMPILER_OPTIONS);
@@ -15,6 +15,42 @@ describe('Typescript 3.7', () => {
1515
return `${line}:${character} - ${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`;
1616
});
1717

18+
expect(Number(ts.versionMajorMinor)).toBe(3.9);
19+
expect(errors.length).toBe(14);
20+
for (const error of errors) {
21+
expect(error).toMatchSnapshot();
22+
}
23+
});
24+
});
25+
26+
describe('Typescript 3.8', () => {
27+
it('detects errors', async () => {
28+
const ts = await import('typescript3.8');
29+
const program = ts.createProgram([path.resolve(__dirname, '__fixtures__/typecheck.ts')], COMPILER_OPTIONS);
30+
const diagnostics = ts.getPreEmitDiagnostics(program);
31+
const errors = diagnostics.map(diagnostic => {
32+
const { line, character } = diagnostic.file!.getLineAndCharacterOfPosition(diagnostic.start!);
33+
return `${line}:${character} - ${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`;
34+
});
35+
36+
expect(Number(ts.versionMajorMinor)).toBe(3.8);
37+
expect(errors.length).toBe(14);
38+
for (const error of errors) {
39+
expect(error).toMatchSnapshot();
40+
}
41+
});
42+
});
43+
44+
describe('Typescript 3.7', () => {
45+
it('detects errors', async () => {
46+
const ts = await import('typescript3.7');
47+
const program = ts.createProgram([path.resolve(__dirname, '__fixtures__/typecheck.ts')], COMPILER_OPTIONS);
48+
const diagnostics = ts.getPreEmitDiagnostics(program);
49+
const errors = diagnostics.map(diagnostic => {
50+
const { line, character } = diagnostic.file!.getLineAndCharacterOfPosition(diagnostic.start!);
51+
return `${line}:${character} - ${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`;
52+
});
53+
1854
expect(Number(ts.versionMajorMinor)).toBe(3.7);
1955
expect(errors.length).toBe(14);
2056
for (const error of errors) {

__tests__/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "csstype-test",
33
"dependencies": {
44
"typescript3.5": "npm:[email protected]",
5-
"typescript3.6": "npm:[email protected]"
5+
"typescript3.6": "npm:[email protected]",
6+
"typescript3.7": "npm:[email protected]",
7+
"typescript3.8": "npm:[email protected]"
68
}
79
}

0 commit comments

Comments
 (0)