Skip to content

Commit

Permalink
Additional type validator fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
heliocliu committed Apr 6, 2022
1 parent 2cf4716 commit 8a06318
Show file tree
Hide file tree
Showing 21 changed files with 128 additions and 17 deletions.
3 changes: 3 additions & 0 deletions packages/framework/data-object-base/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
],
"parserOptions": {
"project": ["./tsconfig.json", "./src/test/tsconfig.json"]
},
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/framework/data-object-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
],
"scripts": {
"build": "concurrently npm:build:compile npm:lint && npm run build:docs",
"build:compile": "concurrently npm:tsc npm:build:es5 npm:build:esnext",
"build:compile": "concurrently npm:tsc npm:build:es5 npm:build:esnext && npm run build:test",
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
"build:es5": "tsc --project ./tsconfig.es5.json",
"build:esnext": "tsc --project ./tsconfig.esnext.json",
"build:full": "npm run build",
"build:full:compile": "npm run build:compile",
"build:test": "tsc --project ./src/test/tsconfig.json",
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
"clean": "rimraf dist lib es5 *.tsbuildinfo *.build.log",
"eslint": "eslint --format stylish src",
Expand Down
22 changes: 22 additions & 0 deletions packages/framework/data-object-base/src/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "@fluidframework/build-common/ts-common-config.json",
"compilerOptions": {
"rootDir": "./",
"outDir": "../../dist/test",
"types": [
"node",
"mocha"
],
"declaration": false,
"declarationMap": false,
"skipLibCheck": true
},
"include": [
"./**/*"
],
"references": [
{
"path": "../.."
}
]
}
2 changes: 1 addition & 1 deletion packages/framework/data-object-base/tsconfig.es5.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"exclude": [
"dist",
"node_modules",
"test"
"src/test/**/*"
],
}
6 changes: 4 additions & 2 deletions packages/framework/data-object-base/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"extends": "@fluidframework/build-common/ts-common-config.json",
"exclude": [
"dist",
"node_modules"
"node_modules",
"src/test/**/*"
],
"compilerOptions": {
"declarationDir": "./dist",
"rootDir": "./src",
"outDir": "./dist",
"types": [
"mocha"
]
],
"composite": true
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/fluid-static/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
"@fluidframework/eslint-config-fluid"
],
"parserOptions": {
"project": ["./tsconfig.json"]
"project": ["./tsconfig.json", "./src/test/tsconfig.json"]
},
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off"
Expand Down
3 changes: 2 additions & 1 deletion packages/framework/fluid-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "concurrently npm:build:compile npm:lint && npm run build:docs",
"build:commonjs": "npm run tsc",
"build:commonjs": "npm run tsc && npm run build:test",
"build:compile": "concurrently npm:build:commonjs npm:build:esnext",
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
"build:esnext": "tsc --project ./tsconfig.esnext.json",
"build:full": "npm run build",
"build:full:compile": "npm run build:compile",
"build:test": "tsc --project ./src/test/tsconfig.json",
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
"clean": "rimraf dist *.tsbuildinfo *.build.log",
"eslint": "eslint --format stylish src",
Expand Down
21 changes: 21 additions & 0 deletions packages/framework/fluid-static/src/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "@fluidframework/build-common/ts-common-config.json",
"compilerOptions": {
"rootDir": "./",
"outDir": "../../dist/test",
"types": [
"mocha"
],
"declaration": false,
"declarationMap": false,
"skipLibCheck": true
},
"include": [
"./**/*"
],
"references": [
{
"path": "../.."
}
]
}
3 changes: 2 additions & 1 deletion packages/framework/fluid-static/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "@fluidframework/build-common/ts-common-config.json",
"exclude": [
"dist",
"node_modules"
"node_modules",
"src/test/**/*"
],
"compilerOptions": {
"rootDir": "./src",
Expand Down
5 changes: 4 additions & 1 deletion packages/loader/web-code-loader/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
]
],
"parserOptions": {
"project": ["./tsconfig.json", "./src/test/tsconfig.json"]
}
}
3 changes: 2 additions & 1 deletion packages/loader/web-code-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "concurrently npm:build:compile npm:lint && npm run build:docs",
"build:compile": "concurrently npm:tsc npm:build:esnext",
"build:compile": "concurrently npm:tsc npm:build:esnext && npm run build:test",
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
"build:esnext": "tsc --project ./tsconfig.esnext.json",
"build:full": "npm run build",
"build:full:compile": "npm run build:compile",
"build:test": "tsc --project ./src/test/tsconfig.json",
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"eslint": "eslint --format stylish src",
Expand Down
19 changes: 19 additions & 0 deletions packages/loader/web-code-loader/src/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "@fluidframework/build-common/ts-common-config.json",
"compilerOptions": {
"rootDir": "./",
"outDir": "../../dist/test",
"declaration": false,
"declarationMap": false,
"skipLibCheck": true,
"noEmit": true,
},
"include": [
"./**/*"
],
"references": [
{
"path": "../.."
}
]
}
6 changes: 4 additions & 2 deletions packages/loader/web-code-loader/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"extends": "@fluidframework/build-common/ts-common-config.json",
"exclude": [
"dist",
"node_modules"
"node_modules",
"src/test/**/*"
],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
"outDir": "./dist",
"composite": true
},
"include": [
"src/**/*"
Expand Down
3 changes: 3 additions & 0 deletions packages/runtime/agent-scheduler/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
],
"parserOptions": {
"project": ["./tsconfig.json", "./src/test/tsconfig.json"]
},
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off",
"no-null/no-null": "off"
Expand Down
3 changes: 2 additions & 1 deletion packages/runtime/agent-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "concurrently npm:build:compile npm:lint",
"build:compile": "concurrently npm:tsc npm:build:esnext",
"build:compile": "concurrently npm:tsc npm:build:esnext && npm run build:test",
"build:esnext": "tsc --project ./tsconfig.esnext.json",
"build:full": "npm run build",
"build:full:compile": "npm run build:compile",
"build:test": "tsc --project ./src/test/tsconfig.json",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"dev": "npm run build:dev -- --watch",
"eslint": "eslint --format stylish src",
Expand Down
22 changes: 22 additions & 0 deletions packages/runtime/agent-scheduler/src/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "@fluidframework/build-common/ts-common-config.json",
"compilerOptions": {
"rootDir": "./",
"outDir": "../../dist/test",
"types": [
"node",
"mocha"
],
"declaration": false,
"declarationMap": false,
"skipLibCheck": true
},
"include": [
"./**/*"
],
"references": [
{
"path": "../.."
}
]
}
6 changes: 4 additions & 2 deletions packages/runtime/agent-scheduler/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"extends": "@fluidframework/build-common/ts-common-config.json",
"exclude": [
"dist",
"node_modules"
"node_modules",
"src/test/**/*"
],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
"outDir": "./dist",
"composite": true
},
"include": [
"src/**/*"
Expand Down
3 changes: 2 additions & 1 deletion packages/runtime/garbage-collector/src/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"mocha"
],
"declaration": false,
"declarationMap": false
"declarationMap": false,
"skipLibCheck": true
},
"include": [
"./**/*"
Expand Down
6 changes: 5 additions & 1 deletion packages/runtime/test-runtime-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
},
"typeValidation": {
"version": "0.59.1000",
"broken": {}
"broken": {
"0.58.2002": {
"ClassDeclaration_MockFluidDataStoreContext": {"backCompat": false}
}
}
}
}
3 changes: 2 additions & 1 deletion packages/runtime/test-runtime-utils/src/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"mocha"
],
"declaration": false,
"declarationMap": false
"declarationMap": false,
"skipLibCheck": true
},
"include": [
"./**/*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ declare function get_current_ClassDeclaration_MockFluidDataStoreContext():
declare function use_old_ClassDeclaration_MockFluidDataStoreContext(
use: TypeOnly<old.MockFluidDataStoreContext>);
use_old_ClassDeclaration_MockFluidDataStoreContext(
// @ts-expect-error compatibility expected to be broken
get_current_ClassDeclaration_MockFluidDataStoreContext());

/*
Expand Down

0 comments on commit 8a06318

Please sign in to comment.