import fs from 'fs';
import * as git from 'isomorphic-git';
git.plugins.set('fs', fs);
Produces:
TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
src/git.ts:8:5 - error TS2339: Property 'plugins' does not exist on type 'typeof import("node_modules/isomorphic-git/index")'.
version:
"isomorphic-git": "^1.0.0",
I can't figure out how the typescript types are built, so haven't had any luck trying to figure out how to patch this. It looks to me like the typing requires fs and http be passed to every call, while if I read the docs properly, those can be set once and then omitted on each call. But that doesn't seem to work with typescript, at least for me. Sorry I can't provide a more specific bug report. Feel free to point me in the right direction and I'll try to submit a PR.
PS> Thanks for this awesome package, it's phenomenal to be able to use git as a backend in the browser.
Yup! The plugin system is gone in version 1.0. If there's still part of the docs that says you can set it once, then I need to update those pages.
It's a little annoying, but in practice everybody wraps isomorphic-git into some Object Oriented wrapper anyway 馃槅
@wmhilton Here鈥檚 where I saw it:
https://isomorphic-git.org/docs/en/browser
Couldn鈥檛 figure out where that is in the code...
Darn. So I actually deleted that page - I consolidated the Browser quickstart and Node quickstart pages and renamed /docs/en/browser to /docs/en/quickstart. But Docusaurus has a "clever" fallback behavior where it if a page is missing it shows the page from the most recent earlier version. So that's probably coming from the 0.78.0 docs folder even though it says 1.0.x at the top. 馃槮
On the bright side, only about a dozen people found that page today compared to the 2400 people that hit /docs/en/quickstart (https://plausible.io/isomorphic-git.org/pages)
I wonder if I can make the page redirect... [Update: yes I can!]
Hahaha! Docusuarus is completely static, so I'm not sure how to generate a nice instant 301 redirect. But I can do an old-fashioned JavaScript redirect by embedding a script in the Markdown file! behold:

It's deployed so it should work to redirect https://isomorphic-git.org/docs/en/browser now. 馃榾
Most helpful comment
Hahaha! Docusuarus is completely static, so I'm not sure how to generate a nice instant 301 redirect. But I can do an old-fashioned JavaScript redirect by embedding a script in the Markdown file! behold:
It's deployed so it should work to redirect https://isomorphic-git.org/docs/en/browser now. 馃榾