Comments (4)
Looks like the option normalizeFilenames
can resolve this by removing the auto generated name. But when I use the option, only the files having that generated id get reported.
All other files get lost in the process and are reported with an empty string instead
PASS : 184KB < 250KB (brotli)
from bundlewatch.
The problem seems to be this line
As if there's no group being found, split
returns the whole path
from bundlewatch.
Making my group optional in my regex kind of fixes the issue... But it makes the split function returning an undefined value and we do a replace on an undefined (my files don't have undefined
so it's alright I guess).
Might be worth it to replace the split
with a match
instead and really check the results.
Something along these lines maybe
let normalizedFilePath = filePath;
if (normalizeFilenames) {
const match = filePath.match(normalizeFilenames);
if (match != null) {
const [, matches] = match;
normalizedFilePath = matches.reduce((acc, m) => acc.replace(m, ''), filePath);
}
}
from bundlewatch.
Thanks for reporting this. This is definitely annoying when all your files aren't matching with normalizeFilenames
, I encountered this recently and I had to do like you said, use an optional group.
Would you like to send a pull request with tests? I will be happy to review it.
from bundlewatch.
Related Issues (20)
- Bundlewatch Github status not working? HOT 11
- Unable to fetch fileDetails for baseBranch=master code=Request failed with status code 404 HOT 3
- Fundamental instructions missing from documentation HOT 6
- Feature request - use the Checks API rather than the status API to put comparison table directly into the repo as a markdown table (solves the url length problem)
- Feature request - compress URLs to better handle a bit more data in the url HOT 1
- [FEATURE] bundlewatch a whole folder
- High severity vulnerability (axios) HOT 2
- Bundlewatch results breakdown seems broken HOT 1
- Branches with slash (`/`) in their name are not supporten in GitHub Actions HOT 1
- Default branches other than `master` ar not supported
- Bundlewatch throws an exception if there is no package.json in the current directory.
- Support for GitLab (and self hosted GitLab) HOT 1
- Difficulty accessing short URLs
- feature request
- Just reporting bundlewatch.io seems to be down HOT 9
- Results page is down with 494 Error status code HOT 1
- Custom context for reporting on github HOT 1
- Getting 404 NPM error HOT 1
- Axios security issues HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundlewatch.