UNPKG

6.25 kBJSONView Raw
1{
2 "name": "@microsoft/api-extractor",
3 "version": "7.28.3",
4 "description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",
5 "keywords": [
6 "typescript",
7 "API",
8 "JSDoc",
9 "AEDoc",
10 "TSDoc",
11 "generate",
12 "documentation",
13 "declaration",
14 "dts",
15 ".d.ts",
16 "rollup",
17 "bundle",
18 "compiler",
19 "alpha",
20 "beta"
21 ],
22 "repository": {
23 "type": "git",
24 "url": "https://github.com/microsoft/rushstack.git",
25 "directory": "apps/api-extractor"
26 },
27 "homepage": "https://api-extractor.com",
28 "main": "lib/index.js",
29 "typings": "dist/rollup.d.ts",
30 "bin": {
31 "api-extractor": "./bin/api-extractor"
32 },
33 "license": "MIT",
34 "dependencies": {
35 "@microsoft/api-extractor-model": "7.21.0",
36 "@microsoft/tsdoc": "0.14.1",
37 "@microsoft/tsdoc-config": "~0.16.1",
38 "@rushstack/node-core-library": "3.49.0",
39 "@rushstack/rig-package": "0.3.13",
40 "@rushstack/ts-command-line": "4.12.1",
41 "colors": "~1.2.1",
42 "lodash": "~4.17.15",
43 "resolve": "~1.17.0",
44 "semver": "~7.3.0",
45 "source-map": "~0.6.1",
46 "typescript": "~4.6.3"
47 },
48 "devDependencies": {
49 "@rushstack/eslint-config": "2.6.2",
50 "@rushstack/heft": "0.45.14",
51 "@rushstack/heft-node-rig": "1.9.15",
52 "@types/heft-jest": "1.0.1",
53 "@types/lodash": "4.14.116",
54 "@types/node": "12.20.24",
55 "@types/resolve": "1.17.1",
56 "@types/semver": "7.3.5"
57 },
58 "scripts": {
59 "build": "heft build --clean",
60 "_phase:build": "heft build --clean",
61 "_phase:test": "heft test --no-build"
62 },
63 "readme": "# @microsoft/api-extractor\n\n\n![API Extractor](https://github.com/microsoft/rushstack/raw/main/common/wiki-images/api-extractor-title.png?raw=true)\n<br />\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; https://api-extractor.com/\n\n<!-- ------------------------------------------------------------------ -->\n<!-- Text below this line should stay in sync with the web site content -->\n<!-- ------------------------------------------------------------------ -->\n\n**API Extractor** helps you build better [TypeScript](https://www.typescriptlang.org/) library packages. Suppose for example that your company has published an NPM package called \"**awesome-widgets**\" that exports many classes and interfaces. As developers start to depend on your library, you may encounter issues such as...\n\n- **Accidental breaks:** People keep reporting that their code won't compile after a supposedly \"minor\" update. To address this, you boldly propose that every **awesome-widgets** pull request must be approved by an experienced developer from your team. But that proves unrealistic -- nobody has time to look at every single PR! What you really need is a way to detect PRs that change API contracts, and flag them for review. That would focus attention in the right place... but how to do that?\n\n- **Missing exports:** Suppose the **awesome-widgets** package exports an API function `AwesomeButton.draw()` that requires a parameter of type `DrawStyle`, but you forgot to export this enum. Things seem fine at first, but when a developer tries to call that function, they discover that there's no way to specify the `DrawStyle`. How to avoid these oversights?\n\n- **Accidental exports:** You meant for your `DrawHelper` class to be kept internal, but one day you realize it's being exported. When you try to remove it, consumers complain that they're using it. How do we avoid this in the future?\n\n- **Alpha/Beta graduation:** You want to release previews of new APIs that are not ready for prime time yet. But if you did a major SemVer bump every time these definitions evolve, the villagers would be after you with torches and pitchforks! A better approach is to designate certain classes/members as **alpha** quality, then promote them to **beta** and finally to **public** as they mature. But how to indicate this to your consumers? (And how to detect scoping mistakes? A **public** function should never return a **beta** result.)\n\n- **\\*.d.ts rollup:** You webpacked your library into a nice **\\*.js** bundle file -- so why ship your typings as a messy tree of **lib/\\*.d.ts** files full of private definitions? Can't we consolidate them into a tidy **\\*.d.ts** rollup file? And if you publish internal/beta/public releases, each release type should get its own **\\*.d.ts** file with appropriate trimming. Developers building a production project don't want to see a bunch of **internal** and **beta** members in their VS Code IntelliSense!\n\n- **Online documentation:** You have faithfully annotated each TypeScript member with nice [TSDoc](https://github.com/microsoft/tsdoc) descriptions. Now that your library has shipped, it's time to set up [a nicely formatted](https://docs.microsoft.com/en-us/javascript/api/sp-http) API reference. What tool to use?\n\n**API Extractor** provides an integrated, professional-quality solution for all these problems. It is invoked at build time by your toolchain and leverages the TypeScript compiler engine to:\n\n- Detect a project's exported API surface\n- Capture the contracts in a concise report designed to facilitate review\n- Warn about common mistakes (e.g. missing exports, inconsistent visibility, etc.)\n- Generate \\*.d.ts rollups with trimming according to release type\n- Output API documentation in a portable format that's easy to integrate with your content pipeline\n\nBest of all, **API Extractor** is free and open source. Join the community and create a pull request!\n\n<!-- ------------------------------------------------------------------ -->\n<!-- Text above this line should stay in sync with the web site content -->\n<!-- ------------------------------------------------------------------ -->\n\n## Getting Started\n\nFor more details and support resources, please visit: https://api-extractor.com/\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/CHANGELOG.md) - Find\n out what's new in the latest version\n- [API Reference](https://rushstack.io/pages/api/api-extractor/)\n\nAPI Extractor is part of the [Rush Stack](https://rushstack.io/) family of projects.\n"
64}
\No newline at end of file