Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

chore: remove consola from runtime #498

Merged
merged 2 commits into from
Sep 15, 2022

Conversation

luhc228
Copy link
Member

@luhc228 luhc228 commented Sep 2, 2022

consola 里面依赖 process 变量,ssr 产物里尽量可能少依赖(因为天马场景下需要模拟这部分变量)

@vercel
Copy link

vercel bot commented Sep 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ice-v3 ✅ Ready (Inspect) Visit Preview Sep 8, 2022 at 3:53AM (UTC)

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2022

Codecov Report

Base: 88.32% // Head: 88.32% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (e8983ae) compared to base (c259859).
Patch coverage: 33.33% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-next     #498      +/-   ##
================================================
- Coverage         88.32%   88.32%   -0.01%     
================================================
  Files               109      109              
  Lines              9445     9444       -1     
  Branches           1299     1299              
================================================
- Hits               8342     8341       -1     
  Misses             1095     1095              
  Partials              8        8              
Impacted Files Coverage Δ
packages/runtime/src/runServerApp.tsx 90.24% <33.33%> (-0.03%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ClarkXia
Copy link
Collaborator

ClarkXia commented Sep 2, 2022

需要有 test case 保证 render html 的链路不会错误地引入不支持的 node 依赖

wssgcg1213
wssgcg1213 previously approved these changes Sep 6, 2022
@wssgcg1213
Copy link
Collaborator

需要有 test case 保证 render html 的链路不会错误地引入不支持的 node 依赖

理论上测试 Node.js 环境是合理的, 天马场景是因为对执行环境做了定制, 我们也没有办法去模拟这个定制环境吧

当然冒烟测试还是得有...

@ClarkXia
Copy link
Collaborator

理论上测试 Node.js 环境是合理的, 天马场景是因为对执行环境做了定制, 我们也没有办法去模拟这个定制环境吧

有一个 polyfill 文件修改了 process,执行 renderHTML 方法前引入,应该就能保证 renderHTML 链路上对于 node 环境不过多依赖

@chenjun1011
Copy link
Contributor

或者把 SSR 产物放到 vm 里去执行,也可以这样测试

@wssgcg1213 wssgcg1213 merged commit acbabcc into release-next Sep 15, 2022
@wssgcg1213 wssgcg1213 deleted the chore/remove-consola-from-runtime branch September 15, 2022 03:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants