Skip to content
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

Advanced docs validation script #2075

Merged
merged 85 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 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
ce70dbd
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Mar 5, 2025
24cd69d
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
5cc8dea
Update scripts/build-docs.ts
NWylynko Mar 12, 2025
053e98e
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Mar 27, 2025
e5aefbb
fix up types
NWylynko Mar 27, 2025
cdf169a
Add ability to ignore warnings on a per file basis
NWylynko Apr 1, 2025
f4b0e91
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Apr 1, 2025
76d488e
merge in main
NWylynko Apr 1, 2025
7b97a07
switch back to not failing on warnings
NWylynko Apr 7, 2025
786d885
Merge branch 'main' into nick/advanced-docs-validation-script
NWylynko Apr 7, 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
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Build Docs

on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- run: npm run build
15 changes: 15 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test build script

on:
push:
paths:
- 'scripts/build-docs.ts'
- 'scripts/build-docs.test.ts'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# testing
/coverage
.temp-test/

# next.js
/.next/
Expand Down
Loading