nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: blacksmithgu/obsidian-dataview
Pull request #2543 (2025-03-15 15:02:40)

Feature DQL first non-null value of a list
To be used in conjunction with defining inline fields in sublists/-tasks, and/or just to extract the first non-null value of any given list.


Patch:
diff --git a/docs/docs/reference/functions.md b/docs/docs/reference/functions.md
index fe5cb48..1a75692 100644
--- a/docs/docs/reference/functions.md
+++ b/docs/docs/reference/functions.md
@@ -432,6 +432,15 @@ nonnull([null, false]) = [false]
 nonnull([1, 2, 3]) = [1, 2, 3]
 ```
 
+### `firstvalue(array)`
+
+Return the first non-null value from the array, as a single element. This can be used to pick the first defined field in the children of a task/list item, like in `firstvalue(children.myField)`.
+
+```js
+firstvalue([null, 1, 2]) => 1
+firstvalue(children.myField) => If children.myField equals [null, null, "myValue", null], it would return "myValue"
+```
+
 ### `all(array)`
 
 Returns `true` only if ALL values in the array are truthy. You can also pass multiple arguments to this function, in
diff --git a/src/expression/functions.ts b/src/expression/functions.ts
index f299436..3146950 100644
--- a/src/expression/functions.ts
+++ b/src/expression/functions.ts
@@ -878,6 +878,16 @@ export namespace DefaultFunctions {
         })
         .add1("null", () => null)
         .build();
+
+    // Returns the first non-null value from the array as a single element
+    export const firstvalue = new FunctionBuilder("firstvalue")
+        .add1("array", a => {
+            let nonnull = a.filter(v => Values.typeOf(v) != "null");
+            let res = nonnull.length != 0 ? nonnull[0] : null;
+            return res;
+        })
+        .add1("null", () => null)
+        .build();
 }
 
 /** Default function implementations for the expression evaluator. */
@@ -919,6 +929,7 @@ export const DEFAULT_FUNCTIONS: Record<string, FunctionImpl> = {
     reverse: DefaultFunctions.reverse,
     length: DefaultFunctions.length,
     nonnull: DefaultFunctions.nonnull,
+    firstvalue: DefaultFunctions.firstvalue,
     all: DefaultFunctions.all,
     any: DefaultFunctions.any,
     none: DefaultFunctions.none,


Test patch:
diff --git a/src/test/function/aggregation.test.ts b/src/test/function/aggregation.test.ts
index c33089d..1f38a59 100644
--- a/src/test/function/aggregation.test.ts
+++ b/src/test/function/aggregation.test.ts
@@ -83,3 +83,10 @@ describe("nonnull()", () => {
     test("empty", () => expectEvals("nonnull([])", []));
     test("[null, false]", () => expectEvals("nonnull([null, false])", [false]));
 });
+
+describe("firstvalue()", () => {
+    test("empty", () => expectEvals("firstvalue([])", null));
+    test("null", () => expectEvals("firstvalue(null)", null));
+    test("[1, 2, 3]", () => expectEvals("firstvalue([1, 2, 3])", 1));
+    test("[null, 1, 2]", () => expectEvals("firstvalue([null, 1, 2])", 1));
+});
Repository: blitz-js/superjson
Pull request #60 (2020-09-18 21:33:37)

Fix deserialize should accept `undefined`
👋🏻 

Related to https://github.com/blitz-js/superjson/issues/48

Let me know if any changes needed :)

Skn0tt: @all-contributors please add jorisre for code
allcontributors[bot]: @Skn0tt 

I've put up [a pull request](https://github.com/blitz-js/superjson/pull/61) to add @jorisre! :tada:

Patch:
diff --git a/src/types.ts b/src/types.ts
index a13bc69..df2ea4e 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -43,7 +43,7 @@ export interface SuperJSONResult {
 }
 
 export function isSuperJSONResult(object: any): object is SuperJSONResult {
-  if (isUndefined(object.json)) {
+  if (!('json' in object)) {
     return false;
   }
 


Test patch:
diff --git a/src/index.test.ts b/src/index.test.ts
index 70c694d..5c1569e 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -444,6 +444,12 @@ describe('stringify & parse', () => {
         },
       },
     },
+
+    'works for undefined, issue #48': {
+      input: undefined,
+      output: undefined,
+      outputAnnotations: { values: ['undefined'] },
+    },
   };
 
   function deepFreeze(object: any, alreadySeenObjects = new Set()) {
Repository: blitz-js/superjson
Pull request #64 (2020-09-23 05:40:51)

Transform undefined => null
Transformers shall always go from a JSON-incompatible
value to a JSON-compatible one.
Before, the `undefined` transformer
didn't change anything about the value,
so JSON.stringify had an effect: it changed undefined => null.
This commit fixes the transformer, so that no surprises happen
during serialisation.

While this changes the behaviour of `.serialize`,
this change is not considered breaking b/c it behaves the same
in the context of serialisation.


Patch:
diff --git a/src/transformer.ts b/src/transformer.ts
index 2f21547..413c8bb 100644
--- a/src/transformer.ts
+++ b/src/transformer.ts
@@ -69,7 +69,7 @@ const simpleRules = [
   simpleTransformation(
     isUndefined,
     'undefined',
-    () => undefined,
+    () => null,
     () => undefined
   ),
   simpleTransformation(isBigint, 'bigint', v => v.toString(), BigInt),


Test patch:
diff --git a/src/annotator.test.ts b/src/annotator.test.ts
index 5b35371..6d00ddd 100644
--- a/src/annotator.test.ts
+++ b/src/annotator.test.ts
@@ -10,7 +10,7 @@ describe('annotator', () => {
         path: ['a', 1, 'b'],
         node: undefined,
       })
-    ).toBe(undefined);
+    ).toBe(null);
 
     expect(getAnnotations()).toEqual({
       values: {
diff --git a/src/index.test.ts b/src/index.test.ts
index 585bd86..4638741 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -43,7 +43,7 @@ describe('stringify & parse', () => {
         a: [1, undefined, 2],
       },
       output: {
-        a: [1, undefined, 2],
+        a: [1, null, 2],
       },
       outputAnnotations: {
         values: {
@@ -57,7 +57,7 @@ describe('stringify & parse', () => {
         a: new Set([1, undefined, 2]),
       },
       output: {
-        a: [1, undefined, 2],
+        a: [1, null, 2],
       },
       outputAnnotations: {
         values: {
@@ -68,7 +68,7 @@ describe('stringify & parse', () => {
 
     'works for top-level Sets': {
       input: new Set([1, undefined, 2]),
-      output: [1, undefined, 2],
+      output: [1, null, 2],
       outputAnnotations: {
         values: ['set', { 1: ['undefined'] }],
       },
@@ -429,7 +429,7 @@ describe('stringify & parse', () => {
         q: [
           9,
           {
-            henlo: undefined,
+            henlo: null,
             yee: new Date(2020, 1, 1).toISOString(),
             yee2: new Date(2020, 1, 1).toISOString(),
             foo1: new Date(2020, 1, 1).toISOString(),
@@ -450,7 +450,7 @@ describe('stringify & parse', () => {
 
     'works for undefined, issue #48': {
       input: undefined,
-      output: undefined,
+      output: null,
       outputAnnotations: { values: ['undefined'] },
     },
   };
Repository: blitz-js/superjson
Pull request #84 (2020-12-25 11:29:35)

Negative zero support
#83 


:warning: I honestly don't know when one would ever use negative zero and I'd rather see the serialization throw errors on `NaN`/`-0`/`Infinity`/`-Infinity`

Skn0tt: LGTM! Thanks for this well-done PR.

> ⚠️ I honestly don't know when one would ever use negative zero and I'd rather see the serialization throw errors on NaN/-0/Infinity/-Infinity

Currently, SuperJSON is aiming for feature-parity with JS values.
Adding support for `-0` fits that, so I'm going to merge that.

That being said, we should definitely have a discussion about wether that's the right path to go. I saw you already opened that one over on https://github.com/blitz-js/superjson/issues/85. See you there ^^


Patch:
diff --git a/src/transformer.ts b/src/transformer.ts
index 0aee497..6b31033 100644
--- a/src/transformer.ts
+++ b/src/transformer.ts
@@ -150,6 +150,15 @@ const simpleRules = [
     },
     Number
   ),
+
+  simpleTransformation<number, '-0', 'number'>(
+    (v): v is number => v === 0 && 1 / v === -Infinity,
+    'number',
+    () => {
+      return '-0';
+    },
+    Number
+  ),
 ];
 
 function compositeTransformation<I, O, A extends CompositeTypeAnnotation>(


Test patch:
diff --git a/src/index.test.ts b/src/index.test.ts
index bfebe31..d5d99bc 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -740,3 +740,16 @@ describe('stringify & parse', () => {
     expect(error.customProperty).toEqual(10);
   });
 });
+
+test('regression #83: negative zero', () => {
+  const input = -0;
+
+  const stringified = SuperJSON.stringify(input);
+  expect(stringified).toMatchInlineSnapshot(
+    `"{\\"json\\":\\"-0\\",\\"meta\\":{\\"values\\":[\\"number\\"]}}"`
+  );
+
+  const parsed: number = SuperJSON.parse(stringified);
+
+  expect(1 / parsed).toBe(-Infinity);
+});
diff --git a/src/is.test.ts b/src/is.test.ts
index aada70b..54c8ade 100644
--- a/src/is.test.ts
+++ b/src/is.test.ts
@@ -59,6 +59,7 @@ test('Primitive tests', () => {
   expect(isPrimitive([])).toBe(false);
   expect(isPrimitive([])).toBe(false);
   expect(isPrimitive({})).toBe(false);
+  // eslint-disable-next-line no-new-object
   expect(isPrimitive(new Object())).toBe(false);
   expect(isPrimitive(new Date())).toBe(false);
   expect(isPrimitive(() => {})).toBe(false);
Repository: blitz-js/superjson
Pull request #95 (2021-01-23 01:56:20)

fix - don't set meta if empty
causes issues in next if trying to serialize `[]`

(try using `serialize([])` in `getStaticProps()`)


Patch:
diff --git a/src/index.ts b/src/index.ts
index 9a3926c..52caaac 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -21,11 +21,13 @@ export const serialize = (object: SuperJSONValue): SuperJSONResult => {
   const output = plainer(object, annotator);
 
   const annotations = getAnnotations();
-
-  return {
+  const res: SuperJSONResult = {
     json: output,
-    meta: isEmptyObject(annotations) ? undefined : annotations,
   };
+  if (!isEmptyObject(annotations)) {
+    res.meta = annotations;
+  }
+  return res;
 };
 
 export const deserialize = <T = unknown>(payload: SuperJSONResult): T => {


Test patch:
diff --git a/src/index.test.ts b/src/index.test.ts
index e83d68e..e483fcb 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -791,3 +791,14 @@ test('regression #83: negative zero', () => {
 
   expect(1 / parsed).toBe(-Infinity);
 });
+
+test('regression #95: no undefined', () => {
+  const input: unknown[] = [];
+
+  const out = SuperJSON.serialize(input);
+  expect(out).not.toHaveProperty('meta');
+
+  const parsed: number = SuperJSON.deserialize(out);
+
+  expect(parsed).toEqual(input);
+});
Repository: blitz-js/superjson
Pull request #160 (2021-11-01 09:39:51)

drop "debug" dependency
This PR reduces bundle size by dropping the "debug" dependency.


Patch:
diff --git a/package.json b/package.json
index 55ec252..dc7b1d0 100644
--- a/package.json
+++ b/package.json
@@ -68,8 +68,7 @@
     "typescript": "^4.2.4"
   },
   "dependencies": {
-    "copy-anything": "^3.0.2",
-    "debug": "^4.3.1"
+    "copy-anything": "^3.0.2"
   },
   "resolutions": {
     "**/@typescript-eslint/eslint-plugin": "^4.11.1",
diff --git a/src/registry.ts b/src/registry.ts
index 236ef22..4b66e63 100644
--- a/src/registry.ts
+++ b/src/registry.ts
@@ -1,7 +1,4 @@
 import { DoubleIndexedKV } from './double-indexed-kv';
-import createDebug from 'debug';
-
-const debug = createDebug('superjson');
 
 export class Registry<T> {
   private kv = new DoubleIndexedKV<string, T>();
@@ -20,7 +17,9 @@ export class Registry<T> {
     if (process.env.NODE_ENV !== 'production') {
       const alreadyRegistered = this.kv.getByKey(identifier);
       if (alreadyRegistered && alreadyRegistered !== value) {
-        debug(`Ambiguous class "${identifier}", provide a unique identifier.`);
+        console.debug(
+          `Ambiguous class "${identifier}", provide a unique identifier.`
+        );
       }
     }
 
diff --git a/yarn.lock b/yarn.lock
index cf56728..73565c4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2555,13 +2555,6 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
   dependencies:
     ms "^2.1.1"
 
-debug@^4.3.1:
-  version "4.3.1"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
-  integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
-  dependencies:
-    ms "2.1.2"
-
 decamelize@^1.2.0:
   version "1.2.0"
   resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz"
@@ -4915,7 +4908,7 @@ ms@2.0.0:
   resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz"
   integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
 
-ms@2.1.2, ms@^2.1.1:
+ms@^2.1.1:
   version "2.1.2"
   resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz"
   integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==


Test patch:
diff --git a/src/registry.test.ts b/src/registry.test.ts
index 0538929..ec450d2 100644
--- a/src/registry.test.ts
+++ b/src/registry.test.ts
@@ -1,4 +1,3 @@
-import debug from 'debug';
 import { Registry } from './registry';
 import { Class } from './types';
 
@@ -17,8 +16,7 @@ test('class registry', () => {
 
   expect(() => registry.register(Car)).not.toThrow();
 
-  debug.enable('superjson');
-  const warnSpy = jest.spyOn(process.stderr, 'write');
+  const warnSpy = jest.spyOn(console, 'debug');
 
   registry.register(class Car {});
   expect(warnSpy).toHaveBeenCalledTimes(1);
Repository: blitz-js/superjson
Pull request #204 (2022-10-09 16:40:50)

More performant check of isPlainObject
Before:
```
toy example x 89,736 ops/sec ±0.91% (97 runs sampled)
user graph x 21,863 ops/sec ±0.37% (90 runs sampled)
deep nested x 21.42 ops/sec ±1.54% (40 runs sampled)
```
After:
```
toy example x 94,658 ops/sec ±1.14% (92 runs sampled)
user graph x 23,187 ops/sec ±0.38% (96 runs sampled)
deep nested x 22.04 ops/sec ±1.26% (41 runs sampled)
```

Also, `isPlainObject` would return true on `Object.prototype` which is now fixed and added to the tests.


Patch:
diff --git a/src/is.ts b/src/is.ts
index 5eedac6..4644900 100644
--- a/src/is.ts
+++ b/src/is.ts
@@ -9,9 +9,10 @@ export const isNull = (payload: any): payload is null => payload === null;
 export const isPlainObject = (
   payload: any
 ): payload is { [key: string]: any } => {
-  if (getType(payload) !== 'Object') return false;
-  if (Object.getPrototypeOf(payload) === null) return true;
+  if (typeof payload !== 'object' || payload === null) return false;
   if (payload === Object.prototype) return false;
+  if (Object.getPrototypeOf(payload) === null) return true;
+
   return (
     payload.constructor === Object &&
     Object.getPrototypeOf(payload) === Object.prototype


Test patch:
diff --git a/src/is.test.ts b/src/is.test.ts
index 5d2318f..793f34a 100644
--- a/src/is.test.ts
+++ b/src/is.test.ts
@@ -33,6 +33,9 @@ test('Basic true tests', () => {
   expect(isSymbol(Symbol())).toBe(true);
   expect(isTypedArray(new Uint8Array())).toBe(true);
   expect(isURL(new URL('https://example.com'))).toBe(true);
+  expect(isPlainObject({})).toBe(true);
+  // eslint-disable-next-line no-new-object
+  expect(isPlainObject(new Object())).toBe(true);
 });
 
 test('Basic false tests', () => {
@@ -52,6 +55,11 @@ test('Basic false tests', () => {
   expect(isTypedArray([])).toBe(false);
 
   expect(isURL('https://example.com')).toBe(false);
+
+  expect(isPlainObject(null)).toBe(false);
+  expect(isPlainObject([])).toBe(false);
+  expect(isPlainObject(Object.prototype)).toBe(false);
+  expect(isPlainObject(Object.create(Array.prototype))).toBe(false);
 });
 
 test('Primitive tests', () => {
Repository: blitz-js/superjson
Pull request #221 (2023-01-15 16:30:37)

Fix applying referential equality inside maps and sets
Fairly straight-forward fix plus test case for an issue I noticed when deserializing complex structures with maps and referential equality.


Patch:
diff --git a/src/accessDeep.ts b/src/accessDeep.ts
index 8aa5151..989a5cc 100644
--- a/src/accessDeep.ts
+++ b/src/accessDeep.ts
@@ -26,9 +26,27 @@ function validatePath(path: (string | number)[]) {
 export const getDeep = (object: object, path: (string | number)[]): object => {
   validatePath(path);
 
-  path.forEach(key => {
-    object = (object as any)[key];
-  });
+  for (let i = 0; i < path.length; i++) {
+    const key = path[i];
+    if (isSet(object)) {
+      object = getNthKey(object, +key);
+    } else if (isMap(object)) {
+      const row = +key;
+      const type = +path[++i] === 0 ? 'key' : 'value';
+
+      const keyOfRow = getNthKey(object, row);
+      switch (type) {
+        case 'key':
+          object = keyOfRow;
+          break;
+        case 'value':
+          object = object.get(keyOfRow);
+          break;
+      }
+    } else {
+      object = (object as any)[key];
+    }
+  }
 
   return object;
 };


Test patch:
diff --git a/src/index.test.ts b/src/index.test.ts
index 7c90966..14e21e2 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -434,6 +434,39 @@ describe('stringify & parse', () => {
       },
     },
 
+    'works for referentially equal values in different maps and sets': {
+      input: () => {
+        const user = { id: 2 };
+
+        return {
+          workspaces: new Map([
+            [1, { users: new Set([user]) }],
+            [2, { users: new Set([user]) }],
+          ]),
+        };
+      },
+      output: {
+        workspaces: [
+          [1, { users: [{ id: 2 }] }],
+          [2, { users: [{ id: 2 }] }],
+        ],
+      },
+      outputAnnotations: {
+        values: {
+          workspaces: [
+            'map',
+            {
+              '0.1.users': ['set'],
+              '1.1.users': ['set'],
+            },
+          ],
+        },
+        referentialEqualities: {
+          'workspaces.0.1.users.0': ['workspaces.1.1.users.0'],
+        },
+      },
+    },
+
     'works for symbols': {
       skipOnNode10: true,
       input: () => {
Repository: Rezact/Rezact
Pull request #12 (2023-09-26 13:27:52)

fixed attribute set bug and snapshot for previous test and merge
fixed attribute set bug and snapshot for previous test and merge


Patch:
diff --git a/src/lib/rezact/signals.ts b/src/lib/rezact/signals.ts
index 38aba92..12744a7 100644
--- a/src/lib/rezact/signals.ts
+++ b/src/lib/rezact/signals.ts
@@ -248,7 +248,7 @@ const attributeStateHandler = {
         );
       }
     } else {
-      elm.setAttribute(key, attrVal.value);
+      elm.setAttribute(key, attrVal.getValue());
       attrVal.subscribe({ funcRef: attrSub, obj: { elm, key } }, { elm });
     }
   },


Test patch:
diff --git a/src/examples/SimpleStringListState/__snapshots__/simpleStringListState.test.ts.snap b/src/examples/SimpleStringListState/__snapshots__/simpleStringListState.test.ts.snap
index 9a42a4f..7b67ee3 100644
--- a/src/examples/SimpleStringListState/__snapshots__/simpleStringListState.test.ts.snap
+++ b/src/examples/SimpleStringListState/__snapshots__/simpleStringListState.test.ts.snap
@@ -1,5 +1,5 @@
 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
 
-exports[`Simple String List State > Renders both input list and output list 1`] = `"<h1>Simple String List</h1><!--start map--><div dataval=\\"[object Text]\\"><input></div><div dataval=\\"[object Text]\\"><input></div><div dataval=\\"[object Text]\\"><input></div><div dataval=\\"[object Text]\\"><input></div><!--end map--><!--start map--><div>Jack</div><div>Jill</div><div>John</div><div>Jane</div><!--end map--><!--signal-->"`;
+exports[`Simple String List State > Renders both input list and output list 1`] = `"<h1>Simple String List</h1><!--start map--><div dataval=\\"Jack\\"><input></div><div dataval=\\"Jill\\"><input></div><div dataval=\\"John\\"><input></div><div dataval=\\"Jane\\"><input></div><!--end map--><!--start map--><div>Jack</div><div>Jill</div><div>John</div><div>Jane</div><!--end map--><!--signal-->"`;
 
 exports[`Simple String List State > updates state when input is changed 1`] = `"<h1>Simple String List</h1><!--start map--><div dataval=\\"Jackhello\\"><input></div><div dataval=\\"Jillhello\\"><input></div><div dataval=\\"Johnhello\\"><input></div><div dataval=\\"Janehello\\"><input></div><!--end map--><!--start map--><div>Jackhello</div><div>Jillhello</div><div>Johnhello</div><div>Janehello</div><!--end map--><!--signal-->"`;
Repository: MarvinJWendt/testza
Pull request #62 (2021-11-02 01:11:29)

feat: added startup information output


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 574272f..a75b2f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
 ## [Unreleased]
 
 ### Features
+- added startup information output
 - **assert:** added AssertNoDirExists and AssertDirExists. fixes [#36](https://github.com/MarvinJWendt/testza/issues/36)
 - **configuration:** added `SetRandomSeed`
 
diff --git a/README.md b/README.md
index 5d90506..4c1b286 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
 </a>
 
 <a href="https://codecov.io/gh/MarvinJWendt/testza">
-<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-2743-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
+<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-2753-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
 </a>
   
 <a href="https://pkg.go.dev/github.com/MarvinJWendt/testza" target="_blank">
diff --git a/go.mod b/go.mod
index deab90c..8359616 100644
--- a/go.mod
+++ b/go.mod
@@ -4,6 +4,7 @@ go 1.15
 
 require (
 	github.com/davecgh/go-spew v1.1.1
+	github.com/klauspost/cpuid/v2 v2.0.9
 	github.com/pmezard/go-difflib v1.0.0
 	github.com/pterm/pterm v0.12.33
 )
diff --git a/go.sum b/go.sum
index f564ea0..eac91e4 100644
--- a/go.sum
+++ b/go.sum
@@ -9,6 +9,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/gookit/color v1.4.2 h1:tXy44JFSFkKnELV6WaMo/lLfu/meqITX3iAV52do7lk=
 github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ=
+github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
+github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
 github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=


Test patch:
diff --git a/testza.go b/testza.go
index 27c4583..9c462d5 100644
--- a/testza.go
+++ b/testza.go
@@ -1,13 +1,24 @@
 package testza
 
 import (
+	"fmt"
 	"math/rand"
+	"runtime"
 	"time"
+
+	"github.com/klauspost/cpuid/v2"
+	"github.com/pterm/pterm"
 )
 
 var randomSeed int64
+var infoPrinter = pterm.DefaultSection.WithStyle(pterm.NewStyle(pterm.FgMagenta)).WithLevel(2).WithBottomPadding(0).WithTopPadding(0)
+var secondary = pterm.LightCyan
 
 func init() {
 	randomSeed = time.Now().UnixNano()
 	rand.Seed(randomSeed)
+	infoPrinter.WithLevel(1).Println("Running tests with " + secondary("Testza"))
+	infoPrinter.Printfln(`Using seed "%s" for random operations`, secondary(randomSeed))
+	infoPrinter.Printfln(`System info: OS=%s | arch=%s | cpu=%s | go=%s`, secondary(runtime.GOOS), secondary(runtime.GOARCH), secondary(cpuid.CPU.BrandName), secondary(runtime.Version()))
+	fmt.Println()
 }