-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable type validation for all client packages (#9673)
This change uses a new improved version of the type validation tool to generate validation tests for all packages (#9674). Generally this change in all done via automation, but there are a couple other changes. Remove type validation from existing packages, and move to new model Fix fluid-build non-conformant packages All automatic type validation generation is removed. It is to slow to run on every build. It should only need to be run after release, and in the presence of new breaking changes that must be suppressed
- Loading branch information
1 parent
40a0e58
commit 5681a58
Showing
172 changed files
with
20,767 additions
and
11,821 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
"lint:fix": "npm run eslint:fix", | ||
"test": "npm run test:mocha", | ||
"test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml", | ||
"test:mocha": "mocha --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict", | ||
"test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict", | ||
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha", | ||
"tsc": "tsc", | ||
"tsfmt": "tsfmt --verify", | ||
|
@@ -70,6 +70,7 @@ | |
"devDependencies": { | ||
"@fluid-internal/test-dds-utils": "^0.58.3000", | ||
"@fluidframework/build-common": "^0.23.0", | ||
"@fluidframework/cell-previous": "npm:@fluidframework/[email protected]", | ||
"@fluidframework/eslint-config-fluid": "^0.27.0", | ||
"@fluidframework/mocha-test-setup": "^0.58.3000", | ||
"@fluidframework/test-runtime-utils": "^0.58.3000", | ||
|
@@ -94,5 +95,9 @@ | |
"rimraf": "^2.6.2", | ||
"typescript": "~4.1.3", | ||
"typescript-formatter": "7.1.0" | ||
}, | ||
"typeValidation": { | ||
"version": "0.58.3000", | ||
"broken": {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
/* | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by fluid-type-validator in @fluidframework/build-tools. | ||
*/ | ||
/* eslint-disable max-lines */ | ||
import * as old from "@fluidframework/cell-previous"; | ||
import * as current from "../../index"; | ||
|
||
type TypeOnly<T> = { | ||
[P in keyof T]: TypeOnly<T[P]>; | ||
}; | ||
|
||
/* | ||
* Validate forward compat by using old type in place of current type | ||
* If breaking change required, add in package.json under typeValidation.broken.0.58.2000: | ||
* "InterfaceDeclaration_ISharedCell": {"forwardCompat": false} | ||
*/ | ||
declare function get_old_InterfaceDeclaration_ISharedCell(): | ||
TypeOnly<old.ISharedCell>; | ||
declare function use_current_InterfaceDeclaration_ISharedCell( | ||
use: TypeOnly<current.ISharedCell>); | ||
use_current_InterfaceDeclaration_ISharedCell( | ||
get_old_InterfaceDeclaration_ISharedCell()); | ||
|
||
/* | ||
* Validate back compat by using current type in place of old type | ||
* If breaking change required, add in package.json under typeValidation.broken.0.58.2000: | ||
* "InterfaceDeclaration_ISharedCell": {"backCompat": false} | ||
*/ | ||
declare function get_current_InterfaceDeclaration_ISharedCell(): | ||
TypeOnly<current.ISharedCell>; | ||
declare function use_old_InterfaceDeclaration_ISharedCell( | ||
use: TypeOnly<old.ISharedCell>); | ||
use_old_InterfaceDeclaration_ISharedCell( | ||
get_current_InterfaceDeclaration_ISharedCell()); | ||
|
||
/* | ||
* Validate forward compat by using old type in place of current type | ||
* If breaking change required, add in package.json under typeValidation.broken.0.58.2000: | ||
* "InterfaceDeclaration_ISharedCellEvents": {"forwardCompat": false} | ||
*/ | ||
declare function get_old_InterfaceDeclaration_ISharedCellEvents(): | ||
TypeOnly<old.ISharedCellEvents<any>>; | ||
declare function use_current_InterfaceDeclaration_ISharedCellEvents( | ||
use: TypeOnly<current.ISharedCellEvents<any>>); | ||
use_current_InterfaceDeclaration_ISharedCellEvents( | ||
get_old_InterfaceDeclaration_ISharedCellEvents()); | ||
|
||
/* | ||
* Validate back compat by using current type in place of old type | ||
* If breaking change required, add in package.json under typeValidation.broken.0.58.2000: | ||
* "InterfaceDeclaration_ISharedCellEvents": {"backCompat": false} | ||
*/ | ||
declare function get_current_InterfaceDeclaration_ISharedCellEvents(): | ||
TypeOnly<current.ISharedCellEvents<any>>; | ||
declare function use_old_InterfaceDeclaration_ISharedCellEvents( | ||
use: TypeOnly<old.ISharedCellEvents<any>>); | ||
use_old_InterfaceDeclaration_ISharedCellEvents( | ||
get_current_InterfaceDeclaration_ISharedCellEvents()); | ||
|
||
/* | ||
* Validate forward compat by using old type in place of current type | ||
* If breaking change required, add in package.json under typeValidation.broken.0.58.2000: | ||
* "ClassDeclaration_SharedCell": {"forwardCompat": false} | ||
*/ | ||
declare function get_old_ClassDeclaration_SharedCell(): | ||
TypeOnly<old.SharedCell>; | ||
declare function use_current_ClassDeclaration_SharedCell( | ||
use: TypeOnly<current.SharedCell>); | ||
use_current_ClassDeclaration_SharedCell( | ||
get_old_ClassDeclaration_SharedCell()); | ||
|
||
/* | ||
* Validate back compat by using current type in place of old type | ||
* If breaking change required, add in package.json under typeValidation.broken.0.58.2000: | ||
* "ClassDeclaration_SharedCell": {"backCompat": false} | ||
*/ | ||
declare function get_current_ClassDeclaration_SharedCell(): | ||
TypeOnly<current.SharedCell>; | ||
declare function use_old_ClassDeclaration_SharedCell( | ||
use: TypeOnly<old.SharedCell>); | ||
use_old_ClassDeclaration_SharedCell( | ||
get_current_ClassDeclaration_SharedCell()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
"lint:fix": "npm run eslint:fix", | ||
"test": "npm run test:mocha", | ||
"test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml", | ||
"test:mocha": "mocha --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict", | ||
"test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict", | ||
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha", | ||
"tsc": "tsc" | ||
}, | ||
|
@@ -67,6 +67,7 @@ | |
}, | ||
"devDependencies": { | ||
"@fluidframework/build-common": "^0.23.0", | ||
"@fluidframework/counter-previous": "npm:@fluidframework/[email protected]", | ||
"@fluidframework/eslint-config-fluid": "^0.27.0", | ||
"@fluidframework/mocha-test-setup": "^0.58.3000", | ||
"@fluidframework/test-runtime-utils": "^0.58.3000", | ||
|
@@ -90,5 +91,9 @@ | |
"nyc": "^15.0.0", | ||
"rimraf": "^2.6.2", | ||
"typescript": "~4.1.3" | ||
}, | ||
"typeValidation": { | ||
"version": "0.58.3000", | ||
"broken": {} | ||
} | ||
} | ||
} |
Oops, something went wrong.