Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prevent accidentally opening binary file #3772

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Conversation

bytemain
Copy link
Member

@bytemain bytemain commented Jun 13, 2024

Types

  • 🎉 New Features
  • 🐛 Bug Fixes

Background or solution

如果用户不小心点击了 node 的 binary 文件,我们原来的识别无法识别到它是一个二进制文件。

现在复用了检测二进制的逻辑(和 vscode 保持一致)

CleanShot 2024-06-13 at 14 05 53@2x

CleanShot 2024-06-13 at 14 11 10@2x

Changelog

prevent accidentally opening binary file

Copy link

railway-app bot commented Jun 13, 2024

🚅 Previously deployed to Railway in the core project. Environment has been deleted.

@opensumi opensumi bot added the 🎨 feature feature required label Jun 13, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 61.22449% with 19 lines in your changes missing coverage. Please review.

Project coverage is 55.26%. Comparing base (68154e6) to head (a6b77f2).
Report is 8 commits behind head on main.

Files Patch % Lines
packages/file-service/src/node/shared/file-type.ts 65.78% 9 Missing and 4 partials ⚠️
packages/file-service/src/common/file-ext.ts 37.50% 2 Missing and 3 partials ⚠️
...s/ai-native/src/browser/widget/light-bulb/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3772      +/-   ##
==========================================
- Coverage   55.36%   55.26%   -0.11%     
==========================================
  Files        1541     1545       +4     
  Lines       93972    94209     +237     
  Branches    19292    19327      +35     
==========================================
+ Hits        52026    52060      +34     
- Misses      34806    34983     +177     
- Partials     7140     7166      +26     
Flag Coverage Δ
jsdom 50.70% <14.28%> (-0.13%) ⬇️
node 15.58% <59.18%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bytemain bytemain merged commit a84d403 into main Jun 18, 2024
12 checks passed
@bytemain bytemain deleted the fix/avoid-click-node branch June 18, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 feature feature required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants