build: package api-extractor and -model (#9920)

* fix(ExceptText): don't display import("d..-types/v10"). in return type

* Squashed 'packages/api-extractor-model/' content from commit 39ecb196c

git-subtree-dir: packages/api-extractor-model
git-subtree-split: 39ecb196ca210bdf84ba6c9cadb1bb93571849d7

* Squashed 'packages/api-extractor/' content from commit 341ad6c51

git-subtree-dir: packages/api-extractor
git-subtree-split: 341ad6c51b01656d4f73b74ad4bdb3095f9262c4

* feat(api-extractor): add api-extractor and -model

* fix: package.json docs script

* fix(SourcLink): use <> instead of function syntax

* fix: make packages private

* fix: rest params showing in docs, added labels

* fix: missed two files

* fix: cpy-cli & pnpm-lock

* fix: increase icon size

* fix: icon size again
This commit is contained in:
Qjuh
2023-11-07 21:53:36 +01:00
committed by GitHub
parent 95c0b1a59f
commit 5c0fad3b2d
251 changed files with 36017 additions and 296 deletions

View File

@@ -0,0 +1,20 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts",
"apiReport": {
"enabled": true,
"reportFolder": "../../../common/reviews/api"
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "../../../common/temp/api/<unscopedPackageName>.api.json"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/rollup.d.ts"
}
}

View File

@@ -0,0 +1,64 @@
{
// By default, don't hide console output
"silent": false,
// In order for HeftJestReporter to receive console.log() events, we must set verbose=false
"verbose": false,
// If mocks are not cleared between tests, it opens the door to accidental reliance on
// ordering of tests or describe blocks, eventually resulting in intermittent failures.
//
// We suggest this setting for any heft project (in a monorepo or not).
"clearMocks": true,
// "Adding '<rootDir>/dist' here enables dist/__mocks__ to be used for mocking Node.js system modules
"roots": ["<rootDir>/dist"],
"testMatch": ["<rootDir>/dist/**/*.test.{cjs,js}"],
"testPathIgnorePatterns": ["/node_modules/"],
"collectCoverageFrom": [
"dist/**/*.{cjs,js}",
"!dist/**/*.d.ts",
"!dist/**/*.test.{cjs,js}",
"!dist/**/test/**",
"!dist/**/__tests__/**",
"!dist/**/__fixtures__/**",
"!dist/**/__mocks__/**"
],
"coveragePathIgnorePatterns": ["/node_modules/"],
"testEnvironment": "jest-environment-node",
"testEnvironmentOptions": {
"url": "http://localhost/",
"customExportConditions": ["require", "node"]
},
// Retain pre-Jest 29 snapshot behavior
"snapshotFormat": {
"escapeString": true,
"printBasicPrototype": true
},
// Instruct jest not to run the transformer pipeline by default on JS files. The output files from TypeScript
// will already be fully transformed, so this avoids redundant file system operations.
"transformIgnorePatterns": ["\\.c?js$"],
// The modulePathIgnorePatterns below accepts these sorts of paths:
// - <rootDir>/dist
// - <rootDir>/dist/file.js
// ...and ignores anything else under <rootDir>
"modulePathIgnorePatterns": [],
// Prefer .cjs to .js to catch explicit commonjs output. Optimize for local files, which will be .js
"moduleFileExtensions": ["cjs", "js", "json", "node"],
// Enable code coverage for Jest
"collectCoverage": true,
"coverageDirectory": "<rootDir>/coverage",
"coverageReporters": ["cobertura", "html"],
// Use v8 coverage provider to avoid Babel
"coverageProvider": "v8"
}