Skip to content

Commit

Permalink
Merge branch 'main' into update-jest-29.3.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	common/config/rush/pnpm-lock.yaml
#	common/config/rush/repo-state.json
  • Loading branch information
iclanton committed Jan 30, 2023
2 parents ea5750f + be9637e commit 42a2b3d
Show file tree
Hide file tree
Showing 502 changed files with 10,534 additions and 3,224 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/build-tests/rush-project-change-analyzer-test](./build-tests/rush-project-change-analyzer-test/) | This is an example project that uses rush-lib's ProjectChangeAnalyzer to |
| [/build-tests/set-webpack-public-path-plugin-webpack4-test](./build-tests/set-webpack-public-path-plugin-webpack4-test/) | Building this project tests the set-webpack-public-path-plugin using Webpack 4 |
| [/build-tests/ts-command-line-test](./build-tests/ts-command-line-test/) | Building this project is a regression test for ts-command-line |
| [/libraries/rush-themed-ui](./libraries/rush-themed-ui/) | Rush Component Library: a set of themed components for rush projects |
| [/libraries/rushell](./libraries/rushell/) | Execute shell commands using a consistent syntax on every platform |
| [/repo-scripts/doc-plugin-rush-stack](./repo-scripts/doc-plugin-rush-stack/) | API Documenter plugin used with the rushstack.io website |
| [/repo-scripts/generate-api-docs](./repo-scripts/generate-api-docs/) | Used to generate API docs for the rushstack.io website |
Expand Down
65 changes: 65 additions & 0 deletions apps/api-documenter/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,71 @@
{
"name": "@microsoft/api-documenter",
"entries": [
{
"version": "7.21.0",
"tag": "@microsoft/api-documenter_v7.21.0",
"date": "Sun, 29 Jan 2023 20:09:58 GMT",
"comments": {
"minor": [
{
"comment": "Fix an issue where `<b>`/`<i>` tags sometimes interfered with parsing of other Markdown on the same line; italics and boldface are now emitted using `*` and `_`"
}
]
}
},
{
"version": "7.20.1",
"tag": "@microsoft/api-documenter_v7.20.1",
"date": "Thu, 26 Jan 2023 02:55:10 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.49.3`"
},
{
"comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.14`"
}
]
}
},
{
"version": "7.20.0",
"tag": "@microsoft/api-documenter_v7.20.0",
"date": "Wed, 25 Jan 2023 07:26:55 GMT",
"comments": {
"minor": [
{
"comment": "Display the 'abstract' modifier for classes and members (GitHub #3661)"
}
],
"dependency": [
{
"comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.0`"
},
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.49.2`"
},
{
"comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.13`"
}
]
}
},
{
"version": "7.19.28",
"tag": "@microsoft/api-documenter_v7.19.28",
"date": "Wed, 18 Jan 2023 22:44:12 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`"
},
{
"comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`"
}
]
}
},
{
"version": "7.19.27",
"tag": "@microsoft/api-documenter_v7.19.27",
Expand Down
26 changes: 25 additions & 1 deletion apps/api-documenter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# Change Log - @microsoft/api-documenter

This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified.
This log was last generated on Sun, 29 Jan 2023 20:09:58 GMT and should not be manually modified.

## 7.21.0
Sun, 29 Jan 2023 20:09:58 GMT

### Minor changes

- Fix an issue where `<b>`/`<i>` tags sometimes interfered with parsing of other Markdown on the same line; italics and boldface are now emitted using `*` and `_`

## 7.20.1
Thu, 26 Jan 2023 02:55:10 GMT

_Version update only_

## 7.20.0
Wed, 25 Jan 2023 07:26:55 GMT

### Minor changes

- Display the 'abstract' modifier for classes and members (GitHub #3661)

## 7.19.28
Wed, 18 Jan 2023 22:44:12 GMT

_Version update only_

## 7.19.27
Tue, 20 Dec 2022 01:18:22 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.19.27",
"version": "7.21.0",
"description": "Read JSON files from api-extractor, generate documentation pages",
"repository": {
"type": "git",
Expand Down
41 changes: 34 additions & 7 deletions apps/api-documenter/src/documenters/MarkdownDocumenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
ApiPropertyItem,
ApiInterface,
Excerpt,
ApiAbstractMixin,
ApiParameterListMixin,
ApiReturnTypeMixin,
ApiDeclaredItem,
Expand Down Expand Up @@ -502,6 +503,11 @@ export class MarkdownDocumenter {
private _writePackageOrNamespaceTables(output: DocSection, apiContainer: ApiPackage | ApiNamespace): void {
const configuration: TSDocConfiguration = this._tsdocConfiguration;

const abstractClassesTable: DocTable = new DocTable({
configuration,
headerTitles: ['Abstract Class', 'Description']
});

const classesTable: DocTable = new DocTable({
configuration,
headerTitles: ['Class', 'Description']
Expand Down Expand Up @@ -550,7 +556,11 @@ export class MarkdownDocumenter {

switch (apiMember.kind) {
case ApiItemKind.Class:
classesTable.addRow(row);
if (ApiAbstractMixin.isBaseClassOf(apiMember) && apiMember.isAbstract) {
abstractClassesTable.addRow(row);
} else {
classesTable.addRow(row);
}
this._writeApiItemPage(apiMember);
break;

Expand Down Expand Up @@ -591,6 +601,11 @@ export class MarkdownDocumenter {
output.appendNode(classesTable);
}

if (abstractClassesTable.rows.length > 0) {
output.appendNode(new DocHeading({ configuration, title: 'Abstract Classes' }));
output.appendNode(abstractClassesTable);
}

if (enumerationsTable.rows.length > 0) {
output.appendNode(new DocHeading({ configuration, title: 'Enumerations' }));
output.appendNode(enumerationsTable);
Expand Down Expand Up @@ -1033,6 +1048,10 @@ export class MarkdownDocumenter {

const section: DocSection = new DocSection({ configuration });

// Output modifiers in syntactically correct order: first access modifier (here: `protected`), then
// `static` or `abstract` (no member can be both, so the order between the two of them does not matter),
// last `readonly`. If `override` was supported, it would go directly before `readonly`.

if (ApiProtectedMixin.isBaseClassOf(apiItem)) {
if (apiItem.isProtected) {
section.appendNode(
Expand All @@ -1041,18 +1060,26 @@ export class MarkdownDocumenter {
}
}

if (ApiReadonlyMixin.isBaseClassOf(apiItem)) {
if (apiItem.isReadonly) {
if (ApiStaticMixin.isBaseClassOf(apiItem)) {
if (apiItem.isStatic) {
section.appendNode(
new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'readonly' })])
new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'static' })])
);
}
}

if (ApiStaticMixin.isBaseClassOf(apiItem)) {
if (apiItem.isStatic) {
if (ApiAbstractMixin.isBaseClassOf(apiItem)) {
if (apiItem.isAbstract) {
section.appendNode(
new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'static' })])
new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'abstract' })])
);
}
}

if (ApiReadonlyMixin.isBaseClassOf(apiItem)) {
if (apiItem.isReadonly) {
section.appendNode(
new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'readonly' })])
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions apps/api-documenter/src/markdown/MarkdownEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,19 @@ export class MarkdownEmitter {
}

