Windows: hub-client pruneEmbedDist.test.ts fails to load with a SyntaxError
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- git, javascript, node.js, typescript
调研方向
失败的导入位于 hub-client/src/pandoc/pruneEmbedDist.test.ts,它会加载 scripts/prune-embed-dist.mjs。用 git ls-files --eol 检查该文件的换行符,并查看第一行(shebang)是否以 \r 结尾。将脚本转换为 LF 后,在 Windows 上重新运行 hub-client 测试,以确认原因。完成标准是测试文件能在 windows-latest 上加载,必要时可为 scripts/*.mjs 在 .gitattributes 中添加 eol=lf 规则。
由索引模型根据 Issue 内容生成。
描述
src/pandoc/pruneEmbedDist.test.ts is the only hub-client test file that fails on windows-latest. It fails at import, before any test runs:
https://github.com/quarto-dev/q2/actions/runs/45608700263
FAIL src/pandoc/pruneEmbedDist.test.ts [ src/pandoc/pruneEmbedDist.test.ts ]
SyntaxError: Invalid or unexpected token
The test imports scripts/prune-embed-dist.mjs:
That file starts with a shebang, and on my Windows checkout it has CRLF (#!/usr/bin/env node\r\n, git ls-files --eol reports i/lf w/crlf). No .gitattributes rule covers scripts/*.mjs. I think the \r after the hashbang is what breaks the load, but I haven't confirmed it by converting the file to LF.
We could pin scripts/*.mjs to eol=lf, since the shebang is executed verbatim.
Related: #1275.
- 主要语言
- Rust
- 星标
- 316
- 派生
- 23
- 平均合并
- 8 小时 19 分钟
- 30 天内合并 PR
- 244
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quarto-dev/q2 的其他 Issue
-
bug testing windows
难度 2/5 1-3 小时 新手友好度 62/100
quarto-dev/q2#1347 ·
维护者通常 1 天内回复
-
bug testing windows
难度 1/5 1-3 小时 新手友好度 78/100
quarto-dev/q2#1346 ·
维护者通常 1 天内回复
-
bug testing windows
难度 2/5 1-3 小时 新手友好度 72/100
quarto-dev/q2#1343 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
quarto-dev/q2#1335 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
quarto-dev/q2#1324 · 2 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
renaming a provider to a taken name fails with a raw sql error可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area:storage kind:bug priority:p3 ready
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
XLSX files cannot be imported into Adobe InDesign due to missing AppVersion in extended properties未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
qingjian-team/qingjian#1181 ·
维护者通常 2 天内回复