Skip to content

Commit 40adeb1

Browse files
committed
fix(packaging): limit global types to "node"
The @types/vinyl-fs package (pulled in by @types/gulp for the build process) includes a re-typing of the NodeJS.WritableStream interface in the global namespace, which is causing the package build process to include a triple-slash directive referencing the vinyl-fs types in @nestjs/core/router/sse-stream.d.ts. As @types/vinyl-fs is not included in the depenedencies of @nestjs/core (nor should it be, as it is only a build-time depenedency) this can cause the typescript compilation in a consuming package to fail in some conditions. A grep of a clean build of all the @nestjs packages shows that this is the only non-node @types package referenced in a triple-slash directive, so we should be able to safely limit the global types used in all packages to just "node", as changed here. (Arguably this could mean that @types/node should be included as a peerDependency of @nestjs/core, but I think it's safer to assume that anyone using nest will have that installed.) Fixes nestjs#7247
1 parent bebce90 commit 40adeb1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/tsconfig.base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"sourceMap": false,
1616
"allowJs": false,
1717
"strict": true,
18-
"strictNullChecks": false
18+
"strictNullChecks": false,
19+
"types": ["node"]
1920
},
2021
"exclude": ["../node_modules", "./**/*.spec.ts"]
2122
}

0 commit comments

Comments
 (0)