- Running `yarn build` in a `packages/*/` directory will trigger build of all dependencies too, and cache them if possible. - Fix for `yarn dev` breaking for `rrweb` package whenever changing files in `rrweb` package - Update typescript, turbo, vite and vite-plugin-dts - Require `workspaces-to-typescript-project-references` from `prepublish`
12 lines
340 B
TypeScript
12 lines
340 B
TypeScript
import { strFromU8, strToU8, zlibSync } from 'fflate';
|
|
import type { PackFn } from '@rrweb/types';
|
|
import { type eventWithTimeAndPacker, MARK } from './base';
|
|
|
|
export const pack: PackFn = (event) => {
|
|
const _e: eventWithTimeAndPacker = {
|
|
...event,
|
|
v: MARK,
|
|
};
|
|
return strFromU8(zlibSync(strToU8(JSON.stringify(_e))), true);
|
|
};
|