Comments (6)
I'm prepared to move forward with that idea. I don't think we should be trying to workaround bugs in old versions of external software. If that were to happen again, it needs to be fixed in that project, not this one.
from isomorphic-git.
It's a good idea, but note that if you do not create a PR probably no one will.
There are also a lot of unit tests so if they pass probably the function is ok.
Sorry, I'm not an expert to see if the function is current or not by looking at the code. I also don't know what the old code was doing.
from isomorphic-git.
Thanks for your advice @jcubic
I just created a PR with the performance improvement.
I hope it could be integrated and release soon
from isomorphic-git.
🎉 This issue has been resolved in version 1.25.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
from isomorphic-git.
I would much prefer if we used path.posix.normalize when running in Node.js rather than any sort of custom implementation. I don't like the use of a global memorization map. That's a poor practice in Node.js. And this function is already accelerated in Node.js. In the browser, it's not as much of an issue since the script is running per page load (thus naturally scoped).
There are two slight differences when using path.posix.normalize, though I think those could be added as a check in a wrapper. I'd be fine with that.
If we want to proceed, I'd be willing to figure what needs to be done to make use of the function from Node.js when running in that environment.
from isomorphic-git.
Hi @mojavelinux, I see your point, I was able to make the test test-utils-join.js
path with this implementation:
const path = require('path').posix || require('path')
export function normalizePath(str) {
let n = path.normalize(str)
if (n === './') {
n = '.'
}
return n
}
Performance wise it was roughly the same as the implementation proposed (the actual one merged recently, not the previous one)
I looked a bit more deeply how this method is used and why it exist and it seems it is only used by the join.js
file.
And when looking at the join.js
file it seems it has been created because path.posix.join
seemed to be undefined in webpack at that time.
Maybe we could get rid of both join.js
and normalizePath.js
if the path.posix.join
method works with current webpack.
I have not tested that approach yet but I think it will go the way you are suggesting @mojavelinux.
from isomorphic-git.
Related Issues (20)
- Get diff / patch list from commit HOT 6
- The `statusMatrix` throw a TypeError when use in the browser with `memfs` HOT 4
- Git.readBlob is too slow. HOT 9
- Properly propagate error encountered when reading response from git-upload-pack POST request HOT 4
- No shallow directory error HOT 3
- isPromiseFs fails on Deno HOT 9
- pushing a tag to a target branch fail HOT 1
- Empty response from git server when using code bundler HOT 33
- Pushing returning 401 Error: No Anonymous Write Access HOT 6
- Tests are failing on Android HOT 15
- Cloning empty repository fails if git server uses git >= 2.41.0 HOT 5
- Getting a 404 with azure devops HOT 1
- not respecting server capabilities ( report-status ) HOT 1
- How can I abort a push operation on Node? AbortController seems to be not supported. HOT 2
- Codespell workflow needs approval
- Disable failing test that require credentials on Azure DevOps HOT 14
- Race condition makes it possible for a ref to be resolved to an empty string while it's in the middle of being updated HOT 16
- Invalid refs should throw HOT 11
- Isomorphic git functionality is broken on any browser
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 isomorphic-git.