-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4434 from Josmithr/regexp-bundledPackages
api-extractor: Add glob support in `bundledPackages`
- Loading branch information
Showing
42 changed files
with
752 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This project's outputs are tracked to surface changes to API Extractor rollups during PRs | ||
!dist | ||
dist/* | ||
!dist/*.d.ts |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const fsx = require('fs-extra'); | ||
const child_process = require('child_process'); | ||
const path = require('path'); | ||
const process = require('process'); | ||
|
||
function executeCommand(command) { | ||
console.log('---> ' + command); | ||
child_process.execSync(command, { stdio: 'inherit' }); | ||
} | ||
|
||
// Clean the old build outputs | ||
console.log(`==> Starting build.js for ${path.basename(process.cwd())}`); | ||
fsx.emptyDirSync('dist'); | ||
fsx.emptyDirSync('lib'); | ||
fsx.emptyDirSync('temp'); | ||
|
||
// Run the TypeScript compiler | ||
executeCommand('node node_modules/typescript/lib/tsc'); | ||
|
||
// Run the API Extractor command-line | ||
if (process.argv.indexOf('--production') >= 0) { | ||
executeCommand('node node_modules/@microsoft/api-extractor/lib/start run'); | ||
} else { | ||
executeCommand('node node_modules/@microsoft/api-extractor/lib/start run --local'); | ||
} | ||
|
||
console.log(`==> Finished build.js for ${path.basename(process.cwd())}`); |
19 changes: 19 additions & 0 deletions
19
build-tests/api-extractor-lib4-test/config/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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
|
||
"mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts", | ||
|
||
"apiReport": { | ||
"enabled": true | ||
}, | ||
|
||
"docModel": { | ||
"enabled": true | ||
}, | ||
|
||
"dtsRollup": { | ||
"enabled": true | ||
}, | ||
|
||
"testMode": true | ||
} |
10 changes: 10 additions & 0 deletions
10
build-tests/api-extractor-lib4-test/config/rush-project.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", | ||
|
||
"operationSettings": [ | ||
{ | ||
"operationName": "_phase:build", | ||
"outputFolderNames": ["lib"] | ||
} | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
build-tests/api-extractor-lib4-test/dist/api-extractor-lib4-test.d.ts
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* api-extractor-lib4-test | ||
* | ||
* @remarks | ||
* This library is consumed by api-extractor-scenarios. | ||
* | ||
* @packageDocumentation | ||
*/ | ||
|
||
/** @public */ | ||
export declare enum Lib4Enum { | ||
Foo = "Foo", | ||
Bar = "Bar", | ||
Baz = "Baz" | ||
} | ||
|
||
export { } |
17 changes: 17 additions & 0 deletions
17
build-tests/api-extractor-lib4-test/etc/api-extractor-lib4-test.api.md
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## API Report File for "api-extractor-lib4-test" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
// @public (undocumented) | ||
export enum Lib4Enum { | ||
// (undocumented) | ||
Bar = "Bar", | ||
// (undocumented) | ||
Baz = "Baz", | ||
// (undocumented) | ||
Foo = "Foo" | ||
} | ||
|
||
``` |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "api-extractor-lib4-test", | ||
"description": "Building this project is a regression test for api-extractor", | ||
"version": "1.0.0", | ||
"private": true, | ||
"main": "lib/index.js", | ||
"typings": "dist/api-extractor-lib3-test.d.ts", | ||
"scripts": { | ||
"build": "node build.js", | ||
"_phase:build": "node build.js" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "workspace:*", | ||
"@types/jest": "29.2.5", | ||
"@types/node": "18.17.15", | ||
"fs-extra": "~7.0.1", | ||
"typescript": "~5.3.3" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. | ||
// See LICENSE in the project root for license information. | ||
|
||
/** | ||
* api-extractor-lib4-test | ||
* | ||
* @remarks | ||
* This library is consumed by api-extractor-scenarios. | ||
* | ||
* @packageDocumentation | ||
*/ | ||
|
||
/** @public */ | ||
export enum Lib4Enum { | ||
Foo = 'Foo', | ||
Bar = 'Bar', | ||
Baz = 'Baz' | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "commonjs", | ||
"declaration": true, | ||
"sourceMap": true, | ||
"declarationMap": true, | ||
"experimentalDecorators": true, | ||
"strictNullChecks": true, | ||
"types": ["node", "jest"], | ||
"lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], | ||
"outDir": "lib" | ||
}, | ||
"include": ["src/**/*.ts", "typings/tsd.d.ts"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This project's outputs are tracked to surface changes to API Extractor rollups during PRs | ||
!dist | ||
dist/* | ||
!dist/*.d.ts |
Oops, something went wrong.