Skip to content

Commit cb31a01

Browse files
authored
chore: API Extractor (#1964)
1 parent 792c038 commit cb31a01

59 files changed

Lines changed: 4774 additions & 25 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ node_modules/
1616
**/.storybook/jest-results.json
1717
**/bundle-report.html
1818
.env
19+
/packages/*/temp/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ bundle-report.html
66
/.turbo
77
/.yarn
88
/README.md
9+
*.api.md

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"[pegjs]": {
77
"editor.defaultFormatter": "esbenp.prettier-vscode"
88
},
9-
"typescript.tsdk": "node_modules/typescript/lib"
9+
"js/ts.tsdk.path": "node_modules/typescript/lib",
10+
"files.associations": {
11+
"api-extractor.json": "jsonc"
12+
}
1013
}

api-extractor.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* Shared base config file for API Extractor in the fuselage monorepo.
3+
* For more info, please visit: https://api-extractor.com
4+
*
5+
* Each package should create its own api-extractor.json that extends this file:
6+
*
7+
* {
8+
* "extends": "../../api-extractor.json",
9+
* "mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
10+
* }
11+
*/
12+
{
13+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
14+
15+
"bundledPackages": [],
16+
17+
"compiler": {},
18+
19+
"apiReport": {
20+
"enabled": true,
21+
"reportFolder": "<projectFolder>/"
22+
},
23+
24+
"docModel": {
25+
"enabled": false
26+
},
27+
28+
"dtsRollup": {
29+
"enabled": false
30+
},
31+
32+
"tsdocMetadata": {},
33+
34+
"messages": {
35+
"compilerMessageReporting": {
36+
"default": {
37+
"logLevel": "warning"
38+
}
39+
},
40+
"extractorMessageReporting": {
41+
"default": {
42+
"logLevel": "warning"
43+
}
44+
},
45+
"tsdocMessageReporting": {
46+
"default": {
47+
"logLevel": "warning"
48+
}
49+
}
50+
}
51+
}

eslint.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import tseslint from 'typescript-eslint';
1414

1515
export default tseslint.config(
1616
{
17-
ignores: ['**/dist/**', '.yarn/**', '**/storybook-static/**'],
17+
ignores: [
18+
'**/dist/**',
19+
'.yarn/**',
20+
'**/storybook-static/**',
21+
'**/*.api.md',
22+
],
1823
},
1924
{
2025
rules: {

packages/css-in-js/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/dist/
2+
/temp
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"extends": "../../api-extractor.json",
4+
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
5+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## API Report File for "@rocket.chat/css-in-js"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { cssSupports } from '@rocket.chat/css-supports';
8+
import type { Middleware } from 'stylis';
9+
10+
// Warning: (ae-forgotten-export) The symbol "RuleAttacher" needs to be exported by the entry point index.d.ts
11+
//
12+
// @public (undocumented)
13+
export const attachRules: RuleAttacher;
14+
15+
// @public (undocumented)
16+
export const createAnimationName: (content: string) => string;
17+
18+
// @public (undocumented)
19+
export const createClassName: (content: string) => string;
20+
21+
// @public (undocumented)
22+
export const css: (slices: TemplateStringsArray, ...values: readonly unknown[]) => cssFn;
23+
24+
// Warning: (ae-forgotten-export) The symbol "Evaluable" needs to be exported by the entry point index.d.ts
25+
//
26+
// @public (undocumented)
27+
export type cssFn = Evaluable;
28+
29+
export { cssSupports }
30+
31+
// @public (undocumented)
32+
export const escapeName: (animationOrClassName: string) => string;
33+
34+
// @public (undocumented)
35+
export const keyframes: (slices: TemplateStringsArray, ...values: unknown[]) => keyframesFn;
36+
37+
// @public (undocumented)
38+
export type keyframesFn = Evaluable;
39+
40+
// @public (undocumented)
41+
export const transpile: (selector: string, content: string, middleware?: Middleware) => string;
42+
43+
// (No @packageDocumentation comment for this package)
44+
45+
```

packages/css-in-js/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"/logicalProperties"
3131
],
3232
"scripts": {
33-
"build": "rollup -c",
33+
"build": "rollup -c && api-extractor run --local",
34+
".:build:api": "api-extractor run --local",
3435
"docs": "typedoc",
3536
"lint": "lint",
3637
"lint-and-fix": "lint-and-fix",
@@ -44,6 +45,7 @@
4445
"stylis": "~4.3.6"
4546
},
4647
"devDependencies": {
48+
"@microsoft/api-extractor": "~7.58.7",
4749
"@rollup/plugin-commonjs": "~28.0.9",
4850
"@rollup/plugin-json": "~6.1.0",
4951
"@rollup/plugin-node-resolve": "~16.0.3",

packages/css-supports/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/dist
2+
/temp

0 commit comments

Comments
 (0)