syntropylog 0.9.16 → 0.9.17
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/CHANGELOG.md +8 -0
- package/dist/index.cjs +0 -1
- package/dist/index.mjs +0 -1
- package/dist/testing/BeaconRedisMock.js +1 -27
- package/dist/testing/BeaconRedisMock.js.map +1 -1
- package/dist/testing/index.cjs +1 -21421
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.mjs +1 -21421
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/testing/BeaconRedisMock.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/testing/index.cjs.map +0 -1
- package/dist/testing/index.mjs.map +0 -1
- package/dist/testing/magic-string.es-Bf6eKFmE.js +0 -2005
- package/dist/testing/magic-string.es-Bf6eKFmE.js.map +0 -1
- package/dist/testing/magic-string.es-Dl5DFuGU.js +0 -2001
- package/dist/testing/magic-string.es-Dl5DFuGU.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Reduce published package size (~6.7 MB → ~1.4 MB unpacked)**
|
|
8
|
+
- Removed vitest and inline tests from `src/testing/BeaconRedisMock.ts`; tests moved to `tests/testing/BeaconRedisMock.test.ts`. Marked `vitest` as external in Rollup for the testing bundle so it is no longer bundled (was pulling in magic-string and large deps).
|
|
9
|
+
- Disabled source maps in production build (`sourcemap: false` in Rollup) so `.map` files are not published. Tarball ~1.3 MB → ~300 KB; unpacked ~6.7 MB → ~1.4 MB.
|
|
10
|
+
|
|
3
11
|
## 0.9.16
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -4631,4 +4631,3 @@ var RedisManager$1 = /*#__PURE__*/Object.freeze({
|
|
|
4631
4631
|
});
|
|
4632
4632
|
|
|
4633
4633
|
export { AdapterTransport, ClassicConsoleTransport, ColorfulConsoleTransport, CompactConsoleTransport, ConsoleTransport, PrettyConsoleTransport, SanitizationEngine, SerializationComplexity, SerializationManager, SpyTransport, SyntropyLog, Transport, UniversalAdapter, UniversalLogFormatter, syntropyLog };
|
|
4634
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,34 +2,8 @@
|
|
|
2
2
|
* FILE: src/testing/BeaconRedisMock.ts
|
|
3
3
|
* DESCRIPTION: A mock implementation of IBeaconRedis for use in unit tests.
|
|
4
4
|
* This mock is framework agnostic and works with both Vitest and Jest.
|
|
5
|
+
* (Unit tests for createMockFn/createTransactionObject live in tests/testing/BeaconRedisMock.test.ts.)
|
|
5
6
|
*/
|
|
6
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
7
|
-
describe('BeaconRedisMock Pure Functions', () => {
|
|
8
|
-
describe('createMockFn', () => {
|
|
9
|
-
it('should throw if spyFn is not provided', () => {
|
|
10
|
-
expect(() => createMockFn(null)).toThrow('SPY FUNCTION NOT INJECTED');
|
|
11
|
-
});
|
|
12
|
-
it('should call spyFn if provided', () => {
|
|
13
|
-
const spyFn = vi.fn().mockReturnValue('mocked');
|
|
14
|
-
const result = createMockFn(spyFn);
|
|
15
|
-
expect(spyFn).toHaveBeenCalled();
|
|
16
|
-
expect(result).toBe('mocked');
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe('createTransactionObject', () => {
|
|
20
|
-
it('should return a transaction object with exec and executeScript', () => {
|
|
21
|
-
const spyFn = vi.fn().mockReturnValue({ mockResolvedValue: vi.fn() });
|
|
22
|
-
const tx = createTransactionObject(spyFn);
|
|
23
|
-
expect(tx).toHaveProperty('exec');
|
|
24
|
-
expect(tx).toHaveProperty('executeScript');
|
|
25
|
-
});
|
|
26
|
-
it('should have executeScript that throws', () => {
|
|
27
|
-
const spyFn = vi.fn().mockReturnValue({ mockResolvedValue: vi.fn() });
|
|
28
|
-
const tx = createTransactionObject(spyFn);
|
|
29
|
-
expect(() => tx.executeScript('script', [], [])).toThrow('SCRIPT execution not supported');
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
7
|
// Function that throws error for Lua script execution in transaction - outside of any mock context
|
|
34
8
|
const throwScriptError = () => {
|
|
35
9
|
throw new Error('SCRIPT execution not supported in transaction (mocked BeaconRedisMock)');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeaconRedisMock.js","sourceRoot":"","sources":["../../src/testing/BeaconRedisMock.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BeaconRedisMock.js","sourceRoot":"","sources":["../../src/testing/BeaconRedisMock.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,mGAAmG;AACnG,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;AACJ,CAAC,CAAC;AAEF,wDAAwD;AACxD,MAAM,wBAAwB,GAAG,GAAU,EAAE;IAC3C,MAAM,IAAI,KAAK,CAAC;;;;;;;;;;;;;;;;;;;OAmBX,CAAC,CAAC;AACT,CAAC,CAAC;AAEF,uEAAuE;AACvE,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,KAA6C,EAC7C,cAAoB,EACpB,EAAE;IACF,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,wBAAwB,EAAE,CAAC;IAC7B,CAAC;IACD,OAAO,KAAM,CAAC,cAAc,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,2CAA2C;AAC3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,KAA6C,EACpB,EAAE;IAC3B,OAAO;QACL,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC/C,0EAA0E;QAC1E,aAAa,EAAE,gBAA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