Skip to content

Restructure validation script #2203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 131 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
2d26b76
Modify sign in component docs to show how SDKFilter should be used
NWylynko Feb 7, 2025
a390825
Expand filter to display framework section for all frameworks with a …
NWylynko Feb 7, 2025
2f91e1f
Filter Clerk Components to only frontend and full stack javascript ba…
NWylynko Feb 7, 2025
4c5c280
Update the example to use the <If /> component
NWylynko Feb 10, 2025
720d0f7
Add the javascript sdk to the sdk filter in the manifest
NWylynko Feb 10, 2025
2d5a2c6
step 1 of the build script, generating a sdk specific manifest
NWylynko Feb 14, 2025
2b21ce8
wip
NWylynko Feb 17, 2025
91b40db
use the vfile reporter
NWylynko Feb 18, 2025
95a886b
Check for markdown files that can be found in /docs/ but not manifest…
NWylynko Feb 18, 2025
c0165a4
Better error message for failure to read in markdown file references …
NWylynko Feb 18, 2025
1188436
Validate the manifest with zod
NWylynko Feb 18, 2025
d1ffa88
Start work on compiling in partials
NWylynko Feb 18, 2025
03351f6
embed partials in to the markdown files we are generating
NWylynko Feb 19, 2025
83a22c7
Merge branch 'main' into nick/docs-build-step
NWylynko Feb 19, 2025
4fab404
catch partials inside partials
NWylynko Feb 19, 2025
9d7841a
Filter out content for different sdks
NWylynko Feb 20, 2025
739613f
split up linting from generation to ensure full linting file coverage
NWylynko Feb 20, 2025
f7d1ef5
refactor for efficiency 25s down to 8s
NWylynko Feb 20, 2025
20b93ae
Merge branch 'main' into nick/docs-build-step
NWylynko Feb 20, 2025
e8455ea
Better error message for links with 404 hrefs
NWylynko Feb 20, 2025
dd8f6b8
accept jsx arrays of sdk prop
NWylynko Feb 20, 2025
cde5c64
Optimise build script by reducing times we parse the markdown
NWylynko Feb 24, 2025
a4b0241
undo changes that where for testing
NWylynko Feb 24, 2025
5b34f30
Better error message for not resolvable markdown file
NWylynko Feb 24, 2025
2a586d5
strip out .mdx extension from links to ensure they work as expected i…
NWylynko Feb 24, 2025
02865cc
Setup the groundwork for a new <SDKLink /> component and <SDKDocRedir…
NWylynko Feb 24, 2025
eeab48b
update validation comment
NWylynko Feb 24, 2025
02fa985
Don't generate out docs that are not for the specific target sdk
NWylynko Feb 24, 2025
02b0ad8
Remove default values from manifests to cut down json file size
NWylynko Feb 24, 2025
b11f7e5
Merge branch 'main' into nick/docs-build-step
NWylynko Feb 24, 2025
fbca9c7
For <SDKLink />, scope to :sdk: for the component to then swap out fo…
NWylynko Feb 24, 2025
f36ae58
Add comment
NWylynko Feb 25, 2025
66e99d9
Create a dev mode for the dev script
NWylynko Feb 25, 2025
1a60e95
(wip) improve the validation to ensure <If /> can't filter to sdk tha…
NWylynko Feb 26, 2025
224d3a0
Merge branch 'main' into nick/docs-build-step
NWylynko Feb 26, 2025
9e708b0
Fix up the types
NWylynko Feb 27, 2025
e7ec2b4
Setup testing for the build script
NWylynko Feb 27, 2025
316cdd9
fix test
NWylynko Feb 27, 2025
8964d90
Write a second test
NWylynko Feb 27, 2025
611da4b
more tests
NWylynko Feb 27, 2025
cb3f17d
more tests
NWylynko Feb 27, 2025
7163efd
More tests :)
NWylynko Feb 27, 2025
268ccb9
Merge branch 'main' into nick/docs-build-step
NWylynko Feb 28, 2025
451e260
tests :D
NWylynko Feb 28, 2025
f8bff1e
finish off the tests
NWylynko Mar 4, 2025
002239c
Cut down the build script to just do validation
NWylynko Mar 5, 2025
66c68e5
fix up types
NWylynko Mar 5, 2025
3deaae7
run prettier
NWylynko Mar 5, 2025
9993158
run prettier
NWylynko Mar 5, 2025
ce70dbd
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Mar 5, 2025
24cd69d
run prettier again
NWylynko Mar 5, 2025
04b5a9f
Merge branch 'main' into nick/docs-build-step
NWylynko Mar 5, 2025
d52b38e
run prettier again
NWylynko Mar 5, 2025
81332d6
clean up the pr a little
NWylynko Mar 5, 2025
322c333
Fail the run on warnings
NWylynko Mar 6, 2025
0727b64
review comments
jescalan Mar 6, 2025
0eb81d6
Implement improvements from code review
NWylynko Mar 6, 2025
d1ca7fc
test build script
NWylynko Mar 6, 2025
5d6d298
run formatter
NWylynko Mar 6, 2025
118d686
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Mar 6, 2025
39673a2
switch all terminology from guide over to doc
NWylynko Mar 6, 2025
488776e
fix sdk manifest filtering
NWylynko Mar 7, 2025
e49329f
<If /> component will no always have sdk prop
NWylynko Mar 7, 2025
cca0784
use __dirname and update to support base dir being ./scripts/
NWylynko Mar 7, 2025
1c1010e
add pull request trigger
NWylynko Mar 10, 2025
8bfa306
✨ prettier ✨
NWylynko Mar 10, 2025
ac002e7
update github action paths
NWylynko Mar 10, 2025
50bb6d5
Only need to do it on pushes
NWylynko Mar 10, 2025
a77115a
remove dev mode
NWylynko Mar 10, 2025
c8a75d2
omit an warning on a missing description
NWylynko Mar 10, 2025
b1e9dd4
More robust id pull for markdown file headings
NWylynko Mar 10, 2025
5b8e085
fix heading id pull
NWylynko Mar 10, 2025
55f67f4
Fix up the quick link in the terminal to files
NWylynko Mar 10, 2025
e11d4e4
add the build script (in its current validation state) as a lint step
NWylynko Mar 10, 2025
4bcaf97
✨ prettier ✨
NWylynko Mar 10, 2025
56bb206
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Mar 10, 2025
fbb46ec
Validate contents of partials
NWylynko Mar 10, 2025
18ecb6b
separate out the partials validation to give better warning messages
NWylynko Mar 10, 2025
c764355
remove unused dep
NWylynko Mar 10, 2025
e7a1425
✨ prettier ✨
NWylynko Mar 10, 2025
1744ddd
Merge branch 'main' into nick/docs-build-step
NWylynko Mar 10, 2025
9e87513
Merge branch 'nick/advanced-docs-validation-script' into nick/docs-bu…
NWylynko Mar 11, 2025
1ed5a37
fix logs
NWylynko Mar 11, 2025
c0e8c73
Remove .mdx file extension from links with a hash
NWylynko Mar 11, 2025
febb305
ensure consistent removal of .mdx from core, scoped and partials
NWylynko Mar 11, 2025
6815773
use consistent props naming
NWylynko Mar 13, 2025
409b42c
Merge branch 'main' into nick/docs-build-step
NWylynko Mar 13, 2025
75b3c11
Fix up the tests
NWylynko Mar 13, 2025
2d0e80c
Don't scope doc from manifest sdk filtering, only on frontmatter sdk …
NWylynko Mar 13, 2025
b08e760
attach the canonical link in the frontmatter for scoped pages
NWylynko Mar 14, 2025
8b605c0
include :sdk: scoping in sdk frontmatter scoped docs
NWylynko Mar 17, 2025
11e96b2
fix up build dev script
NWylynko Mar 19, 2025
c6625ae
cache the partials
NWylynko Mar 19, 2025
c5e4872
don't crash out when in dev mode on a validation error
NWylynko Mar 21, 2025
79484dd
better (and type safe) heading id grabbing
NWylynko Mar 26, 2025
9b49429
fix weird package.json styling
NWylynko Mar 26, 2025
a885115
update contributing guide to document sdk scoping
NWylynko Mar 26, 2025
2b55b30
Merge validation and build scripts
NWylynko Apr 8, 2025
b52ce20
Merge branch 'main' into nick/docs-build-step
NWylynko Apr 8, 2025
1673620
re-install @parcel/watcher
NWylynko Apr 8, 2025
4e7bd9a
Merge branch 'main' into nick/docs-build-step
NWylynko Apr 8, 2025
2a09e2a
fix up the tests
NWylynko Apr 8, 2025
8f3b1c4
use the wide template on the sdk redirect page
NWylynko Apr 9, 2025
58701f8
validate headings ids in and not in if components, and add some testing
NWylynko Apr 10, 2025
e06459f
re-organize the tests in to better grouping
NWylynko Apr 10, 2025
ca134b9
Add config to clean the dist folder, and set it to true in --dev mode
NWylynko Apr 11, 2025
2049b18
Send info up to parent process when --controlled
NWylynko Apr 11, 2025
51fbd15
Swap out links in partials if they point to an sdk scoped page
NWylynko Apr 11, 2025
786ec57
explicitly catch code wrapped links
NWylynko Apr 11, 2025
eadae1d
Fix the icons partials to be processed correctly
NWylynko Apr 12, 2025
e4fba71
Check if we should ignore the link
NWylynko Apr 15, 2025
2e70858
double pass the manifest for complete sdk filtering
NWylynko Apr 15, 2025
3673942
Merge branch 'main' into nick/docs-build-step
NWylynko Apr 22, 2025
0f17c4e
temp disable mdx parsing of typedoc, embed typedoc content in to the …
NWylynko Apr 23, 2025
6c3912a
cache and invalidate typedoc markdown on file changes
NWylynko Apr 23, 2025
2b58dcf
fallback to parsing the typedoc markdown without parsing out the mdx …
NWylynko Apr 23, 2025
3aa51c2
remove typedoc fake submodule
NWylynko Apr 23, 2025
8a08315
Merge branch 'main' into nick/docs-build-step
NWylynko Apr 23, 2025
158b28b
Extract out some re-used code in to functions
NWylynko Apr 23, 2025
622f6b6
wip break down monolithic build script
NWylynko Apr 24, 2025
413865e
Merge branch 'main' into nick/docs-build-step
NWylynko Apr 24, 2025
05dd875
split out the functionality in to modules
NWylynko Apr 24, 2025
006c480
Add comments for each file to explain its purpose
NWylynko Apr 24, 2025
5e7170d
clean up caching functionality
NWylynko Apr 25, 2025
74ba3c7
clean up script messages
NWylynko Apr 25, 2025
961b20e
refactor out more of the remark plugins to be separate
NWylynko Apr 25, 2025
7561b71
rename validators to plugins to better reflect there purpose
NWylynko Apr 25, 2025
0a8ae54
pull out frontmatter extraction to its own plugin
NWylynko Apr 25, 2025
6a1cf8d
Remove all generation aspects of the script
NWylynko Apr 25, 2025
34c6fc7
strip down pr
NWylynko Apr 25, 2025
9aee6e0
remove unused code
NWylynko Apr 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ type LinkItem = {
* Set to "_blank" to open link in a new tab
*/
target?: '_blank'

/**
* Limit this page to only show when the user has one of the specified sdks active
*
* @example ['nextjs', 'react']
*/
sdk?: string[]
}
type SubNavItem = {
/**
Expand Down Expand Up @@ -201,6 +208,13 @@ type SubNavItem = {
* @default false
*/
collapse?: boolean

/**
* Limit this group to only show when the user has one of the specified sdks active
*
* @example ['nextjs', 'react']
*/
sdk?: string[]
}
```

Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"remark-mdx": "^3.0.1",
"tsx": "^4.19.2",
"typescript": "^5.7.3",
"unist-util-filter": "^5.0.1",
"unist-util-map": "^4.0.0",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1",
Expand Down
Loading