@posthog/core 1.43.0 → 1.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gzip.js CHANGED
@@ -90,7 +90,7 @@ const validateNativeGzip = async (compressed, inputBytes)=>{
90
90
  async function gzipCompress(input, isDebug = true, options) {
91
91
  try {
92
92
  const inputBytes = new TextEncoder().encode(input);
93
- const compressedStream = new CompressionStream('gzip');
93
+ const compressedStream = new globalThis.CompressionStream('gzip');
94
94
  const writer = compressedStream.writable.getWriter();
95
95
  const writePromise = writer.write(inputBytes).then(()=>writer.close()).catch(async (err)=>{
96
96
  try {
package/dist/gzip.mjs CHANGED
@@ -57,7 +57,7 @@ const validateNativeGzip = async (compressed, inputBytes)=>{
57
57
  async function gzipCompress(input, isDebug = true, options) {
58
58
  try {
59
59
  const inputBytes = new TextEncoder().encode(input);
60
- const compressedStream = new CompressionStream('gzip');
60
+ const compressedStream = new globalThis.CompressionStream('gzip');
61
61
  const writer = compressedStream.writable.getWriter();
62
62
  const writePromise = writer.write(inputBytes).then(()=>writer.close()).catch(async (err)=>{
63
63
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/core",
3
- "version": "1.43.0",
3
+ "version": "1.43.1",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
package/src/gzip.ts CHANGED
@@ -130,7 +130,7 @@ export type GzipCompressOptions = {
130
130
  export async function gzipCompress(input: string, isDebug = true, options?: GzipCompressOptions): Promise<Blob | null> {
131
131
  try {
132
132
  const inputBytes = new TextEncoder().encode(input)
133
- const compressedStream = new CompressionStream('gzip')
133
+ const compressedStream = new globalThis.CompressionStream('gzip')
134
134
  const writer = compressedStream.writable.getWriter()
135
135
 
136
136
  const writePromise = writer