unrift 0.4.1 → 0.5.0

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/README.md CHANGED
@@ -14,16 +14,16 @@ A lightweight, fast TypeScript test framework with ESM-first design.
14
14
  ## Features
15
15
 
16
16
  - **ESM-first** with CJS fallback
17
- - **TypeScript native** — esbuild-powered transforms, no separate compile step
18
- - **Familiar API** — `describe` / `it` / `expect` (Jest/Vitest compatible)
19
- - **Rich matcher set** — deep equality, `toMatchObject`, `toHaveProperty`, numeric, async, and more
17
+ - **TypeScript native** - esbuild-powered transforms, no separate compile step
18
+ - **Familiar API** - `describe` / `it` / `expect` (Jest/Vitest compatible)
19
+ - **Rich matcher set** - deep equality, `toMatchObject`, `toHaveProperty`, numeric, async, and more
20
20
  - **Extensible matchers** via `expect.extend()`
21
- - **Async assertions** — `resolves` / `rejects` with full `.not` support
22
- - **Test modifiers** — `.only`, `.skip`, `.todo`
21
+ - **Async assertions** - `resolves` / `rejects` with full `.not` support
22
+ - **Test modifiers** - `.only`, `.skip`, `.todo`
23
23
  - **Bail mode** and configurable timeouts
24
24
  - **JSON output** for CI integration
25
- - **Programmatic API** — `runEngine` for use in custom tooling
26
- - **Zero config** — works out of the box
25
+ - **Programmatic API** - `runEngine` for use in custom tooling
26
+ - **Zero config** - works out of the box
27
27
 
28
28
  ## Install
29
29
 
package/bin/unrift.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
- // Run the real CLI
4
+ // Run the real CLI. It imports @unrift/core's CLI, which installs the
5
+ // module-mock loader itself - so this wrapper bin needs no bootstrap logic.
5
6
  await import("../dist/esm/cli.js");
@@ -1,3 +1,3 @@
1
- export { beforeEach, afterEach, beforeAll, afterAll, defineConfig, describe, it, test, expect, extendMatchers, runEngine, } from "@unrift/core";
2
- export type { Matchers, ExpectInterface, MatcherContext, MatcherFn, MatcherMap, Promisable, RunEngineResult, UnriftConfigOptions, } from "@unrift/core";
1
+ export { beforeEach, afterEach, beforeAll, afterAll, defineConfig, describe, it, test, expect, extendMatchers, runEngine, mock, spy, spyOn, isSpy, mockObject, mockClass, stub, mockGlobal, mockFetch, mockFetchOnce, useFakeTimers, useRealTimers, advanceTimersByTime, advanceTimersByTimeAsync, runAllTimers, runAllTimersAsync, runOnlyPendingTimers, runOnlyPendingTimersAsync, getTimerCount, setSystemTime, getRealSystemTime, doMock, unmock, listMockedSpecs, fromModule, mockFs, clearAllMocks, resetAllMocks, restoreAllMocks, } from "@unrift/core";
2
+ export type { Matchers, ExpectInterface, MatcherContext, MatcherFn, MatcherMap, Promisable, RunEngineResult, UnriftConfigOptions, Spy, MockState, MockResult, MockFetch, FetchMatcher, MockResponseInit, MockFetchResponse, UseFakeTimersOptions, FakeableApi, LoaderMessage, FakeFsHandle, FakeFsState, } from "@unrift/core";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,MAAM,EACN,cAAc,EACd,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,SAAS,EACT,UAAU,EACV,UAAU,EACV,eAAe,EACf,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,MAAM,EACN,cAAc,EACd,SAAS,EACT,IAAI,EACJ,GAAG,EACH,KAAK,EACL,KAAK,EACL,UAAU,EACV,SAAS,EACT,IAAI,EACJ,UAAU,EACV,SAAS,EACT,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,eAAe,EACf,UAAU,EACV,MAAM,EACN,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,SAAS,EACT,UAAU,EACV,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,GAAG,EACH,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,cAAc,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { beforeEach, afterEach, beforeAll, afterAll, defineConfig, describe, it, test, expect, extendMatchers, runEngine, } from "@unrift/core";
1
+ export { beforeEach, afterEach, beforeAll, afterAll, defineConfig, describe, it, test, expect, extendMatchers, runEngine, mock, spy, spyOn, isSpy, mockObject, mockClass, stub, mockGlobal, mockFetch, mockFetchOnce, useFakeTimers, useRealTimers, advanceTimersByTime, advanceTimersByTimeAsync, runAllTimers, runAllTimersAsync, runOnlyPendingTimers, runOnlyPendingTimersAsync, getTimerCount, setSystemTime, getRealSystemTime, doMock, unmock, listMockedSpecs, fromModule, mockFs, clearAllMocks, resetAllMocks, restoreAllMocks, } from "@unrift/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unrift",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "A lightweight TypeScript test framework",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@unrift/core": "^0.3.0"
61
+ "@unrift/core": "^0.4.0"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "tsc -p tsconfig.build.esm.json && node scripts/write-cjs-shim.js",