Build failure on a project running on TS 4.7.4
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript, nodejs, postgresql, typescript
- 领域
- build-system, database
调研方向
使用 TypeScript 4.7.4 重现构建,并检查 node_modules/pg-protocol/dist/serializer.d.ts,尤其是 v1.15 中引入的泛型 Buffer 返回类型。检查依赖项和包元数据以确定兼容的解析方式;当项目能够在较旧的 TypeScript 版本上构建且无需 override 或升级时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
This project have seen successful builds until recently. Looks like pg-protocol switched to TS ^6 starting v1.15 which is a breaking change for those running on older versions.
Build log is below.
node_modules/pg-protocol/dist/serializer.d.ts:34:18 - error TS2315: Type 'Buffer' is not generic.
34 flush: () => Buffer<ArrayBufferLike>;
~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pg-protocol/dist/serializer.d.ts:35:17 - error TS2315: Type 'Buffer' is not generic.
35 sync: () => Buffer<ArrayBufferLike>;
~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pg-protocol/dist/serializer.d.ts:36:16 - error TS2315: Type 'Buffer' is not generic.
36 end: () => Buffer<ArrayBufferLike>;
~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pg-protocol/dist/serializer.d.ts:38:21 - error TS2315: Type 'Buffer' is not generic.
38 copyDone: () => Buffer<ArrayBufferLike>;
~~~~~~~~~~~~~~~~~~~~~~~
Options to resolve I found:
- Pin pg-protocol to v1.14 via
overrideswhich is not ideal - Switch my project to TS ^6 potentially bringing other compatibility issues
Is this possible to keep pg-protocol on the older TS version?
- 主要语言
- JavaScript
- 星标
- 13.2k
- 派生
- 1.4k
- 平均合并
- 6 天 15 小时
- 30 天内合并 PR
- 6
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
brianc/node-postgres 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
brianc/node-postgres#3770 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
brianc/node-postgres#3716 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
brianc/node-postgres#3631 · 1 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 62/100
brianc/node-postgres#2857 ·
-
难度 1/5 1 小时以内 新手友好度 68/100
brianc/node-postgres#2433 ·
查看 brianc/node-postgres 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
antfu-collective/icones#398 ·
-
ECmail.com 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
wesbos/burner-email-providers#554 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
radiantearth/stac-browser#1023 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
components-web-app/docs#92 ·