Skip to content

Commit

Permalink
feat: use import { Buffer } from 'buffer/' to be compatible with Bun (
Browse files Browse the repository at this point in the history
#486)

* fix: import buffer module with trailing slash

* fix: remove unnecessary import for buffer module
  • Loading branch information
lht102 authored Oct 20, 2024
1 parent 1591055 commit 738b2b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/persist/fileSystem.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Buffer } from 'buffer';
export interface FileSystem {
readFileSync(path: string, encoding?: string): Buffer | string;
writeFileSync(path: string, text: string, encoding?: string): void;
Expand Down
2 changes: 1 addition & 1 deletion src/util/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

import { Buffer } from 'buffer';
import { Buffer } from 'buffer/';

const ipv4Regex = /^(\d{1,3}\.){3,3}\d{1,3}$/;
const ipv6Regex = /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;
Expand Down

0 comments on commit 738b2b6

Please sign in to comment.