if (context.boldRequested) {
writer.write('<b>');
writer.write('**');
}
if (context.italicRequested) {
writer.write('<i>');
writer.write('_');
}

writer.write(this.getEscapedText(middle));

if (context.italicRequested) {
writer.write('</i>');
writer.write('_');
}
if (context.boldRequested) {
writer.write('</b>');
writer.write('**');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ test('render Markdown from TSDoc', () => {
new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: 'Cell 1' })])
]),
new DocTableCell({ configuration }, [
new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: 'Cell 2' })])
new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: 'Cell 2' })]),
new DocParagraph({ configuration }, [
new DocEmphasisSpan({ configuration, bold: true }, [
new DocPlainText({ configuration, text: 'bold text' })
])
])
])
])
]
Expand All @@ -176,5 +181,6 @@ test('render Markdown from TSDoc', () => {
}
});

expect(stringBuilder).toMatchSnapshot();
expect(stringBuilder.toString()).toMatchSnapshot();
console.log(stringBuilder.toString());
});
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`render Markdown from TSDoc 1`] = `
StringBuilder {
"_chunks": Array [
"
"
## Simple bold test
This is a <b>bold</b> word.
This is a **bold** word.
## All whitespace bold
## Newline bold
<b>line 1</b> <b>line 2</b>
**line 1** **line 2**
## Newline bold with spaces
<b>line 1</b> <b>line 2</b> <b>line 3</b>
**line 1** **line 2** **line 3**
## Adjacent bold regions
<b>one</b><b>two</b> <b>three</b> <b>four</b>non-bold<!-- --><b>five</b>
**one**<!-- -->**two** **three** **four**<!-- -->non-bold<!-- -->**five**
## Adjacent to other characters
[a link](./index.md)<!-- --><b>bold</b>non-boldmore-non-bold
[a link](./index.md)<!-- -->**bold**<!-- -->non-boldmore-non-bold
## Unknown block tag
<b>bold</b>non-boldmore-non-bold
**bold**<!-- -->non-boldmore-non-bold
## Bad characters
<b>\\\\*one\\\\*two\\\\*</b><b>three\\\\*four</b>
**\\\\*one\\\\*two\\\\***<!-- -->**three\\\\*four**
## Characters that should be escaped
Expand All @@ -54,9 +52,7 @@ HTML escape: &amp;quot;
| Header 1 | Header 2 |
| --- | --- |
| Cell 1 | Cell 2 |
| Cell 1 | <p>Cell 2</p><p>**bold text**</p> |
",
],
}
"
`;
29 changes: 29 additions & 0 deletions apps/api-extractor/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
{
"name": "@microsoft/api-extractor",
"entries": [
{
"version": "7.34.0",
"tag": "@microsoft/api-extractor_v7.34.0",
"date": "Wed, 25 Jan 2023 07:26:55 GMT",
"comments": {
"minor": [
{
"comment": "Add new .api.json field `isAbstract` to track `abstract` modifier in ApiClass, ApiMethod, and ApiProperty via ApiAbstractMixin (GitHub #3661)"
}
],
"dependency": [
{
"comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.0`"
}
]
}
},
{
"version": "7.33.8",
"tag": "@microsoft/api-extractor_v7.33.8",
"date": "Wed, 18 Jan 2023 22:44:12 GMT",
"comments": {
"patch": [
{
"comment": "Use ts.getCheckFlags to fix TS 5.0"
}
]
}
},
{
"version": "7.33.7",
"tag": "@microsoft/api-extractor_v7.33.7",
Expand Down
16 changes: 15 additions & 1 deletion apps/api-extractor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Change Log - @microsoft/api-extractor

This log was last generated on Fri, 09 Dec 2022 16:18:28 GMT and should not be manually modified.
This log was last generated on Wed, 25 Jan 2023 07:26:55 GMT and should not be manually modified.

## 7.34.0
Wed, 25 Jan 2023 07:26:55 GMT

### Minor changes

- Add new .api.json field `isAbstract` to track `abstract` modifier in ApiClass, ApiMethod, and ApiProperty via ApiAbstractMixin (GitHub #3661)

## 7.33.8
Wed, 18 Jan 2023 22:44:12 GMT

### Patches

- Use ts.getCheckFlags to fix TS 5.0

## 7.33.7
Fri, 09 Dec 2022 16:18:28 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 build -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 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
6 changes: 3 additions & 3 deletions 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.33.7",
"version": "7.34.0",
"description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",
"keywords": [
"typescript",
Expand Down Expand Up @@ -52,8 +52,8 @@
},
"devDependencies": {
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "0.48.0",
"@rushstack/heft-node-rig": "1.11.0",
"@rushstack/heft": "0.49.3",
"@rushstack/heft-node-rig": "1.11.14",
"@types/heft-jest": "1.0.1",
"@types/lodash": "4.14.116",
"@types/node": "12.20.24",
Expand Down
Loading

0 comments on commit 42a2b3d

Please sign in to comment.