forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable dts-trimming for packages/runtime (microsoft#18359)
#### Description Related: [18176](https://github.com/microsoft/FluidFramework/pull/18176/files) This PR adds type-trimming for `packages/runtime` directory. The changes introduced are: - Add npm `copyfiles` package as `devDependency` - Add `dtsRollup` in `api-extractor.json` - Enable both type-trimming for both `ESM` & `CJS` - Make `fluidBuild` to fetch dependencies from the scripts included in `dependsOn`
- Loading branch information
1 parent
4fd30f5
commit 11df774
Showing
15 changed files
with
157 additions
and
10 deletions.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
packages/runtime/container-runtime-definitions/api-extractor.json
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "@fluidframework/build-common/api-extractor-base.json" | ||
"extends": "@fluidframework/build-common/api-extractor-base.json", | ||
"dtsRollup": { | ||
"enabled": true | ||
} | ||
} |
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 |
---|---|---|
|
@@ -14,9 +14,12 @@ | |
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"api": "fluid-build . --task api", | ||
"api-extractor:commonjs": "api-extractor run --local", | ||
"api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib", | ||
"build": "fluid-build . --task build", | ||
"build:compile": "fluid-build . --task compile", | ||
"build:docs": "api-extractor run --local", | ||
"build:docs": "fluid-build . --task api", | ||
"build:test": "tsc --project ./src/test/tsconfig.json", | ||
"ci:build:docs": "api-extractor run", | ||
"clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp", | ||
|
@@ -45,11 +48,24 @@ | |
"@fluidframework/container-runtime-definitions-previous": "npm:@fluidframework/[email protected]", | ||
"@fluidframework/eslint-config-fluid": "^3.1.0", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "~8.50.0", | ||
"prettier": "~3.0.3", | ||
"rimraf": "^4.4.0", | ||
"typescript": "~5.1.6" | ||
}, | ||
"fluidBuild": { | ||
"tasks": { | ||
"build:docs": { | ||
"dependsOn": [ | ||
"...", | ||
"api-extractor:commonjs", | ||
"api-extractor:esnext" | ||
], | ||
"script": false | ||
} | ||
} | ||
}, | ||
"typeValidation": { | ||
"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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "@fluidframework/build-common/api-extractor-base.json" | ||
"extends": "@fluidframework/build-common/api-extractor-base.json", | ||
"dtsRollup": { | ||
"enabled": true | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -14,9 +14,12 @@ | |
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"api": "fluid-build . --task api", | ||
"api-extractor:commonjs": "api-extractor run --local", | ||
"api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib", | ||
"build": "fluid-build . --task build", | ||
"build:compile": "fluid-build . --task compile", | ||
"build:docs": "api-extractor run --local", | ||
"build:docs": "fluid-build . --task api", | ||
"build:test": "tsc --project ./src/test/tsconfig.json", | ||
"ci:build:docs": "api-extractor run", | ||
"clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp", | ||
|
@@ -44,11 +47,24 @@ | |
"@fluidframework/datastore-definitions-previous": "npm:@fluidframework/[email protected]", | ||
"@fluidframework/eslint-config-fluid": "^3.1.0", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "~8.50.0", | ||
"prettier": "~3.0.3", | ||
"rimraf": "^4.4.0", | ||
"typescript": "~5.1.6" | ||
}, | ||
"fluidBuild": { | ||
"tasks": { | ||
"build:docs": { | ||
"dependsOn": [ | ||
"...", | ||
"api-extractor:commonjs", | ||
"api-extractor:esnext" | ||
], | ||
"script": false | ||
} | ||
} | ||
}, | ||
"typeValidation": { | ||
"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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "@fluidframework/build-common/api-extractor-base.json" | ||
"extends": "@fluidframework/build-common/api-extractor-base.json", | ||
"dtsRollup": { | ||
"enabled": true | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -14,9 +14,12 @@ | |
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"api": "fluid-build . --task api", | ||
"api-extractor:commonjs": "api-extractor run --local", | ||
"api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib", | ||
"build": "fluid-build . --task build", | ||
"build:compile": "fluid-build . --task compile", | ||
"build:docs": "api-extractor run --local", | ||
"build:docs": "fluid-build . --task api", | ||
"build:test": "tsc --project ./src/test/tsconfig.json", | ||
"ci:build:docs": "api-extractor run", | ||
"clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp", | ||
|
@@ -44,12 +47,25 @@ | |
"@fluidframework/eslint-config-fluid": "^3.1.0", | ||
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/[email protected]", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "~8.50.0", | ||
"eslint-plugin-deprecation": "~2.0.0", | ||
"prettier": "~3.0.3", | ||
"rimraf": "^4.4.0", | ||
"typescript": "~5.1.6" | ||
}, | ||
"fluidBuild": { | ||
"tasks": { | ||
"build:docs": { | ||
"dependsOn": [ | ||
"...", | ||
"api-extractor:commonjs", | ||
"api-extractor:esnext" | ||
], | ||
"script": false | ||
} | ||
} | ||
}, | ||
"typeValidation": { | ||
"broken": { | ||
"TypeAliasDeclaration_IdCreationRangeWithStashedState": { | ||
|
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
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
Oops, something went wrong.