Skip to content

Commit 3c2ae85

Browse files
authored
chore: fix installation step in docs actions (#14944)
* chore: update yarn.lock * added package manager * revert turbo version * fix build error * fix build errors
1 parent 7c5e5e3 commit 3c2ae85

File tree

7 files changed

+3789
-2482
lines changed

7 files changed

+3789
-2482
lines changed

www/utils/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
"eslint-config-prettier": "^9.0.0",
2222
"eslint-plugin-prettier": "^5.0.0",
2323
"prettier": "^3.0.3",
24-
"turbo": "latest"
24+
"turbo": "1.10.16"
2525
},
2626
"resolutions": {
2727
"docs-generator/eslint": "8.56.0",
2828
"docs-generator/@types/eslint": "8.56.0"
29-
}
29+
},
30+
"packageManager": "[email protected]"
3031
}

www/utils/packages/docs-generator/src/classes/generators/docblock.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import ts from "typescript"
33
import { GeneratorEvent } from "../helpers/generator-event-manager.js"
44
import AbstractGenerator from "./index.js"
55
import { minimatch } from "minimatch"
6-
import AiGenerator from "../helpers/ai-generator.js"
76
import getBasePath from "../../utils/get-base-path.js"
87

98
/**
@@ -25,7 +24,6 @@ class DocblockGenerator extends AbstractGenerator {
2524
if (file.isDeclarationFile || !this.isFileIncluded(file.fileName)) {
2625
return
2726
}
28-
let aiGenerator: AiGenerator | undefined
2927

3028
console.log(`[Docblock] Generating for ${file.fileName}...`)
3129

@@ -35,10 +33,6 @@ class DocblockGenerator extends AbstractGenerator {
3533
const origFileText = file.getFullText().trim()
3634
const fileNodes: ts.Node[] = [file]
3735

38-
if (this.options.generateExamples) {
39-
aiGenerator = new AiGenerator()
40-
}
41-
4236
// since typescript's compiler API doesn't support
4337
// async processes, we have to retrieve the nodes first then
4438
// traverse them separately.
@@ -55,14 +49,9 @@ class DocblockGenerator extends AbstractGenerator {
5549
let docComment: string | undefined
5650

5751
if (nodeKindGenerator?.canDocumentNode(node)) {
58-
if (aiGenerator) {
59-
const nodeFiles = aiGenerator.getNodeFiles(file)
60-
await aiGenerator.initAssistant(nodeFiles)
61-
}
6252
// initialize assistant only when needed
6353
// if previously initialized, calling the method does nothing
6454
docComment = await nodeKindGenerator.getDocBlock(node, {
65-
aiGenerator,
6655
addEnd: true,
6756
})
6857
if (docComment.length) {
@@ -98,10 +87,6 @@ class DocblockGenerator extends AbstractGenerator {
9887
)
9988
}
10089

101-
if (aiGenerator) {
102-
await aiGenerator.destroyAssistant()
103-
}
104-
10590
// add comments to file
10691
const newNodeText = printer.printNode(ts.EmitHint.Unspecified, file, file)
10792

www/utils/packages/docs-generator/src/classes/helpers/ai-generator.ts

Lines changed: 0 additions & 329 deletions
This file was deleted.

0 commit comments

Comments
 (0)