aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-framework-next/server-polyfills.tsx
blob: d34c08fc5ba96992300e0164afea164cc6a998af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
globalThis.global = globalThis;

import { Buffer } from "buffer";

globalThis.Buffer = Buffer;

import * as React from "react";

class URL {
  constructor(base, source) {
    this.pathname = source;
    this.href = base + source;
  }
}
var onlyChildPolyfill = React.Children.only;

React.Children.only = function (children) {
  if (children && typeof children === "object" && children.length == 1) {
    return onlyChildPolyfill(children[0]);
  }

  return onlyChildPolyfill(children);
};

globalThis.URL = URL;

import { TextEncoder, TextDecoder } from "./text-encoder-polyfill";

globalThis.TextEncoder ||= TextEncoder;
globalThis.TextDecoder ||= TextDecoder;
766d&follow=1'>Show API URL endpoints in user interfaceGravatar Frédéric Guillot 11-14/+99 2018-01-29Do not update entry date while refreshing a feedGravatar Frédéric Guillot 1-4/+5 2018-01-29Enable debug mode for integration testsGravatar Frédéric Guillot 1-1/+1 2018-01-29Add the possiblity to enable debug mode with an environment variableGravatar Frédéric Guillot 2-1/+6 2018-01-29Keep code base tidyGravatar Frédéric Guillot 5-18/+16 2018-01-29Add flag to enable debug loggingGravatar Rogier Lommers 2-7/+64 2018-01-25Improve unread counter updatesGravatar Mahendra Kalkura 1-6/+35