Skip to content

Commit 4fadf3d

Browse files
authored
Publish CommonJS Typescript Types (#7614)
Fixes #7222 Fixes #6899 Stop removing CommonJS Types and fix `exports` to properly direct to the right types. This enables consumers to use the `node16` and `nodenext` `moduleResolution` options in CommonJS projects. Additionally, this fixes autocompletion for deep imports.
1 parent 80ee904 commit 4fadf3d

File tree

25 files changed

+3420
-336
lines changed

25 files changed

+3420
-336
lines changed

.changeset/quiet-peaches-film.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@apollo/cache-control-types': patch
3+
'@apollo/server-gateway-interface': patch
4+
'@apollo/server-plugin-response-cache': patch
5+
'@apollo/server': patch
6+
'@apollo/usage-reporting-protobuf': patch
7+
---
8+
9+
Publish TypeScript typings for CommonJS modules output.
10+
11+
This allows TypeScript projects that use CommonJS modules with
12+
`moduleResolution: "node16"` or
13+
`moduleResolution: "nodeNext"`
14+
to correctly resolves the typings of apollo's packages as CommonJS instead of ESM.
15+

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"label": "TypeScript watch",
66
"type": "typescript",
7-
"tsconfig": "tsconfig.esm.json",
7+
"tsconfig": "tsconfig.build.json",
88
"option": "watch",
99
"problemMatcher": ["$tsc-watch"],
1010
"presentation": {

0 commit comments

Comments
 (0)