-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: ignore non-file on tar entry filter #458
Conversation
fengmk2
commented
May 5, 2023
@@ -110,6 +110,7 @@ const WHITE_FILENAME_CONTENT_TYPES = { | |||
export function mimeLookup(filepath: string) { | |||
const filename = path.basename(filepath).toLowerCase(); | |||
if (filename.endsWith('.ts')) return PLAIN_TEXT; | |||
if (filename.endsWith('.lock')) return PLAIN_TEXT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
==========================================
- Coverage 97.56% 97.50% -0.06%
==========================================
Files 166 166
Lines 15372 15377 +5
Branches 2002 2000 -2
==========================================
- Hits 14997 14993 -4
- Misses 375 384 +9
|
竟然还有中文路径。。。
|
@@ -105,7 +107,9 @@ export class PackageVersionFileService extends AbstractService { | |||
if (file) return file; | |||
const stat = await fs.stat(localFile); | |||
const distIntegrity = await calculateIntegrity(localFile); | |||
const dist = pkg.createPackageVersionFile(path, pkgVersion.version, { | |||
// make sure dist.path store to ascii, e.g. '/resource/ToOneFromχ.js' => '/resource/ToOneFrom%CF%87.js' | |||
const distPath = encodeURIComponent(path).replace(/%2F/g, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要做一下判断,超出 ascii 编码范围的才需要进行 encodeURIComponent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[skip ci] ## [3.19.2](v3.19.1...v3.19.2) (2023-05-05) ### Bug Fixes * ignore non-file on tar entry filter ([#458](#458)) ([7e63e7f](7e63e7f))
🎉 This PR is included in version 3.19.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |