Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/main' into octogonz/ae-t…
Browse files Browse the repository at this point in the history
…s-5.3.0-beta

# Conflicts:
#	common/config/rush/pnpm-lock.yaml
#	common/config/rush/repo-state.json
  • Loading branch information
octogonz committed Dec 19, 2023
2 parents 3318640 + 235c79b commit 9eb95ed
Show file tree
Hide file tree
Showing 298 changed files with 11,694 additions and 928 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ jobs:
strategy:
matrix:
include:
- NodeVersion: 16
- NodeVersion: 16.20.x
NodeVersionDisplayName: 16
OS: ubuntu-latest
- NodeVersion: 18
- NodeVersion: 18.18.x
NodeVersionDisplayName: 18
OS: ubuntu-latest
- NodeVersion: 20
- NodeVersion: 20.9.x
NodeVersionDisplayName: 20
OS: ubuntu-latest
- NodeVersion: 18
- NodeVersion: 18.18.x
NodeVersionDisplayName: 18
OS: windows-latest
name: Node.js v${{ matrix.NodeVersion }} (${{ matrix.OS }})
name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }})
runs-on: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ dist
dist-storybook
*.scss.ts
*.sass.ts
*.tsbuildinfo
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/apps/rundown](./apps/rundown/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frundown.svg)](https://badge.fury.io/js/%40rushstack%2Frundown) | [changelog](./apps/rundown/CHANGELOG.md) | [@rushstack/rundown](https://www.npmjs.com/package/@rushstack/rundown) |
| [/apps/rush](./apps/rush/) | [![npm version](https://badge.fury.io/js/%40microsoft%2Frush.svg)](https://badge.fury.io/js/%40microsoft%2Frush) | [changelog](./apps/rush/CHANGELOG.md) | [@microsoft/rush](https://www.npmjs.com/package/@microsoft/rush) |
| [/apps/trace-import](./apps/trace-import/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Ftrace-import.svg)](https://badge.fury.io/js/%40rushstack%2Ftrace-import) | [changelog](./apps/trace-import/CHANGELOG.md) | [@rushstack/trace-import](https://www.npmjs.com/package/@rushstack/trace-import) |
| [/eslint/eslint-bulk](./eslint/eslint-bulk/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Feslint-bulk.svg)](https://badge.fury.io/js/%40rushstack%2Feslint-bulk) | [changelog](./eslint/eslint-bulk/CHANGELOG.md) | [@rushstack/eslint-bulk](https://www.npmjs.com/package/@rushstack/eslint-bulk) |
| [/eslint/eslint-config](./eslint/eslint-config/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Feslint-config.svg)](https://badge.fury.io/js/%40rushstack%2Feslint-config) | [changelog](./eslint/eslint-config/CHANGELOG.md) | [@rushstack/eslint-config](https://www.npmjs.com/package/@rushstack/eslint-config) |
| [/eslint/eslint-patch](./eslint/eslint-patch/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Feslint-patch.svg)](https://badge.fury.io/js/%40rushstack%2Feslint-patch) | [changelog](./eslint/eslint-patch/CHANGELOG.md) | [@rushstack/eslint-patch](https://www.npmjs.com/package/@rushstack/eslint-patch) |
| [/eslint/eslint-plugin](./eslint/eslint-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Feslint-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Feslint-plugin) | [changelog](./eslint/eslint-plugin/CHANGELOG.md) | [@rushstack/eslint-plugin](https://www.npmjs.com/package/@rushstack/eslint-plugin) |
Expand Down Expand Up @@ -129,6 +130,8 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/build-tests-samples/packlets-tutorial](./build-tests-samples/packlets-tutorial/) | (Copy of sample project) Building this project is a regression test for @rushstack/eslint-plugin-packlets |
| [/build-tests/api-documenter-scenarios](./build-tests/api-documenter-scenarios/) | Building this project is a regression test for api-documenter |
| [/build-tests/api-documenter-test](./build-tests/api-documenter-test/) | Building this project is a regression test for api-documenter |
| [/build-tests/api-extractor-d-cts-test](./build-tests/api-extractor-d-cts-test/) | Building this project is a regression test for api-extractor |
| [/build-tests/api-extractor-d-mts-test](./build-tests/api-extractor-d-mts-test/) | Building this project is a regression test for api-extractor |
| [/build-tests/api-extractor-lib1-test](./build-tests/api-extractor-lib1-test/) | Building this project is a regression test for api-extractor |
| [/build-tests/api-extractor-lib2-test](./build-tests/api-extractor-lib2-test/) | Building this project is a regression test for api-extractor |
| [/build-tests/api-extractor-lib3-test](./build-tests/api-extractor-lib3-test/) | Building this project is a regression test for api-extractor |
Expand All @@ -141,6 +144,7 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/build-tests/eslint-7-7-test](./build-tests/eslint-7-7-test/) | This project contains a build test to validate ESLint 7.7.0 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
| [/build-tests/eslint-7-test](./build-tests/eslint-7-test/) | This project contains a build test to validate ESLint 7 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
| [/build-tests/eslint-8-test](./build-tests/eslint-8-test/) | This project contains a build test to validate ESLint 8 compatibility with the latest version of @rushstack/eslint-config (and by extension, the ESLint plugin) |
| [/build-tests/eslint-bulk-suppressions-test](./build-tests/eslint-bulk-suppressions-test/) | Sample code to test eslint bulk suppressions |
| [/build-tests/hashed-folder-copy-plugin-webpack5-test](./build-tests/hashed-folder-copy-plugin-webpack5-test/) | Building this project exercises @rushstack/hashed-folder-copy-plugin with Webpack 5. NOTE - THIS TEST IS CURRENTLY EXPECTED TO BE BROKEN |
| [/build-tests/heft-copy-files-test](./build-tests/heft-copy-files-test/) | Building this project tests copying files with Heft |
| [/build-tests/heft-example-plugin-01](./build-tests/heft-example-plugin-01/) | This is an example heft plugin that exposes hooks for other plugins |
Expand Down
77 changes: 77 additions & 0 deletions apps/api-documenter/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,83 @@
{
"name": "@microsoft/api-documenter",
"entries": [
{
"version": "7.23.14",
"tag": "@microsoft/api-documenter_v7.23.14",
"date": "Thu, 07 Dec 2023 03:44:13 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.28.3`"
},
{
"comment": "Updating dependency \"@rushstack/node-core-library\" to `3.62.0`"
},
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.63.4`"
}
]
}
},
{
"version": "7.23.13",
"tag": "@microsoft/api-documenter_v7.23.13",
"date": "Tue, 05 Dec 2023 01:10:16 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.63.3`"
}
]
}
},
{
"version": "7.23.12",
"tag": "@microsoft/api-documenter_v7.23.12",
"date": "Fri, 10 Nov 2023 18:02:04 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.63.2`"
}
]
}
},
{
"version": "7.23.11",
"tag": "@microsoft/api-documenter_v7.23.11",
"date": "Wed, 01 Nov 2023 23:11:35 GMT",
"comments": {
"patch": [
{
"comment": "Fix line endings in published package."
}
],
"dependency": [
{
"comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.17.1`"
},
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.63.1`"
}
]
}
},
{
"version": "7.23.10",
"tag": "@microsoft/api-documenter_v7.23.10",
"date": "Mon, 30 Oct 2023 23:36:37 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.17.0`"
},
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.63.0`"
}
]
}
},
{
"version": "7.23.9",
"tag": "@microsoft/api-documenter_v7.23.9",
Expand Down
29 changes: 28 additions & 1 deletion apps/api-documenter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
# Change Log - @microsoft/api-documenter

This log was last generated on Sun, 01 Oct 2023 02:56:29 GMT and should not be manually modified.
This log was last generated on Thu, 07 Dec 2023 03:44:13 GMT and should not be manually modified.

## 7.23.14
Thu, 07 Dec 2023 03:44:13 GMT

_Version update only_

## 7.23.13
Tue, 05 Dec 2023 01:10:16 GMT

_Version update only_

## 7.23.12
Fri, 10 Nov 2023 18:02:04 GMT

_Version update only_

## 7.23.11
Wed, 01 Nov 2023 23:11:35 GMT

### Patches

- Fix line endings in published package.

## 7.23.10
Mon, 30 Oct 2023 23:36:37 GMT

_Version update only_

## 7.23.9
Sun, 01 Oct 2023 02:56:29 GMT
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/api-documenter",
"version": "7.23.9",
"version": "7.23.14",
"description": "Read JSON files from api-extractor, generate documentation pages",
"repository": {
"type": "git",
Expand Down
68 changes: 68 additions & 0 deletions apps/api-extractor/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,74 @@
{
"name": "@microsoft/api-extractor",
"entries": [
{
"version": "7.38.5",
"tag": "@microsoft/api-extractor_v7.38.5",
"date": "Thu, 07 Dec 2023 03:44:13 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.28.3`"
},
{
"comment": "Updating dependency \"@rushstack/node-core-library\" to `3.62.0`"
}
]
}
},
{
"version": "7.38.4",
"tag": "@microsoft/api-extractor_v7.38.4",
"date": "Tue, 05 Dec 2023 01:10:16 GMT",
"comments": {
"patch": [
{
"comment": "Don't export trimmed namespace members during rollup (#2791)"
}
]
}
},
{
"version": "7.38.3",
"tag": "@microsoft/api-extractor_v7.38.3",
"date": "Fri, 10 Nov 2023 18:02:04 GMT",
"comments": {
"patch": [
{
"comment": "Fix an issue where \"ae-undocumented\" was incorrectly reported for private members"
}
]
}
},
{
"version": "7.38.2",
"tag": "@microsoft/api-extractor_v7.38.2",
"date": "Wed, 01 Nov 2023 23:11:35 GMT",
"comments": {
"patch": [
{
"comment": "Fix line endings in published package."
}
],
"dependency": [
{
"comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.17.1`"
}
]
}
},
{
"version": "7.38.1",
"tag": "@microsoft/api-extractor_v7.38.1",
"date": "Mon, 30 Oct 2023 23:36:38 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.17.0`"
}
]
}
},
{
"version": "7.38.0",
"tag": "@microsoft/api-extractor_v7.38.0",
Expand Down
33 changes: 32 additions & 1 deletion apps/api-extractor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Change Log - @microsoft/api-extractor

This log was last generated on Sun, 01 Oct 2023 02:56:29 GMT and should not be manually modified.
This log was last generated on Thu, 07 Dec 2023 03:44:13 GMT and should not be manually modified.

## 7.38.5
Thu, 07 Dec 2023 03:44:13 GMT

_Version update only_

## 7.38.4
Tue, 05 Dec 2023 01:10:16 GMT

### Patches

- Don't export trimmed namespace members during rollup (#2791)

## 7.38.3
Fri, 10 Nov 2023 18:02:04 GMT

### Patches

- Fix an issue where "ae-undocumented" was incorrectly reported for private members

## 7.38.2
Wed, 01 Nov 2023 23:11:35 GMT

### Patches

- Fix line endings in published package.

## 7.38.1
Mon, 30 Oct 2023 23:36:38 GMT

_Version update only_

## 7.38.0
Sun, 01 Oct 2023 02:56:29 GMT
Expand Down
2 changes: 1 addition & 1 deletion apps/api-extractor/build-tests.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@ECHO OFF
@SETLOCAL
rush test -t api-extractor-lib1-test -t api-extractor-lib2-test -t api-extractor-lib3-test -t api-extractor-scenarios -t api-extractor-test-01 -t api-extractor-test-02 -t api-extractor-test-03 -t api-extractor-test-04 -t api-documenter-test
rush test -t tag:api-extractor-tests
2 changes: 1 addition & 1 deletion apps/api-extractor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/api-extractor",
"version": "7.38.0",
"version": "7.38.5",
"description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",
"keywords": [
"typescript",
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/api/ExtractorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export class ExtractorConfig {
path.join(__dirname, '../schemas/api-extractor-defaults.json')
);

/** Match all three flavors for type declaration files (.d.ts, .d.mts, .d.cts) */
private static readonly _declarationFileExtensionRegExp: RegExp = /\.d\.(c|m)?ts$/i;

/** {@inheritDoc IConfigFile.projectFolder} */
Expand Down
42 changes: 26 additions & 16 deletions apps/api-extractor/src/generators/ApiReportGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export class ApiReportGenerator {
): void {
// Should we process this declaration at all?
// eslint-disable-next-line no-bitwise
if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {
if (!ApiReportGenerator._shouldIncludeInReport(astDeclaration)) {
span.modification.skipAll();
return;
}
Expand Down Expand Up @@ -402,23 +402,27 @@ export class ApiReportGenerator {
astDeclaration
);

if (sortChildren) {
span.modification.sortChildren = true;
child.modification.sortKey = Collector.getSortKeyIgnoringUnderscore(
childAstDeclaration.astSymbol.localName
);
}
if (ApiReportGenerator._shouldIncludeInReport(childAstDeclaration)) {
if (sortChildren) {
span.modification.sortChildren = true;
child.modification.sortKey = Collector.getSortKeyIgnoringUnderscore(
childAstDeclaration.astSymbol.localName
);
}

if (!insideTypeLiteral) {
const messagesToReport: ExtractorMessage[] =
collector.messageRouter.fetchAssociatedMessagesForReviewFile(childAstDeclaration);
const aedocSynopsis: string = ApiReportGenerator._getAedocSynopsis(
collector,
childAstDeclaration,
messagesToReport
);
if (!insideTypeLiteral) {
const messagesToReport: ExtractorMessage[] =
collector.messageRouter.fetchAssociatedMessagesForReviewFile(childAstDeclaration);

child.modification.prefix = aedocSynopsis + child.modification.prefix;
// NOTE: This generates ae-undocumented messages as a side effect
const aedocSynopsis: string = ApiReportGenerator._getAedocSynopsis(
collector,
childAstDeclaration,
messagesToReport
);

child.modification.prefix = aedocSynopsis + child.modification.prefix;
}
}
}

Expand All @@ -427,6 +431,12 @@ export class ApiReportGenerator {
}
}

private static _shouldIncludeInReport(astDeclaration: AstDeclaration): boolean {
// Private declarations are not included in the API report
// eslint-disable-next-line no-bitwise
return (astDeclaration.modifierFlags & ts.ModifierFlags.Private) === 0;
}

/**
* For declarations marked as `@preapproved`, this is used instead of _modifySpan().
*/
Expand Down
11 changes: 11 additions & 0 deletions apps/api-extractor/src/generators/DtsRollupGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,17 @@ export class DtsRollupGenerator {
);
}

// If the entity's declaration won't be included, then neither should the namespace export it
// This fixes the issue encountered here: https://github.com/microsoft/rushstack/issues/2791
const exportedSymbolMetadata: SymbolMetadata | undefined =
collector.tryFetchMetadataForAstEntity(exportedEntity);
const exportedMaxEffectiveReleaseTag: ReleaseTag = exportedSymbolMetadata
? exportedSymbolMetadata.maxEffectiveReleaseTag
: ReleaseTag.None;
if (!this._shouldIncludeReleaseTag(exportedMaxEffectiveReleaseTag, dtsKind)) {
continue;
}

if (collectorEntity.nameForEmit === exportedName) {
exportClauses.push(collectorEntity.nameForEmit);
} else {
Expand Down
Loading

0 comments on commit 9eb95ed

Please sign in to comment.