enable-node-typescript-globals: Enable Node.js ambient types in the base TypeScript config #5

Open
std-bot wants to merge 1 commit from task/enable-node-typescript-globals into main
First-time contributor

Assigned idea

tsconfig.base.json explicitly sets "types": [], which disables all ambient @types packages and can lead to missing globals like Buffer, process, and NodeJS.* across the codebase. Update the base config to include Node’s ambient types so Node-targeted packages compile cleanly without per-package workarounds.

Approach: 1) Edit tsconfig.base.json and replace the current compilerOptions "types": [] with "types": ["node"].
2) Keep all other compilerOptions unchanged to minimize behavior changes.
3) If any package intentionally must not see Node globals, it can override "types" in its own tsconfig (leave that to follow-up work if it exists).

Verification: Run npx tsc -p tsconfig.base.json --showConfig and confirm the resolved config includes "types": ["node"] (and no longer shows an empty types array) coming from tsconfig.base.json.

Risk: Adding Node ambient types can introduce or surface global type conflicts (e.g., if some parts of the repo expect a non-Node environment), and may change how certain identifiers are typed. Keeping the change scoped to the base config means any environment-specific projects may need to explicitly override "types".

Agent context

Task slug: enable-node-typescript-globals
Branch: task/enable-node-typescript-globals

## Assigned idea tsconfig.base.json explicitly sets "types": [], which disables all ambient @types packages and can lead to missing globals like Buffer, process, and NodeJS.* across the codebase. Update the base config to include Node’s ambient types so Node-targeted packages compile cleanly without per-package workarounds. Approach: 1) Edit tsconfig.base.json and replace the current compilerOptions "types": [] with "types": ["node"]. 2) Keep all other compilerOptions unchanged to minimize behavior changes. 3) If any package intentionally must not see Node globals, it can override "types" in its own tsconfig (leave that to follow-up work if it exists). Verification: Run `npx tsc -p tsconfig.base.json --showConfig` and confirm the resolved config includes `"types": ["node"]` (and no longer shows an empty types array) coming from tsconfig.base.json. Risk: Adding Node ambient types can introduce or surface global type conflicts (e.g., if some parts of the repo expect a non-Node environment), and may change how certain identifiers are typed. Keeping the change scoped to the base config means any environment-specific projects may need to explicitly override "types". ## Agent context Task slug: enable-node-typescript-globals Branch: task/enable-node-typescript-globals <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/enable-node-typescript-globals:task/enable-node-typescript-globals
git switch task/enable-node-typescript-globals

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff task/enable-node-typescript-globals
git switch task/enable-node-typescript-globals
git rebase main
git switch main
git merge --ff-only task/enable-node-typescript-globals
git switch task/enable-node-typescript-globals
git rebase main
git switch main
git merge --no-ff task/enable-node-typescript-globals
git switch main
git merge --squash task/enable-node-typescript-globals
git switch main
git merge --ff-only task/enable-node-typescript-globals
git switch main
git merge task/enable-node-typescript-globals
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-49850203909049!5
No description provided.