-
-
Notifications
You must be signed in to change notification settings - Fork 75
fix types #1200
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
fix types #1200
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
85dbc02
fix types
romainmenke 5d953cf
lint
romainmenke fa049f9
lint
romainmenke f482fc9
fixes and changelogs
romainmenke b2ecccc
lint
romainmenke 5d1c1df
resolve final warnings
romainmenke 71cfe80
enforce api-extractor
romainmenke 5b29199
cleanup
romainmenke 62eb147
Merge branch 'main' into fix-types--persistent-puffin-26bee81a68
romainmenke db0f0ff
cleanup
romainmenke 1f803b9
Merge branch 'fix-types--persistent-puffin-26bee81a68' of https://git…
romainmenke a294024
cleanup
romainmenke 12cda43
cleanup
romainmenke 3e42eac
fix
romainmenke a54ff57
cleanup
romainmenke e7b5af0
Merge remote-tracking branch 'origin/main' into fix-types--persistent…
romainmenke 9c7280c
Merge remote-tracking branch 'origin/main' into fix-types--persistent…
romainmenke 91956cd
Merge branch 'main' into fix-types--persistent-puffin-26bee81a68
romainmenke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { spawn } from 'child_process'; | ||
import { platform } from 'process'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
|
||
import { listWorkspaces } from "../list-workspaces/list-workspaces.mjs"; | ||
|
||
const workspaces = await listWorkspaces(); | ||
|
||
for (const workspace of workspaces) { | ||
await runApiDocumenter(workspace); | ||
} | ||
|
||
async function runApiDocumenter(workspace) { | ||
await new Promise((resolve, reject) => { | ||
if (workspace.private) { | ||
resolve(true); | ||
|
||
return; | ||
} | ||
|
||
const docsExist = fs.existsSync(path.join(workspace.path, 'docs', workspace.unscopedName + '.api.json')); | ||
if (!docsExist) { | ||
resolve(true); | ||
|
||
return; | ||
} | ||
|
||
const publishCmd = spawn( | ||
'npm', | ||
[ | ||
'exec', | ||
'--', | ||
'api-documenter', | ||
'markdown', | ||
'--input-folder', | ||
path.join(workspace.path, 'docs'), | ||
'--output-folder', | ||
path.join(workspace.path, 'api-reference'), | ||
], | ||
{ | ||
stdio: 'inherit', | ||
shell: platform === 'win32' | ||
} | ||
); | ||
|
||
publishCmd.on('close', (code) => { | ||
if (0 !== code) { | ||
reject(new Error(`'npm publish' exited with code ${code} for ${packageName}`)); | ||
return; | ||
} | ||
|
||
resolve(true); | ||
}); | ||
}); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ reports | |
!e2e/package-lock.json | ||
!sites/package-lock.json | ||
.cached-commit | ||
_types |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is unused at this time, but I am hoping to use it to resolve : #1201
Actually running it generates hundreds of markdown files with API docs.
So I want to save that for a future PR.