Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 No Changeset FoundThis PR doesn't include a changeset. A changeset (and the release label) is required to release a new version. How to add a changesetRun this command and follow the prompts: pnpm changesetRemember: Never use |
| const __dirname = import.meta.dirname | ||
|
|
||
| const config = { | ||
| packageDir: path.resolve(__dirname, '..'), // packages/node | ||
| apiJsonPath: path.resolve(__dirname, '../docs/posthog-node.api.json'), | ||
| outputPath: path.resolve(__dirname, `../references/posthog-node-references-${version}.json`), | ||
| packageDir: path.resolve(import.meta.dirname, '..'), // packages/node | ||
| apiJsonPath: path.resolve(import.meta.dirname, '../docs/posthog-node.api.json'), | ||
| outputPath: path.resolve(import.meta.dirname, `../references/posthog-node-references-${version}.json`), |
There was a problem hiding this comment.
Inconsistent __dirname usage
Lines 40-42 were changed to use import.meta.dirname directly, but __dirname (assigned from import.meta.dirname on line 37) is still used on lines 52, 61, and 65. Consider using one or the other consistently — either remove the __dirname variable and use import.meta.dirname everywhere, or keep using __dirname in the config block as before.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/node/scripts/generate-docs.mjs
Line: 37-42
Comment:
**Inconsistent `__dirname` usage**
Lines 40-42 were changed to use `import.meta.dirname` directly, but `__dirname` (assigned from `import.meta.dirname` on line 37) is still used on lines 52, 61, and 65. Consider using one or the other consistently — either remove the `__dirname` variable and use `import.meta.dirname` everywhere, or keep using `__dirname` in the config block as before.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.|
Size Change: 0 B Total Size: 6.66 MB ℹ️ View Unchanged
|
| { | ||
| "category": "", | ||
| "details": null, | ||
| "id": "addPendingPromise", |
There was a problem hiding this comment.
i dont think this was intended to be public
There was a problem hiding this comment.
We can mark it as as not public in doc string. Will update. Are there any other ones?
There was a problem hiding this comment.
i have't checked all methods, just noticed this one cus it was the 1st item of the array
There was a problem hiding this comment.
I'll go through a pass and mark internal anything that seems/looks/feels sus. I'll present the commit to you for review
… into node-references
Problem
I forgot to bundle in PostHog core into the Node.js SDK references lol.
This is a docs ONLY change.
Changes
Adds in the PostHog core through API extractor as an external bundle. Things like ".register()` is added.
Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file