Skip to content

Commit

Permalink
Bump Npm packages
Browse files Browse the repository at this point in the history
  • Loading branch information
frenic committed May 16, 2022
1 parent b1318fd commit 01e2d9b
Show file tree
Hide file tree
Showing 9 changed files with 2,536 additions and 2,075 deletions.
58 changes: 29 additions & 29 deletions __tests__/__fixtures__/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions __tests__/__snapshots__/dist.typescript-4.5.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 4.5 detects errors 1`] = `"31:9 - Type 'undefined' is not assignable to type 'Clip'."`;

exports[`Typescript 4.5 detects errors 2`] = `
"48:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 4.5 detects errors 3`] = `"52:11 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.5 detects errors 4`] = `"53:10 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.5 detects errors 5`] = `
"58:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 4.5 detects errors 6`] = `
"63:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 4.5 detects errors 7`] = `"70:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 4.5 detects errors 8`] = `"82:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 4.5 detects errors 9`] = `"96:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 4.5 detects errors 10`] = `"106:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 4.5 detects errors 11`] = `"107:15 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 4.5 detects errors 12`] = `"120:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 4.5 detects errors 13`] = `"134:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 4.5 detects errors 14`] = `"144:34 - Argument of type '1' is not assignable to parameter of type 'Width<0 | (string & {})> | [Width<0 | (string & {})>]'."`;

exports[`Typescript 4.5 detects errors 15`] = `"145:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;

exports[`Typescript 4.5 detects errors 16`] = `"150:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
32 changes: 16 additions & 16 deletions __tests__/__snapshots__/dist.typescript-latest.ts.snap
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 4.4 detects errors 1`] = `"31:9 - Type 'undefined' is not assignable to type 'Clip'."`;
exports[`Typescript 4.6 detects errors 1`] = `"31:9 - Type 'undefined' is not assignable to type 'Clip'."`;

exports[`Typescript 4.4 detects errors 2`] = `
exports[`Typescript 4.6 detects errors 2`] = `
"48:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 4.4 detects errors 3`] = `"52:11 - Type 'number' is not assignable to type 'string'."`;
exports[`Typescript 4.6 detects errors 3`] = `"52:11 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.4 detects errors 4`] = `"53:10 - Type 'number' is not assignable to type 'string'."`;
exports[`Typescript 4.6 detects errors 4`] = `"53:10 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.4 detects errors 5`] = `
exports[`Typescript 4.6 detects errors 5`] = `
"58:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 4.4 detects errors 6`] = `
exports[`Typescript 4.6 detects errors 6`] = `
"63:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 4.4 detects errors 7`] = `"70:6 - Type '1' is not assignable to type 'string | 0'."`;
exports[`Typescript 4.6 detects errors 7`] = `"70:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 4.4 detects errors 8`] = `"82:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;
exports[`Typescript 4.6 detects errors 8`] = `"82:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 4.4 detects errors 9`] = `"96:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;
exports[`Typescript 4.6 detects errors 9`] = `"96:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 4.4 detects errors 10`] = `"106:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;
exports[`Typescript 4.6 detects errors 10`] = `"106:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 4.4 detects errors 11`] = `"107:15 - Type '1' is not assignable to type 'string | 0'."`;
exports[`Typescript 4.6 detects errors 11`] = `"107:15 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 4.4 detects errors 12`] = `"120:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;
exports[`Typescript 4.6 detects errors 12`] = `"120:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 4.4 detects errors 13`] = `"134:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;
exports[`Typescript 4.6 detects errors 13`] = `"134:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 4.4 detects errors 14`] = `"144:34 - Argument of type '1' is not assignable to parameter of type 'Width<0 | (string & {})> | [Width<0 | (string & {})>]'."`;
exports[`Typescript 4.6 detects errors 14`] = `"144:34 - Argument of type '1' is not assignable to parameter of type 'Width<0 | (string & {})> | [Width<0 | (string & {})>]'."`;

exports[`Typescript 4.4 detects errors 15`] = `"145:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;
exports[`Typescript 4.6 detects errors 15`] = `"145:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;

exports[`Typescript 4.4 detects errors 16`] = `"150:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
exports[`Typescript 4.6 detects errors 16`] = `"150:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
22 changes: 22 additions & 0 deletions __tests__/dist.typescript-4.5.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as path from 'path';
import * as ts from 'typescript4.5';
import { removeAbsolutePaths, COMPILER_OPTIONS } from './typescript-utils';

describe('Typescript 4.5', () => {
it('detects errors', async () => {
const program = ts.createProgram([path.resolve(__dirname, '__fixtures__/typecheck.ts')], COMPILER_OPTIONS);
const diagnostics = ts.getPreEmitDiagnostics(program);
const errors = diagnostics.map(diagnostic => {
const { line, character } = diagnostic.file!.getLineAndCharacterOfPosition(diagnostic.start!);
return `${line}:${character} - ${removeAbsolutePaths(
ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'),
)}`;
});

expect(Number(ts.versionMajorMinor)).toBe(4.5);
expect(errors.length).toBe(16);
for (const error of errors) {
expect(error).toMatchSnapshot();
}
});
});
4 changes: 2 additions & 2 deletions __tests__/dist.typescript-latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as ts from 'typescript';
import { removeAbsolutePaths, COMPILER_OPTIONS } from './typescript-utils';

describe('Typescript 4.4', () => {
describe('Typescript 4.6', () => {
it('detects errors', async () => {
const program = ts.createProgram([path.resolve(__dirname, '__fixtures__/typecheck.ts')], COMPILER_OPTIONS);
const diagnostics = ts.getPreEmitDiagnostics(program);
Expand All @@ -13,7 +13,7 @@ describe('Typescript 4.4', () => {
)}`;
});

expect(Number(ts.versionMajorMinor)).toBe(4.5);
expect(Number(ts.versionMajorMinor)).toBe(4.6);
expect(errors.length).toBe(16);
for (const error of errors) {
expect(error).toMatchSnapshot();
Expand Down
79 changes: 49 additions & 30 deletions __tests__/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion __tests__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"typescript4.1": "npm:typescript@~4.1.0",
"typescript4.2": "npm:typescript@~4.2.0",
"typescript4.3": "npm:typescript@~4.3.0",
"typescript4.4": "npm:typescript@~4.4.0"
"typescript4.4": "npm:typescript@~4.4.0",
"typescript4.5": "npm:typescript@~4.5.0"
}
}
Loading

0 comments on commit 01e2d9b

Please sign in to comment.