Skip to content

Commit

Permalink
refactor(git): import of dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino committed Aug 27, 2024
1 parent c23c584 commit f6ea21c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/git/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import { Plugin } from '@slangroom/core';
import gitpkg from 'isomorphic-git';
// TODO: why does this require index.js?
import http from 'isomorphic-git/http/node/index.js';
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import http from 'isomorphic-git/http/web/index.js';
import { promises as fs } from 'fs';
import path from 'path';
// read the version from the package.json
import packageJson from '@slangroom/git/package.json' with { type: 'json' };

Expand All @@ -24,6 +24,7 @@ export class GitError extends Error {
* @internal
*/
export const sandboxDir = () => {
if (typeof process === 'undefined') return '.';
// TODO: sanitize sandboxDir
return process.env['FILES_DIR'];
};
Expand Down

0 comments on commit f6ea21c

Please sign in to comment.