Skip to content

Commit 71d70d4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into tabs/use-render-element
2 parents 280a0ea + 02ff118 commit 71d70d4

File tree

3 files changed

+21
-51
lines changed

3 files changed

+21
-51
lines changed

.circleci/config.yml

+10-48
Original file line numberDiff line numberDiff line change
@@ -107,30 +107,6 @@ commands:
107107
command: git restore .
108108

109109
jobs:
110-
checkout:
111-
<<: *default-job
112-
steps:
113-
- checkout
114-
- install_js:
115-
react-version: << parameters.react-version >>
116-
- when:
117-
# Install can be "dirty" when running with non-default versions of React
118-
condition:
119-
equal: [<< parameters.react-version >>, stable]
120-
steps:
121-
- run:
122-
name: Should not have any git not staged
123-
command: git add -A && git diff --exit-code --staged
124-
- run:
125-
name: '`pnpm dedupe` was run?'
126-
command: |
127-
# #default-branch-switch
128-
if [[ $(git diff --name-status master | grep -E 'pnpm-workspace\.yaml|pnpm-lock.yaml|package\.json') == "" ]];
129-
then
130-
echo "No changes to dependencies detected. Skipping..."
131-
else
132-
pnpm dedupe --check
133-
fi
134110
test_unit:
135111
<<: *default-job
136112
steps:
@@ -180,6 +156,16 @@ jobs:
180156
- checkout
181157
- install_js:
182158
react-version: << parameters.react-version >>
159+
- run:
160+
name: '`pnpm dedupe` was run?'
161+
command: |
162+
# #default-branch-switch
163+
if [[ $(git diff --name-status master | grep -E 'pnpm-workspace\.yaml|pnpm-lock.yaml|package\.json') == "" ]];
164+
then
165+
echo "No changes to dependencies detected. Skipping..."
166+
else
167+
pnpm dedupe --check
168+
fi
183169
- run:
184170
name: Generate the documentation
185171
command: pnpm docs:api
@@ -338,54 +324,30 @@ workflows:
338324
when:
339325
equal: [pipeline, << pipeline.parameters.workflow >>]
340326
jobs:
341-
- checkout:
342-
<<: *default-context
343-
name: 'Checkout'
344327
- test_unit:
345328
<<: *default-context
346329
name: 'JSDOM tests'
347-
requires:
348-
- Checkout
349330
- test_lint:
350331
<<: *default-context
351332
name: 'Linting'
352-
requires:
353-
- Checkout
354333
- test_static:
355334
<<: *default-context
356335
name: 'Generated files verification'
357-
requires:
358-
- Checkout
359336
- test_types:
360337
<<: *default-context
361338
name: 'Typechecking'
362-
requires:
363-
- Checkout
364339
- test_browser:
365340
<<: *default-context
366341
name: 'Browser tests'
367-
requires:
368-
- Checkout
369342
- test_regressions:
370343
<<: *default-context
371344
name: 'Regression tests'
372-
requires:
373-
- Checkout
374345
- test_e2e:
375346
<<: *default-context
376347
name: 'E2E tests'
377-
requires:
378-
- Checkout
379-
# - test_bundle_size_monitor:
380-
# <<: *default-context
381-
# name: 'Bundle size monitor'
382-
# requires:
383-
# - checkout
384348
- test_package:
385349
<<: *default-context
386350
name: 'Package verification'
387-
requires:
388-
- Checkout
389351
react-18:
390352
when:
391353
equal: [pipeline, << pipeline.parameters.workflow >>]

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
- run: pnpm validate-declarations
3838
- name: Publish to pkg-pr-new
3939
if: matrix.os == 'ubuntu-latest'
40-
run: pnpm dlx pkg-pr-new publish './packages/react' --compact --pnpm
40+
run: pnpm dlx pkg-pr-new publish './packages/react' --compact --pnpm --peerDeps

scripts/api-docs-builder/src/formatter.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function formatProperties(props: rae.PropertyNode[]) {
66

77
for (const prop of props) {
88
result[prop.name] = {
9-
type: formatType(prop.type, prop.optional),
9+
type: formatType(prop.type, prop.optional, prop.documentation?.tags),
1010
default: prop.documentation?.defaultValue,
1111
required: !prop.optional || undefined,
1212
description: prop.documentation?.description,
@@ -21,7 +21,7 @@ export function formatParameters(params: rae.Parameter[]) {
2121

2222
for (const param of params) {
2323
result[param.name] = {
24-
type: formatType(param.type, param.optional, true),
24+
type: formatType(param.type, param.optional, param.documentation?.tags, true),
2525
default: param.defaultValue,
2626
optional: param.optional || undefined,
2727
description: param.documentation?.description,
@@ -46,8 +46,16 @@ export function formatEnum(enumNode: rae.EnumNode) {
4646
export function formatType(
4747
type: rae.TypeNode,
4848
removeUndefined: boolean,
49+
jsdocTags: rae.DocumentationTag[] | undefined = undefined,
4950
expandObjects: boolean = false,
5051
): string {
52+
const typeTag = jsdocTags?.find((tag) => tag.name === 'type');
53+
const typeValue = typeTag?.value;
54+
55+
if (typeValue) {
56+
return typeValue;
57+
}
58+
5159
if (type instanceof rae.ReferenceNode) {
5260
if (/^ReactElement(<.*>)?/.test(type.name)) {
5361
return 'ReactElement';

0 commit comments

Comments
 (0)