Refactor: use local schemas.json file instead of NPM package#133
Refactor: use local schemas.json file instead of NPM package#133anaxite wants to merge 8 commits intodoc-detective:mainfrom
schemas.json file instead of NPM package#133Conversation
…urce Either use a local JSON file, or retrieve it directly from GitHub
- Add Axios library - Rename build-schemas target
Instead of retrieving `schemas.json` from a package, retrieve it locally
We don't need doc-detective-common libraries anymore. Instead, bump the schema and package.json versions.
WalkthroughThis PR migrates schema sources from the npm package doc-detective-common to a local JSON file at Changes
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant Repo as Repository
participant DC as doc-detective/common
participant Build as Build Script
participant Docs as Documentation
rect rgb(220, 240, 255)
Note over GH,DC: Old Flow (Deprecated)
GH->>Repo: checkout
GH->>Repo: npm install doc-detective-common
Build->>Repo: read schemas from package
end
rect rgb(220, 255, 220)
Note over GH,Docs: New Flow (Current PR)
GH->>DC: fetch latest tag
GH->>DC: resolve version_clean
GH->>DC: fetch schemas.json from version URL
GH->>Repo: commit schemas.json
Build->>Repo: read local schemas.json
Build->>Build: (fallback: fetch from URL if missing)
Docs->>Repo: import from `@site/src/schemas/schemas.json`
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/pages/app.js (1)
3-10: Remove unusedschemasimport
schemasis imported from@site/src/schemas/schemas.jsonbut never used in this file;Formjust renders<Builder />.You can simplify this file by dropping the unused import:
-import schemas from "@site/src/schemas/schemas.json";docs/get-started/actions/checkLink.mdx (1)
6-6: Fix YAML frontmatter syntax error.Line 6 has a typo:
Grand_parentshould begrand_parent(lowercase), and the trailing comma is invalid YAML syntax.Apply this diff to fix:
- grand_parent: Tests, + grand_parent: Testsdocs/get-started/actions/httpRequest.mdx (1)
67-67: Address Vale linting warning: replace "Simple" with neutral alternative.The Vale style checker flags "Simple" as potentially condescending. Replace with a neutral descriptor like "Basic" to resolve the linting failure.
Apply this diff:
- ### Simple GET request (object format) + ### Basic GET request (object format)
🧹 Nitpick comments (2)
.scripts/buildSchemaReferences.js (1)
29-56: Consider adding timeout and making the URL configurable.The
getSchemas()function provides a good fallback mechanism. However, the hardcoded GitHub URL pointing to themainbranch could be fragile if the repository structure changes, and the axios request lacks a timeout which could hang the build indefinitely.Consider these improvements:
- Add a timeout to the axios request:
try { - const response = await axios.get("https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/src/schemas/schemas.json"); + const response = await axios.get( + "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/src/schemas/schemas.json", + { timeout: 10000 } + ); schemas = response.data;
- Make the URL configurable via environment variable:
+ const SCHEMA_URL = process.env.SCHEMA_URL || "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/src/schemas/schemas.json"; try { - const response = await axios.get("https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/src/schemas/schemas.json"); + const response = await axios.get(SCHEMA_URL, { timeout: 10000 });.github/workflows/update-common.yml (1)
45-65: Consider combining the two commits into one.The workflow now creates two separate commits (one for
schemas.json, another forpackage.json). While this separation provides granular tracking, it may clutter the commit history unnecessarily.If you prefer a cleaner history, you could combine both file changes into a single commit:
- name: Fetch versioned `schemas.json` from doc-detective/common run: | curl -f -L --max-time 30 -o src/schemas/schemas.json https://raw.githubusercontent.com/doc-detective/common/${{ steps.version.outputs.version }}/src/schemas/schemas.json # Validate JSON jq empty src/schemas/schemas.json + + # Update package.json version in same step + jq --arg version "${{ steps.version.outputs.version_clean }}" '.version = $version' package.json > package.tmp.json && mv package.tmp.json package.json - - name: Commit schema changes - id: commit + - name: Commit schema and package version changes + id: commit-all uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7.0.0 with: - commit_message: "chore: update schemas.json to version ${{ steps.version.outputs.version }}" - file_pattern: "src/schemas/schemas.json" - - - name: Bump or sync package version - id: patch - if: steps.commit.outputs.changes_detected == 'true' - run: | - # Update package.json version field - jq --arg version "${{ steps.version.outputs.version_clean }}" '.version = $version' package.json > package.tmp.json && mv package.tmp.json package.json - - - name: Commit package version changes - id: commit-package - if: steps.commit.outputs.changes_detected == 'true' - uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7.0.0 - with: - commit_message: "chore: bump package version to match doc-detective-common" - file_pattern: "package.json" + commit_message: "chore: update schemas and package version to ${{ steps.version.outputs.version }}" + file_pattern: "src/schemas/schemas.json package.json"Then update the subsequent conditional steps to reference
commit-allinstead ofcommit-package.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (31)
.github/workflows/update-common.yml(3 hunks).scripts/buildSchemaReferences.js(3 hunks)AGENTS.md(1 hunks)docs/get-started/actions/checkLink.mdx(1 hunks)docs/get-started/actions/click.mdx(1 hunks)docs/get-started/actions/dragAndDrop.mdx(1 hunks)docs/get-started/actions/find.mdx(1 hunks)docs/get-started/actions/goTo.mdx(1 hunks)docs/get-started/actions/httpRequest.mdx(1 hunks)docs/get-started/actions/loadCookie.mdx(1 hunks)docs/get-started/actions/loadVariables.mdx(1 hunks)docs/get-started/actions/record.mdx(1 hunks)docs/get-started/actions/runCode.mdx(1 hunks)docs/get-started/actions/runShell.mdx(1 hunks)docs/get-started/actions/saveCookie.mdx(1 hunks)docs/get-started/actions/screenshot.mdx(1 hunks)docs/get-started/actions/stopRecord.mdx(1 hunks)docs/get-started/actions/type.mdx(1 hunks)docs/get-started/actions/wait.mdx(1 hunks)docs/references/schemas/click-element-detailed.md(1 hunks)docs/references/schemas/crop-by-element-detailed.md(2 hunks)docs/references/schemas/find-element-detailed.md(2 hunks)docs/references/schemas/go-to-url-detailed.md(1 hunks)docs/references/schemas/http-request-detailed.md(1 hunks)docs/references/schemas/response.md(1 hunks)docs/references/schemas/type-keys-detailed.md(1 hunks)docusaurus.config.ts(1 hunks)package.json(2 hunks)src/components/Builder/index.js(1 hunks)src/pages/app.js(1 hunks)src/plugins/webpack-browserify.js(0 hunks)
💤 Files with no reviewable changes (1)
- src/plugins/webpack-browserify.js
🧰 Additional context used
🧬 Code graph analysis (9)
docs/get-started/actions/record.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
docs/get-started/actions/click.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
docs/get-started/actions/screenshot.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
docs/get-started/actions/wait.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
package.json (1)
.scripts/buildSchemaReferencesV4.js (4)
main(407-463)generateSchemaMarkdown(126-200)generateExampleFromSchema(203-255)extractObjectSchemas(52-123)
.github/workflows/update-common.yml (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
docs/get-started/actions/dragAndDrop.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
docs/get-started/actions/httpRequest.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
docs/get-started/actions/loadCookie.mdx (1)
.scripts/buildSchemaReferencesV4.js (1)
main(407-463)
🪛 GitHub Actions: Vale Style Checks
docs/get-started/actions/runCode.mdx
[error] 73-73: [alex.Condescending] Using 'simple' may come across as condescending.
docs/references/schemas/response.md
[error] 16-16: [Google.Latin] Use 'for example' instead of 'e.g.'.
[error] 16-16: [Google.Latin] Use 'for example' instead of 'e.g.'.
docs/get-started/actions/httpRequest.mdx
[error] 67-67: [alex.Condescending] Using 'Simple' may come across as condescending.
🪛 GitHub Check: vale
docs/references/schemas/response.md
[failure] 16-16:
[vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g.'.
Raw Output:
{"message": "[Google.Latin] Use 'for example' instead of 'e.g.'.", "location": {"path": "docs/references/schemas/response.md", "range": {"start": {"line": 16, "column": 195}}}, "severity": "ERROR"}
[failure] 16-16:
[vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g.'.
Raw Output:
{"message": "[Google.Latin] Use 'for example' instead of 'e.g.'.", "location": {"path": "docs/references/schemas/response.md", "range": {"start": {"line": 16, "column": 136}}}, "severity": "ERROR"}
🪛 LanguageTool
docs/references/schemas/type-keys-detailed.md
[grammar] ~18-~18: Use a hyphen to join words.
Context: ...ype into. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
docs/references/schemas/find-element-detailed.md
[grammar] ~14-~14: Use a hyphen to join words.
Context: ... to find. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
[grammar] ~15-~15: Use a hyphen to join words.
Context: ... to find. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
docs/references/schemas/click-element-detailed.md
[grammar] ~16-~16: Use a hyphen to join words.
Context: ...to click. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
[grammar] ~17-~17: Use a hyphen to join words.
Context: ...to click. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
docs/references/schemas/type-keys-detailed.md
19-19: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
19-19: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
20-20: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
20-20: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
22-22: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
22-22: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
23-23: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
23-23: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
25-25: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
26-26: Table column count
Expected: 4; Actual: 2; Too few cells, row will be missing data
(MD056, table-column-count)
docs/references/schemas/crop-by-element-detailed.md
16-16: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
16-16: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
17-17: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
17-17: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
18-18: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
18-18: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
19-19: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
19-19: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
20-20: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
20-20: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
docs/references/schemas/find-element-detailed.md
14-14: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
14-14: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
15-15: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
15-15: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
16-16: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
16-16: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
17-17: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
17-17: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
18-18: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
18-18: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
19-19: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
19-19: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
20-20: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
20-20: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
🔇 Additional comments (27)
docs/references/schemas/response.md (1)
16-16: Schema documentation update looks correct.The new
requiredfield is properly documented and the example is updated consistently to include the empty array default. The schema expansion aligns with the broader documentation updates across related schema files.Also applies to: 23-24
docs/references/schemas/http-request-detailed.md (1)
40-40: Response example update is consistent with schema.The example correctly reflects the Response schema's empty object default state, maintaining consistency across the documentation.
docs/references/schemas/go-to-url-detailed.md (1)
16-17: New schema fields properly documented and exemplified.The additions of
timeoutandwaitUntilfields are well-documented with clear descriptions and appropriate defaults. The example is updated consistently to include these new options.Also applies to: 24-26
docs/references/schemas/click-element-detailed.md (1)
18-22: New element-finding criteria properly documented.The expansion to include
elementId,elementTestId,elementClass,elementAttribute, andelementAriais well-documented with clear descriptions of matching behavior (regex support, presence/absence for attributes, ARIA spec). The example correctly includes all new fields.Also applies to: 30-34
docs/references/schemas/find-element-detailed.md (1)
16-20: New element-finding criteria expansion aligns with parallel schema changes.The documentation mirrors the
click-element-detailed.mdexpansion with consistent field descriptions and example updates. The schema expansion is logically structured with proper documentation of regex support, presence/absence semantics, and ARIA name matching.Also applies to: 32-35
docs/get-started/actions/type.mdx (1)
10-10: Import migration correctly implements schema source change.The update from
doc-detective-commonnamed export to default import from@site/src/schemas/schemas.jsonis properly implemented. The usage pattern on line 200 (schemas.type_v3) remains compatible with the new import structure.docs/get-started/actions/wait.mdx (1)
10-10: Import migration correctly aligned with schema source consolidation.The import successfully migrates from
doc-detective-commonto the local@site/src/schemas/schemas.jsonfile. The schema reference usage at line 78 (schemas.wait_v3) remains compatible and functional.docs/get-started/actions/runShell.mdx (1)
10-10: Import migration follows established pattern.The import successfully transitions from
doc-detective-commonto local@site/src/schemas/schemas.json, consistent with the migration pattern across other MDX action documentation files. The schema reference usage at line 164 (schemas.runShell_v3) remains compatible.docs/get-started/actions/click.mdx (1)
10-10: Schemas JSON import looks correct and consistentSwitching to
import schemas from "@site/src/schemas/schemas.json";matches the new repo-wide pattern, and the existing usageschemas.click_v3remains coherent as long asschemas.jsonexposes aclick_v3key.Please confirm that
src/schemas/schemas.jsoncontains aclick_v3top-level key so this MDX page continues to render the schema correctly.AGENTS.md (1)
119-124: Agent instructions now match the new schema sourceUpdating the MDX example to
import schemas from "@site/src/schemas/schemas.json";keeps contributor guidance aligned with the implementation while preserving theschemas.dragAndDrop_v3usage.docs/get-started/actions/goTo.mdx (1)
10-10: Local schemas import is consistent with toolingThe
schemasdefault import from@site/src/schemas/schemas.jsonmatches the new schema handling, and theschemas.goTo_v3usage aligns with the keys listed inschemasToGeneratein.scripts/buildSchemaReferencesV4.js.Double-check that
goTo_v3exists inschemas.jsonso this reference page doesn’t break when schemas are regenerated.src/components/Builder/index.js (1)
4-4: Builder now sourcing schemas from local JSONImporting
schemasfrom@site/src/schemas/schemas.jsonshould be a drop‑in replacement for the previous module export, given the existing usage relies onObject.keys(schemas)andschemas[key].title.After updating
schemas.json, it’s worth quickly verifying in the Action Builder UI that the action list populates correctly and that selecting an action still renders the expected form.docs/get-started/actions/loadCookie.mdx (1)
10-10: Local schemas import aligns with the new schema workflowUsing
import schemas from "@site/src/schemas/schemas.json";here keeps theloadCookiedoc in sync with the updated schema source, andschemas.loadCookie_v3matches the naming convention used elsewhere.Please confirm that
loadCookie_v3is present inschemas.jsonso the schema viewer on this page continues to render correctly after schema updates.docusaurus.config.ts (1)
65-199: Theme config and plugin cleanup verified; no residual Node core imports in browser codeVerification confirms the removal of the webpack-browserify polyfill plugin is safe. A comprehensive scan of source files (
src/) and broader import patterns found zero references to Node core modules (path, fs, os, crypto, stream, buffer, util, process, etc.) in browser-targeted code.The only Node import is
require("dotenv").config()in docusaurus.config.ts line 4, which is server-side config initialization—expected and safe.The
themeConfigshape, conditionalpluginsarray, andthemesdeclarations are all valid for Docusaurus v3.docs/get-started/actions/dragAndDrop.mdx (1)
10-11: Schema import path successfully migrated to local JSON.The import is now sourced from the local site JSON file, consistent with the PR migration objective.
package.json (1)
20-20: Build script and dependency updates align with migration.The script path change to
buildSchemaReferences.jsand addition of axios support the local JSON schema loading strategy. However, verify that the new script exists and functions correctly before merge.Also applies to: 58-58
docs/get-started/actions/saveCookie.mdx (1)
10-11: Schema import migrated to local JSON file.docs/get-started/actions/screenshot.mdx (1)
10-11: Schema import migrated to local JSON file.docs/get-started/actions/checkLink.mdx (1)
12-13: Schema import migrated to local JSON file.docs/get-started/actions/stopRecord.mdx (1)
10-11: Schema import migrated to local JSON file.docs/get-started/actions/httpRequest.mdx (1)
10-11: Schema import migrated to local JSON file.docs/references/schemas/crop-by-element-detailed.md (1)
25-35: Schema additions for element-finding are well-designed.The new fields (elementId, elementTestId, elementClass, elementAttribute, elementAria) expand element-matching capabilities with clear semantics. Example payload correctly includes the new fields.
.scripts/buildSchemaReferences.js (1)
443-446: LGTM!The integration of the async
getSchemas()function is clean and maintains backward compatibility with the rest of the script.docs/get-started/actions/find.mdx (1)
10-10: LGTM!The import change from the
doc-detective-commonpackage to the local JSON file is consistent with the PR's migration strategy. The downstream usage remains unchanged.docs/get-started/actions/loadVariables.mdx (1)
10-10: LGTM!The import migration is consistent with the other MDX files in this PR.
docs/get-started/actions/record.mdx (1)
10-10: LGTM!The import change is consistent with the broader schema migration effort.
.github/workflows/update-common.yml (1)
28-39: LGTM!The version resolution logic correctly handles both explicit versions and 'latest', with proper output of both the raw version and cleaned version for downstream steps.
| - name: Fetch versioned `schemas.json` from doc-detective/common | ||
| run: | | ||
| npm install doc-detective-common@${{ steps.version.outputs.version }} || { | ||
| echo "Failed to install doc-detective-common@${{ steps.version.outputs.version }}" | ||
| exit 1 | ||
| } | ||
| npm audit fix | ||
| curl -L -o src/schemas/schemas.json https://raw.githubusercontent.com/doc-detective/common/${{ steps.version.outputs.version }}/src/schemas/schemas.json | ||
|
|
||
| - name: Test the installation | ||
| run: | | ||
| npm test | ||
|
|
||
| - name: Commit changes | ||
| - name: Commit schema changes | ||
| id: commit | ||
| run: | | ||
| git add package.json package-lock.json | ||
| if git diff --staged --quiet; then | ||
| echo "No changes to commit" | ||
| echo "has_changes=false" >> $GITHUB_OUTPUT | ||
| else | ||
| git commit -m "chore: bump doc-detective-common version to ${{ steps.version.outputs.version }}" | ||
| git push | ||
| echo "has_changes=true" >> $GITHUB_OUTPUT | ||
| fi | ||
| uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7.0.0 | ||
| with: | ||
| commit_message: "chore: update schemas.json to version ${{ steps.version.outputs.version }}" | ||
| file_pattern: "src/schemas/schemas.json" |
There was a problem hiding this comment.
Add error handling and validation to the schema download.
The curl command lacks error handling, timeout, and validation of the downloaded schemas.json file. If the download fails or returns invalid content, the workflow will commit a broken or empty file.
Apply this diff to add proper error handling:
- name: Fetch versioned `schemas.json` from doc-detective/common
run: |
- curl -L -o src/schemas/schemas.json https://raw.githubusercontent.com/doc-detective/common/${{ steps.version.outputs.version }}/src/schemas/schemas.json
+ # Download with error handling and timeout
+ if ! curl -f -L --max-time 30 -o src/schemas/schemas.json https://raw.githubusercontent.com/doc-detective/common/${{ steps.version.outputs.version }}/src/schemas/schemas.json; then
+ echo "Failed to download schemas.json"
+ exit 1
+ fi
+
+ # Validate that the downloaded file is valid JSON
+ if ! jq empty src/schemas/schemas.json 2>/dev/null; then
+ echo "Downloaded schemas.json is not valid JSON"
+ exit 1
+ fi
+
+ echo "Successfully downloaded and validated schemas.json"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Fetch versioned `schemas.json` from doc-detective/common | |
| run: | | |
| npm install doc-detective-common@${{ steps.version.outputs.version }} || { | |
| echo "Failed to install doc-detective-common@${{ steps.version.outputs.version }}" | |
| exit 1 | |
| } | |
| npm audit fix | |
| curl -L -o src/schemas/schemas.json https://raw.githubusercontent.com/doc-detective/common/${{ steps.version.outputs.version }}/src/schemas/schemas.json | |
| - name: Test the installation | |
| run: | | |
| npm test | |
| - name: Commit changes | |
| - name: Commit schema changes | |
| id: commit | |
| run: | | |
| git add package.json package-lock.json | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| git commit -m "chore: bump doc-detective-common version to ${{ steps.version.outputs.version }}" | |
| git push | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7.0.0 | |
| with: | |
| commit_message: "chore: update schemas.json to version ${{ steps.version.outputs.version }}" | |
| file_pattern: "src/schemas/schemas.json" | |
| - name: Fetch versioned `schemas.json` from doc-detective/common | |
| run: | | |
| # Download with error handling and timeout | |
| if ! curl -f -L --max-time 30 -o src/schemas/schemas.json https://raw.githubusercontent.com/doc-detective/common/${{ steps.version.outputs.version }}/src/schemas/schemas.json; then | |
| echo "Failed to download schemas.json" | |
| exit 1 | |
| fi | |
| # Validate that the downloaded file is valid JSON | |
| if ! jq empty src/schemas/schemas.json 2>/dev/null; then | |
| echo "Downloaded schemas.json is not valid JSON" | |
| exit 1 | |
| fi | |
| echo "Successfully downloaded and validated schemas.json" | |
| - name: Commit schema changes | |
| id: commit | |
| uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7.0.0 | |
| with: | |
| commit_message: "chore: update schemas.json to version ${{ steps.version.outputs.version }}" | |
| file_pattern: "src/schemas/schemas.json" |
🤖 Prompt for AI Agents
.github/workflows/update-common.yml around lines 41 to 50: the curl step must
fail fast and validate the downloaded JSON before committing so we don't push
broken/empty schemas.json. Replace the plain curl with a safe sequence that
downloads to a temporary file using curl --fail --show-error --location
--max-time (e.g. 30), checks curl exit status, validates that the file is
non-empty and contains valid JSON (use jq -e . or node -e 'JSON.parse(...)' to
test), and only moves it to src/schemas/schemas.json on success; if any check
fails, emit a clear error and exit non-zero so the job stops and the commit step
is skipped (make the commit step conditional on the previous step succeeding).
There was a problem hiding this comment.
The suggestion seems okay to me.
There was a problem hiding this comment.
@anaxite, great! The error handling will help ensure the workflow doesn't commit broken or empty schema files. Feel free to reach out if you need any assistance with the implementation or have questions about the changes. 👍
| elementText | string | Optional. Display text of the element to click. If combined with other element finding fields, the element must match all specified criteria. | | ||
| selector | string | Optional. Selector of the element to click. If combined with other element finding fields, the element must match all specified criteria. | |
There was a problem hiding this comment.
Fix grammar: hyphenate "element-finding" in compound adjectives.
LanguageTool flags the use of "element finding" when it should be hyphenated as "element-finding" when used as a compound adjective modifying "fields" (lines 16-17).
Apply this diff to fix the grammar:
-elementText | string | Optional. Display text of the element to click. If combined with other element finding fields, the element must match all specified criteria. |
+elementText | string | Optional. Display text of the element to click. If combined with other element-finding fields, the element must match all specified criteria. |
-selector | string | Optional. Selector of the element to click. If combined with other element finding fields, the element must match all specified criteria. |
+selector | string | Optional. Selector of the element to click. If combined with other element-finding fields, the element must match all specified criteria. | 📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| elementText | string | Optional. Display text of the element to click. If combined with other element finding fields, the element must match all specified criteria. | | |
| selector | string | Optional. Selector of the element to click. If combined with other element finding fields, the element must match all specified criteria. | | |
| elementText | string | Optional. Display text of the element to click. If combined with other element-finding fields, the element must match all specified criteria. | | |
| selector | string | Optional. Selector of the element to click. If combined with other element-finding fields, the element must match all specified criteria. | |
🧰 Tools
🪛 LanguageTool
[grammar] ~16-~16: Use a hyphen to join words.
Context: ...to click. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
[grammar] ~17-~17: Use a hyphen to join words.
Context: ...to click. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
In docs/references/schemas/click-element-detailed.md around lines 16 to 17, the
compound adjective "element finding" should be hyphenated as "element-finding";
update both occurrences ("If combined with other element finding fields") to "If
combined with other element-finding fields" so the adjective correctly modifies
"fields" and fixes the grammar.
| elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | ||
| elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | ||
| elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. | | ||
| elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. | | ||
| elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. | |
There was a problem hiding this comment.
Fix markdown table formatting to match schema documentation pattern.
The newly added field rows have two formatting issues:
- Trailing pipes that violate the table style (should be no trailing pipes)
- Missing the 4th column (Default value), causing column count mismatch
Align formatting with existing rows (padding and selector above).
Apply this diff to fix table structure:
- elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. |
- elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. |
- elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. |
- elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. |
- elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. |
+ elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax.
+ elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax.
+ elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes.
+ elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence.
+ elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. | | |
| elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. | | |
| elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | |
| elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | |
| elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. | |
| elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. | |
| elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
16-16: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
16-16: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
17-17: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
17-17: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
18-18: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
18-18: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
19-19: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
19-19: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
20-20: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
20-20: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
🤖 Prompt for AI Agents
In docs/references/schemas/crop-by-element-detailed.md around lines 16 to 20,
the three newly added table rows have incorrect Markdown table formatting: they
include trailing pipe characters and are missing the 4th column (Default value)
which causes the table column count to mismatch. Fix by removing the trailing
pipe at the end of each row, add a fourth column entry (use an explicit
empty/default value such as an empty cell or "—" to match the existing rows),
and ensure spacing/padding matches the selector row style above so all rows have
four columns and consistent alignment.
| elementText | string | Optional. Display text of the element to find. If combined with other element finding fields, the element must match all specified criteria. | | ||
| selector | string | Optional. Selector of the element to find. If combined with other element finding fields, the element must match all specified criteria. | |
There was a problem hiding this comment.
Fix grammar and markdown table formatting issues.
LanguageTool flags "element finding" which should be hyphenated as "element-finding" (lines 14-15). Additionally, markdownlint reports table formatting issues with trailing pipes and column count mismatches on these lines, suggesting the table structure needs adjustment.
Apply this diff to fix both issues:
-elementText | string | Optional. Display text of the element to find. If combined with other element finding fields, the element must match all specified criteria. |
+elementText | string | Optional. Display text of the element to find. If combined with other element-finding fields, the element must match all specified criteria. | ``
-selector | string | Optional. Selector of the element to find. If combined with other element finding fields, the element must match all specified criteria. |
+selector | string | Optional. Selector of the element to find. If combined with other element-finding fields, the element must match all specified criteria. | ``Note: Ensure the table has a closing pipe | at the end of each row and verify all rows have the same number of columns to resolve markdownlint validation errors.
Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 LanguageTool
[grammar] ~14-~14: Use a hyphen to join words.
Context: ... to find. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
[grammar] ~15-~15: Use a hyphen to join words.
Context: ... to find. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
14-14: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
14-14: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
15-15: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
15-15: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
🤖 Prompt for AI Agents
In docs/references/schemas/find-element-detailed.md around lines 14 to 15, the
phrase "element finding" should be hyphenated to "element-finding" and the
Markdown table rows are missing trailing pipes and may have inconsistent column
counts; update those two rows so each cell count matches the table header and
add a closing pipe '|' at the end of every row, and replace "element finding
fields" with "element-finding fields" in both lines.
| :-- | :-- | :-- | :-- | ||
| headers | object([Response headers](/docs/references/schemas/response-headers)) | Optional. Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails. | ``{}`` | ||
| body | one of:<br/>- object([Response body object](/docs/references/schemas/response-body-object))<br/>- array of unknown<br/>- string | Optional. JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails. | ``{}`` | ||
| required | array of string | Optional. Array of field paths that must exist in the response body. Uses dot notation for nested fields (e.g., 'user.name') and bracket notation for array indices (e.g., 'items[0].id'). Fields must be present but may have any value including null. | ``[]`` |
There was a problem hiding this comment.
Fix Vale linting violations: replace "e.g." with "for example".
The Vale style checker flags two instances of "e.g." on this line that should be spelled out as "for example" per the Google style guide being enforced.
Apply this diff to fix the Vale violations:
-required | array of string | Optional. Array of field paths that must exist in the response body. Uses dot notation for nested fields (e.g., 'user.name') and bracket notation for array indices (e.g., 'items[0].id'). Fields must be present but may have any value including null. | ``[]``
+required | array of string | Optional. Array of field paths that must exist in the response body. Uses dot notation for nested fields (for example, 'user.name') and bracket notation for array indices (for example, 'items[0].id'). Fields must be present but may have any value including null. | ``[]``📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| required | array of string | Optional. Array of field paths that must exist in the response body. Uses dot notation for nested fields (e.g., 'user.name') and bracket notation for array indices (e.g., 'items[0].id'). Fields must be present but may have any value including null. | ``[]`` | |
| required | array of string | Optional. Array of field paths that must exist in the response body. Uses dot notation for nested fields (for example, 'user.name') and bracket notation for array indices (for example, 'items[0].id'). Fields must be present but may have any value including null. | ``[]`` |
🧰 Tools
🪛 GitHub Actions: Vale Style Checks
[error] 16-16: [Google.Latin] Use 'for example' instead of 'e.g.'.
[error] 16-16: [Google.Latin] Use 'for example' instead of 'e.g.'.
🪛 GitHub Check: vale
[failure] 16-16:
[vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g.'.
Raw Output:
{"message": "[Google.Latin] Use 'for example' instead of 'e.g.'.", "location": {"path": "docs/references/schemas/response.md", "range": {"start": {"line": 16, "column": 195}}}, "severity": "ERROR"}
[failure] 16-16:
[vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g.'.
Raw Output:
{"message": "[Google.Latin] Use 'for example' instead of 'e.g.'.", "location": {"path": "docs/references/schemas/response.md", "range": {"start": {"line": 16, "column": 136}}}, "severity": "ERROR"}
🤖 Prompt for AI Agents
In docs/references/schemas/response.md around line 16, replace the two
occurrences of the abbreviation "e.g." with the spelled-out phrase "for example"
so the sentence reads using "for example" in both places (e.g., change "e.g.,
'user.name'" to "for example, 'user.name'" and "e.g., 'items[0].id'" to "for
example, 'items[0].id'") to satisfy Vale linting and the Google style guide.
| elementText | string | Optional. Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria. | | ||
| elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | ||
| elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | ||
| elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. | | ||
| elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. | | ||
| elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. | | ||
|
|
||
| ## Examples | ||
|
|
There was a problem hiding this comment.
Fix the missing default column in table rows.
The newly added element selection fields (lines 18-23, 25) are missing the default value column in the table, causing table formatting issues. Each row should have four columns to match the table header: Field | Type | Description | Default.
Apply this diff to add the missing default column (empty values are appropriate if no default exists):
-elementText | string | Optional. Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria. |
-elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. |
-elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. |
-elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. |
-elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. |
-elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. |
+elementText | string | Optional. Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria. |
+elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. |
+elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. |
+elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. |
+elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. |
+elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| elementText | string | Optional. Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria. | | |
| elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. | | |
| elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. | | |
| elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. | | |
| ## Examples | |
| elementText | string | Optional. Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria. | | |
| elementId | string | Optional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementTestId | string | Optional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax. | | |
| elementClass | one of:<br/>- string<br/>- array of string | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes. | | |
| elementAttribute | object | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence. | | |
| elementAria | string | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax. | |
🧰 Tools
🪛 LanguageTool
[grammar] ~18-~18: Use a hyphen to join words.
Context: ...ype into. If combined with other element finding fields, the element must match a...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
19-19: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
19-19: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
20-20: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
20-20: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
22-22: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
22-22: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
23-23: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe
(MD055, table-pipe-style)
23-23: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
25-25: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
26-26: Table column count
Expected: 4; Actual: 2; Too few cells, row will be missing data
(MD056, table-column-count)
🤖 Prompt for AI Agents
In docs/references/schemas/type-keys-detailed.md around lines 18 to 26 the table
rows for elementText, elementId, elementTestId, elementClass, elementAttribute
and elementAria only have three columns which breaks the table layout; add a
fourth (Default) column to each of those rows — use an empty value for the
default where none exists (i.e., add a trailing pipe and a blank cell for each
affected line) so every row matches the table header Field | Type | Description
| Default.
Description
This pull request changes the way the documentation interacts with common schemas. Rather than reading them from the
doc-detective-commonpackage, the tooling now reads the schemas from a localsrc/schemas/schemas.jsonfile.To support this new workflow, the GitHub Actions workflow that used to update
doc-detective-commonnow only updates the schema file andpackage.json.Why we do this: some scripts that were kept around for
doc-detective-commonwere preventing Docusaurus from using Rspack, which will be mandatory in upcoming Docusaurus versions.Type of contribution
Changes made
buildSchemaReferencesscript to grabschemasdata from a local file rather than importing from the NPM package. Use a web link as fallback that we hopefully don't need.schemasdata from a local file rather than importing from the NPM package.doc-detective-commonfrom the dependencies.webpack-browserify.jsscript and its entry in the Docusaurus config file.Testing performed
npm run start)npm run build)Checklist
.mdxextension/docs/pagenot../page)Additional notes
@hawkeyexl I could use your eyes. Do the updated scripts and actions look good to you? It's a lot of moving parts for this change, and the GitHub action is hard for me to test.
I still have a few packages to clean up before this PR is fully ready.
For reviewers:
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.