Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
450 commits
Select commit Hold shift + click to select a range
bc4ee3d
Merge branch 'fix/r9-engine-a': round-9 hashing, timing and printing …
claude Nov 17, 2026
b1932ed
Merge branch 'fix/r9-engine-b': round-9 behaviour fixes (E46-E53)
claude Nov 17, 2026
630d94e
Merge branch 'fix/r9-types': round-9 typing fixes (T54-T59)
claude Nov 17, 2026
61542f6
docs: README round 9 (WIP): returns() without a value, promises vs th…
claude Nov 17, 2026
b4e5872
docs: README round 9 (WIP): dangling checks, E47 rule, root numbering…
claude Nov 17, 2026
26593fe
docs: MIGRATION and CHANGELOG round 9 (WIP)
claude Nov 17, 2026
2dd94a9
docs: CONTRIBUTING round 9: load-scaled timing limits, T44 headroom, …
claude Nov 17, 2026
1a12cd9
docs: round 9 review fixes
claude Nov 17, 2026
5c7a338
docs: CHANGELOG: checks that nothing follows are reported later, too
claude Nov 17, 2026
4b1fa69
docs: README: module mocks of CommonJS code take a substitute, others…
claude Nov 17, 2026
5aa3388
fix: substitutes keep working after Object.setPrototypeOf (E55)
claude Nov 18, 2026
d3a5bc7
fix: lookups that only pass through a substitute record nothing (E57)
claude Nov 18, 2026
57ce562
fix(E54): print message values two levels deep, show nested matchers,…
claude Nov 18, 2026
674d89a
test(E54): R9-ADV-1 messages show where the expected call differs
claude Nov 18, 2026
08c0bfb
perf(E54): print each argument list once per depth in a failure message
claude Nov 18, 2026
b05ddbe
test(E58): ratio tests measure again when over their limit; ava keeps…
claude Nov 18, 2026
f1fa6a5
docs(E58): CONTRIBUTING describes the ratio re-measurement and ava's …
claude Nov 18, 2026
ebecbe5
fix: dangling check views are tracked one by one (E56)
claude Nov 18, 2026
98d9c32
perf: checks no longer pay a microtask and a full stack each (E58)
claude Nov 18, 2026
0b5c1e1
fix: views print under util.inspect again (E58 follow-up)
claude Nov 18, 2026
ff6bc88
test: the view printing test does not pin Node.js's own proxy formatting
claude Nov 18, 2026
e03cea2
types: Arg.is predicates take the parameter type on generic methods (…
claude Nov 18, 2026
b33070c
types: this-annotated callbacks and checks of union members (R9TD-1, …
claude Nov 18, 2026
8e85e20
types: no resolves()/rejects() for Promise subtypes with members of t…
claude Nov 18, 2026
1e74f68
types: Arg.any('string') fits literal unions, enums and branded strin…
claude Nov 18, 2026
6e636f3
spec-types: pin the @types/pg overload limitation and its workarounds…
claude Nov 18, 2026
126d525
types: unwrap matcher values before inferring a generic method's retu…
claude Nov 18, 2026
8a30ca6
types: Arg.any('string') created on its own keeps its type without st…
claude Nov 18, 2026
986608a
Merge fix/r10-engine-a: round-10 engine A (E54 message depth, E58 rat…
claude Nov 18, 2026
f49ad23
Merge fix/r10-engine-b: round-10 engine B (E55 setPrototypeOf, E56 da…
claude Nov 18, 2026
7ab1429
Merge fix/r10-types: round-10 typings (T60-T64, T65 measurements)
claude Nov 18, 2026
d54dabe
docs: README round 10 part 1 (promise subtypes, Arg.is on generic met…
claude Nov 18, 2026
289ef55
docs: README round 10 part 2 (checks that nothing follows, depth-2 pr…
claude Nov 18, 2026
360d7f2
docs: README round 10 part 3 (checked snippets for the typing limitat…
claude Nov 18, 2026
ce37810
docs: MIGRATION round 10 (printing depth, messages, setPrototypeOf, p…
claude Nov 18, 2026
f81a06f
docs: CHANGELOG, CONTRIBUTING and README Performance for round 10 (ot…
claude Nov 18, 2026
0ae0d3f
docs: README note on util.inspect of a check on Node.js 10
claude Nov 18, 2026
8ce308a
docs: MIGRATION wording for Arg.any.not and matchers created on their…
claude Nov 18, 2026
c503043
fix: functions that copy a substitute's prototype are not taken for s…
claude Nov 18, 2026
1b804b4
fix: Object.setPrototypeOf on a frozen substitute throws a TypeError …
claude Nov 18, 2026
09a2382
fix: copies of the library share the printing and comparing guard (R1…
claude Nov 18, 2026
a6c1708
perf: symbol-form check views capture their site only for the first 1…
claude Nov 18, 2026
f2a964d
fix: failure messages print lines deeper also next to matchers, and c…
claude Nov 18, 2026
2eb557d
fix: an empty container prints as {} or [] at any depth in the visibl…
claude Nov 18, 2026
344a0b9
test: R10V-1 message cost and a property check of the visible-differe…
claude Nov 18, 2026
9410c77
perf: the message printer allocates nothing for texts it has printed …
claude Nov 18, 2026
d4d62b4
docs: correct two comments (setPrototypeOf trap, message printer)
claude Nov 18, 2026
df91f75
Merge branch 'fix/r11-engine' into ccr-f7030c4e-rhdc1v
claude Nov 18, 2026
bcef958
docs: README for round 11 (WIP: deeper lines next to matchers, symbol…
claude Nov 18, 2026
ccc9027
docs: MIGRATION and CHANGELOG for round 11; type-check and hot path n…
claude Nov 18, 2026
00e429d
docs: README note on mimic-fn wrappers; CHANGELOG E61 matcher detail …
claude Nov 18, 2026
98a8973
docs: type-check times as ranges over two measuring sessions
claude Nov 18, 2026
578f589
types: revert T64, Arg.any('string'|'number'|'boolean') typed as the …
claude Nov 18, 2026
340ad39
types: Arg.any('function') fits property-set checks on concrete union…
claude Nov 18, 2026
99eed9b
fix(engine): call `this` from the inspect hooks only for the library'…
claude Nov 18, 2026
1bb5b14
types: Arg.all() after leading arguments of Node's EventEmitter<Event…
claude Nov 18, 2026
c3351a4
types: pin the default-type-parameter limitation of generic methods (…
claude Nov 18, 2026
11c51c7
fix(engine): substitutes report a function's own `length` and `name` …
claude Nov 18, 2026
dd3c85e
types: Arg.all() after a this-annotated callback on concrete unions (…
claude Nov 18, 2026
1f8e57d
fix(engine): 'calledWithExactly' is a protocol key, so sinon-chai tak…
claude Nov 18, 2026
9c0a6b4
types: min-ts consumer covers T66, T67 and T70 on TypeScript 3.6 and 4.3
claude Nov 18, 2026
5f37c56
fix(engine): a function returned by x.bind() reports the name `bound …
claude Nov 18, 2026
287cd33
test: tsc's __importStar of a substitute copies its `length` and `nam…
claude Nov 18, 2026
91d81f1
types: T70 through precomputed Arg.all() lists, within the T44 instan…
claude Nov 18, 2026
72952ad
types: pin R11FE-2 with Node's own fs/promises readFile typings
claude Nov 18, 2026
a12d43e
fix: the visible-difference walk looks into array keys, Maps and Sets…
claude Nov 18, 2026
b2311db
fix: two copies of the library number their substitutes in one failur…
claude Nov 18, 2026
b9bb474
fix: printed copies of arrays, Maps and Sets keep their other own keys
claude Nov 18, 2026
5a0e4da
perf: a failure message lists the keys of each object once (R11-ADV-6)
claude Nov 18, 2026
51004bb
test: round 12 printing (R11V-1..5, R11-ADV-1/4/5, R11DOC-1)
claude Nov 18, 2026
44cee49
perf: the visible-difference walk lists no keys beyond the printed de…
claude Nov 18, 2026
b49e5d8
fix: lines that print alike are compared first; a comparison cut shor…
claude Nov 18, 2026
56e6cc6
refactor: arrayExtraKeys is internal to Stringify
claude Nov 18, 2026
839dc56
perf: a line whose comparison the budget cut short is printed again o…
claude Nov 18, 2026
2ba6a5f
Merge fix/r12-types: round-12 typings (T66 revert of T64, T67, T68, T…
claude Nov 18, 2026
aa092f5
Merge fix/r12-engine-core: round-12 engine core (E64 target brand, E6…
claude Nov 18, 2026
11faecb
Merge fix/r12-engine-print: round-12 printing (E67-E73: array keys, l…
claude Nov 18, 2026
f0c0dc9
docs: WIP round 12 README (T66 matching by type, fs.readFile, R11TD-3…
claude Nov 18, 2026
4e83c94
docs: WIP round 12 README (E64, E65, E66 special members, E71, typing…
claude Nov 18, 2026
63a19cb
docs: WIP round 12 README (E66 test runners, type-check and runtime n…
claude Nov 18, 2026
6f67756
docs: WIP round 12 MIGRATION and CHANGELOG (T66 revert, E64-E66, E67-…
claude Nov 18, 2026
d3a50f8
docs: WIP round 12 CONTRIBUTING type-check numbers and budget count
claude Nov 18, 2026
caec697
docs: round 12 README polish (type parameter defaults item, emit even…
claude Nov 18, 2026
325a37b
test: round-12 tests no longer depend on the checkout path or on mach…
claude Nov 18, 2026
7250593
types: property-set checks on concrete unions reject constructors aga…
claude Nov 18, 2026
12a9057
types: [mimick]() takes a partial instance of an object type (T72)
claude Nov 18, 2026
9a77ca7
fix(E75): honour jest/vitest asymmetric matchers and sinon matchers i…
claude Nov 18, 2026
1aa7159
test(E75): compatibility checks with jest's and vitest's own asymmetr…
claude Nov 18, 2026
a3199d9
types: pin the http.Server and net.Socket overload limits with the pr…
claude Nov 18, 2026
9052965
perf(E75): the matcher search imports its helpers from shared/Argumen…
claude Nov 18, 2026
fff4b5d
fix(E76): a mimicked method or getter that returns the instance answe…
claude Nov 18, 2026
1d87e31
fix(E77): a member that was read and never called fails kind-neutrall…
claude Nov 18, 2026
c3a93b7
fix(E80): call, apply and bind of a function that inherits from a sub…
claude Nov 18, 2026
9e2cd33
perf(E75): a container that holds matchers is not looked at for being…
claude Nov 19, 2026
54ae9d5
fix: printing a long array is bounded again (E74, R12-ADV-1)
claude Nov 19, 2026
931b6a1
fix: order that matching ignores in Maps, Sets, errors and functions …
claude Nov 19, 2026
62318c5
fix: substitutes are numbered also when the lines differ only where a…
claude Nov 19, 2026
342d1fe
fix: functions whose properties come in another order are compared by…
claude Nov 19, 2026
4e90817
perf: Maps and Sets in their order are compared once (E78)
claude Nov 19, 2026
dd856a4
perf: the sorted texts of errors and functions are made once per mess…
claude Nov 19, 2026
87f5645
fix: orders inside errors, functions and Set members do not count eit…
claude Nov 19, 2026
5159e38
docs: say what formatBounded's sorted flag is for
claude Nov 19, 2026
909cd50
Merge fix/r13-types: T71 (constructors rejected again in check assign…
claude Nov 19, 2026
2595be1
Merge fix/r13-engine-core: E75 (runner asymmetric and sinon matchers)…
claude Nov 19, 2026
0d64d1e
Merge fix/r13-engine-print: E74 (long arrays print bounded again), E7…
claude Nov 19, 2026
b0a4e24
docs: round 13 README part 1 (runner matchers, fluent mimick, partial…
claude Nov 19, 2026
1a86e18
docs: round 13 README part 2 (test runners and sinon.assert, construc…
claude Nov 19, 2026
d14bbaa
docs: round 13 MIGRATION and CHANGELOG (runner matchers, sinon.assert…
claude Nov 19, 2026
ab2902a
docs: CONTRIBUTING notes on the types-node-below directive and the ru…
claude Nov 19, 2026
53a98bc
docs: MIGRATION wording for the string mimick(instance) of 2.0.0-beta.4
claude Nov 19, 2026
d43bdd4
fix(E83, R13V-1): guard every look of the runner-matcher detection
claude Nov 19, 2026
7ef597c
types: inline the NotAssignable brand so check views survive declarat…
claude Nov 19, 2026
bfb9a18
types: generic SubstituteOf<T | undefined> mimicks a T again (R13TD-4…
claude Nov 19, 2026
2c5d222
fix(E82, R13FE-5): call and apply answer the direct call's auto-subst…
claude Nov 19, 2026
b4e8f97
test(compat, R13FE-5): jest.fn and vi.fn wrapping a substitute answer…
claude Nov 19, 2026
fb33460
spec-types: pin the documented casts of R13TD-2, R13TD-5 and R13FE-4
claude Nov 19, 2026
248a133
perf: compare in any order only where it decides the least difference…
claude Nov 19, 2026
0e2b30b
E81 (R13FE-3): checks through a call with matchers count the substitu…
claude Nov 19, 2026
940574e
fix: the sorted texts of comparisons in any order count towards the s…
claude Nov 19, 2026
db9697b
test: R13-ADV-1 (E84) comparisons in any order only where they decide…
claude Nov 19, 2026
a5f9d49
Tests for E81 (R13FE-3) and E85 (R13-ADV-2)
claude Nov 19, 2026
18580b9
fix: matchers of test runners nested in the samples of others print w…
claude Nov 19, 2026
646f9fd
E81: note configured substitute answers per substitute, not in a glob…
claude Nov 19, 2026
96ebff8
fix: a message whose expected call still prints like an unmatched rec…
claude Nov 19, 2026
c1146ea
fix: the E87 note says that lines can differ in what the message leav…
claude Nov 19, 2026
40afe3e
E81: checks further down a call with matchers, and member handles as …
claude Nov 19, 2026
53f443a
fix: nested runner matchers print within the bounds; a revoked proxy …
claude Nov 19, 2026
7f1953a
perf: the E87 check compares the texts of one alike line, without col…
claude Nov 19, 2026
ec77763
Merge fix/r14-types: T73 declaration emit of check views, T74 generic…
claude Nov 19, 2026
b0cb203
Merge fix/r14-engine-calls: E82 call/apply answer the direct call's a…
claude Nov 19, 2026
273a93b
Merge fix/r14-engine-checks: E81 checks through a call with matchers,…
claude Nov 19, 2026
81462e4
Merge fix/r14-engine-print: E84 any-order comparison only where it de…
claude Nov 19, 2026
1f39bc4
fix(E81 + E82): checks through a call with matchers count what call a…
claude Nov 19, 2026
d417925
docs: round-14 behaviour (E81-E87, T73, T74) and documented casts
claude Nov 19, 2026
ec99758
fix(engine): call/apply with a primitive first argument answer the me…
claude Nov 19, 2026
d24e4bc
types: Arg.is predicates may return any non-promise truthy value (R14…
claude Nov 19, 2026
4053b3c
fix(arguments): values whose keys cannot be listed match by identity …
claude Nov 19, 2026
0f0a2d1
types: a lone Arg.all() on overloads takes any overload's value (R14F…
claude Nov 19, 2026
ddc96dd
fix(engine): a matcher's look at a substitute argument leaves no trac…
claude Nov 19, 2026
c715bf4
types: decide the Arg.all() catch-all's value lazily (T76)
claude Nov 19, 2026
f44b7a2
feat(arguments): Arg matchers compose with the matchers of test runne…
claude Nov 19, 2026
1272052
types: check views of symbol-keyed types survive declaration emit (R1…
claude Nov 19, 2026
2221fee
types: keep optional symbol-keyed properties' undefined in check view…
claude Nov 19, 2026
65a23db
spec-types: pin the annotated generic helpers of R14TD-1 in declarati…
claude Nov 19, 2026
64a7898
fix(engine): a matcher's look at a member configured as property and …
claude Nov 19, 2026
b48a007
types: keep the T44 instantiation budget with T76 and T77
claude Nov 19, 2026
48111f0
types: keep generic methods' Arg.all() signatures as before (T76 cost)
claude Nov 19, 2026
644ace6
fix(engine): checks through a call with matchers know what each match…
claude Nov 19, 2026
de91dee
fix(engine): checks below a call with matchers count along the route,…
claude Nov 19, 2026
87153d5
fix(messages): E98 no method hint for a call-form check of a value me…
claude Nov 19, 2026
f29258b
perf(engine): a call answered like the one before it extends the late…
claude Nov 19, 2026
bd7ce84
docs(engine): say what the THREW answer note stands for
claude Nov 19, 2026
67df2a2
feat(messages): E97 hint for a member called further down a fluent ch…
claude Nov 19, 2026
8355662
test(perf): E94 measure the configure() half of R:RT-8 like the liter…
claude Nov 19, 2026
5a3d729
fix(engine): name the answered value of a returns() sequence in E88's…
claude Nov 19, 2026
84d719a
chore(messages): put the E97 search bounds under their comment
claude Nov 19, 2026
18da7b4
fix(messages): E97 looks at each auto-substitute when it reaches it
claude Nov 19, 2026
ef17eb4
Merge fix/r15-types: T75 truthy Arg.is predicates, T76 lone Arg.all()…
claude Nov 19, 2026
42b1799
Merge fix/r15-engine-calls: E91 primitive first argument of call/appl…
claude Nov 19, 2026
a398e8a
Merge fix/r15-engine-checks: E88 non-substitute answers make checks t…
claude Nov 19, 2026
dd289b9
Merge fix/r15-engine-messages: E98 no method hint for value members, …
claude Nov 19, 2026
a649a93
fix(E95 + E81): a call with matchers made inside a predicate is a set…
claude Nov 19, 2026
cd1bf29
docs: round 15 behaviour (E88-E98, T75-T77, R14TD-1) and re-measured …
claude Nov 19, 2026
93c5016
fix: note throwing answers without catching, also through call/apply …
claude Nov 19, 2026
88eebaa
types: leave out impossible last overloads (R15FE-2, T78)
claude Nov 19, 2026
e4a5678
fix: a matcher's look at a real call leaves no trace only on the valu…
claude Nov 19, 2026
5fa6e62
spec-types: pin the cast for checks through a call with matchers (R15…
claude Nov 19, 2026
5a78435
test(compat): pin what mocha does with a check that fails later in an…
claude Nov 19, 2026
2b4fcbb
packaging: exports entries for the directories of the public typings …
claude Nov 19, 2026
360688b
style: keep the E11 comment next to faceHandler, tidy an import
claude Nov 19, 2026
3fd5433
perf: walk the arguments of a look only as far as needed (E100)
claude Nov 19, 2026
d895d0b
perf: no closure context on the record path for the E100 look
claude Nov 19, 2026
2352f32
fix(messages): E108 fluent-chain hint remedy works when followed (R15…
claude Nov 19, 2026
5113651
fix: checks through concrete calls on a shared substitute, and the E8…
claude Nov 19, 2026
48b72c3
perf: keep faceGet small, the E99 check subject in helpers of its own
claude Nov 19, 2026
5fdd6d2
test: round 16 checks (R15FE-5/E99, R15-ADV-1/E105, R15-ADV-3/E107, R…
claude Nov 19, 2026
1c5edcb
fix(messages): E99 labels: records on a shared substitute show the ca…
claude Nov 19, 2026
2d090c1
fix: note a D32 deferred read's answer only while it is a read (E106)
claude Nov 19, 2026
74e4a4d
fix: a bound function as the answer names one remedy, the member it i…
claude Nov 19, 2026
56b04fc
perf: a check lists its records with one map of owners, created on th…
claude Nov 19, 2026
a64d328
perf: keep invoke small, the E99 call with matchers in a helper of it…
claude Nov 19, 2026
9d01670
Merge fix/r16-types: T78 impossible last overloads left out, T79 cast…
claude Nov 19, 2026
0b6f8b5
Merge fix/r16-engine-calls: E100 narrowed predicate look, E101/E103 T…
claude Nov 19, 2026
6107675
Merge fix/r16-engine-checks: E99 checks through concrete calls on a s…
claude Nov 19, 2026
d5c2cd2
Merge fix/r16-engine-messages: E108 fluent-chain remedy that works wh…
claude Nov 19, 2026
8be3a70
docs: round 16 (E99-E108, T78, T79, P34, R15 docs findings)
claude Nov 19, 2026
dd743c8
types: T80 mimicks() after a single Arg.all() takes implementations w…
claude Nov 19, 2026
8e338d9
fix(E109): the look of a matcher does not walk again what holds no su…
claude Nov 19, 2026
7192cb7
fix(E117): an async predicate nested in an object or array is a usage…
claude Nov 19, 2026
d3fe87b
fix(E118): a revoked function proxy is not one of the library's proxi…
claude Nov 19, 2026
a309295
spec-types: pin T81, Arg.any() on generic overloads with constrained …
claude Nov 19, 2026
67e3b03
spec-types: pin R16TD-1, which impossible overloads are left out and …
claude Nov 20, 2026
83614eb
fix(E116): the steps before a string-form check belong to the call th…
claude Nov 20, 2026
af05380
types: T80 work out what mimicks() takes only when it is used
claude Nov 20, 2026
d2f4027
refactor(E116): the string-check member of faceGet in one function
claude Nov 20, 2026
4021e5c
spec-types: pin what T80 leaves, untyped parameters of generic overlo…
claude Nov 20, 2026
e8a3c0a
fix(E110): E99 notes cost nothing per call and keep no substitute ali…
claude Nov 20, 2026
3a2b226
fix(engine): E114/E115 member handles of a mimicked substitute call w…
claude Nov 20, 2026
9bb9061
fix(E111): checks through a concrete call made with call/apply, or an…
claude Nov 20, 2026
ddd35ee
test: E114/E115 wrapped and spied members of mimicked substitutes (R1…
claude Nov 20, 2026
8474e3f
test(compat): jest.spyOn, vi.spyOn and node:test mock.method on mimic…
claude Nov 20, 2026
417a1a6
fix(E113, E119): another copy's bound function is no substitute; a th…
claude Nov 20, 2026
ea06df1
test: round 17 checks (R16V-2, the E99 retention, R16-ADV-5, R16-ADV-…
claude Nov 20, 2026
b275d54
fix(messages): E112 the fluent-chain hint's remedies are code that wo…
claude Nov 20, 2026
34e7c47
fix(messages): E120 usage errors name records on a shared substitute …
claude Nov 20, 2026
8222c71
refactor(engine): E114 recognise a mimicked substitute's own member h…
claude Nov 20, 2026
b1b1fef
perf(E110): a route step compares the same argument values first; Che…
claude Nov 20, 2026
8728083
fix(E111): a call that answered the substitute itself continues its e…
claude Nov 20, 2026
ad8e3c5
perf(engine): E114 note a handle's proxy once, when its read is noted…
claude Nov 20, 2026
694d587
perf(E111): look at whether a call answered the substitute itself onl…
claude Nov 20, 2026
7598fd2
perf(E111): read the frame of the hand-out first, the one read last, …
claude Nov 20, 2026
fa7afcb
Merge fix/r17-types: T80 mimicks() after Arg.all() fits each overload…
claude Nov 20, 2026
57958ba
Merge fix/r17-engine-calls: E109 the matcher look does not walk again…
claude Nov 20, 2026
4c5d615
Merge fix/r17-engine-checks: E110 E99 notes cost nothing per call and…
claude Nov 20, 2026
61453bc
Merge fix/r17-engine-mimick: E114 member handles of a mimicked substi…
claude Nov 20, 2026
5c41ddc
docs: round 17 behaviour (E109-E120, T80, T81, exact T78 rule) and nu…
claude Nov 20, 2026
f53f06c
types: T82 a union of implementations for .mimicks() after Arg.all() …
claude Nov 20, 2026
3fa6487
E125 (R17FE-5): line rules decide by the source lines where Node.js h…
claude Nov 20, 2026
030690b
E125 (R17FE-5): compatibility check of the line rules under tsx (Comm…
claude Nov 20, 2026
bdab695
types: T83 export CheckViewOf<T>, the type of a check view (R17FE-2)
claude Nov 20, 2026
c756ec5
E125: trust a source-map entry only on the position's own generated line
claude Nov 20, 2026
d6c12a0
E126 (R17-ADV-11): decide a link to a self hand-out only when a setup…
claude Nov 20, 2026
ca9a629
types: T82 pin the non-strict case of a union of .mimicks() implement…
claude Nov 20, 2026
ed69266
E127 (R17-ADV-3): the last search for matchers keeps no call's argume…
claude Nov 20, 2026
3b59a1d
E125: map a position V8 puts at a dot to the name after it
claude Nov 20, 2026
6b1c587
E125: look source maps up by the file's URL, kept per file
claude Nov 20, 2026
1ee4f97
E126 (R17-ADV-11): no field on the record of a fluent call for E111 o…
claude Nov 20, 2026
8135417
E126: wrap the new comments of CallRecord at the file's width
claude Nov 20, 2026
5a39b1d
fix(E121): a check through a call with matchers finds each substitute…
claude Nov 20, 2026
c855d7d
fix(E122): a check through a concrete call goes on past a substitute …
claude Nov 20, 2026
973ed61
fix(E123): after a clear, the calls of a shared substitute made befor…
claude Nov 20, 2026
9ddd635
fix(E124): a check whose matching call or read a revoked proxy answer…
claude Nov 20, 2026
a307ff1
E129 E130 E131: node:test mocks of mimicked members come after the su…
claude Nov 20, 2026
933379b
E132: the check-that-substitute remedy is code only when every argume…
claude Nov 20, 2026
63246a9
perf(E121): a check or setup through a call with matchers leaves no r…
claude Nov 20, 2026
12708e8
Tests for E129-E132 (R17-ADV-4, R17-ADV-8, R17-ADV-10, R17-ADV-5)
claude Nov 20, 2026
a67f9b8
perf(E123): a route looks for clears only once any substitute's recei…
claude Nov 20, 2026
5e00883
Compatibility checks for E129 and E131 with node:test, jest.spyOn, vi…
claude Nov 20, 2026
2c6667d
fix(E122): a setup without matchers that answers the substitute itsel…
claude Nov 20, 2026
a8dcd5e
E129: node:test's mock of a member of a substitute whose instance is …
claude Nov 20, 2026
09947bc
E131: only a stale handle called through this is the instance's own call
claude Nov 20, 2026
836ca4f
test(E121): the growth timing test runs 20,000 checks between its bat…
claude Nov 20, 2026
a5b5083
perf(E121): list the records of many substitutes in one indexed loop,…
claude Nov 20, 2026
63e8536
Merge fix/r18-types: T82 a union of .mimicks() implementations after …
claude Nov 20, 2026
7fd09a8
Merge fix/r18-lines: E125 the line rules follow the source's lines wh…
claude Nov 20, 2026
1dde13a
Merge fix/r18-checks: E121 checks through a call with matchers find e…
claude Nov 20, 2026
0a7a929
fix(E122 x E126): hand-out notes of fluent calls decide their pending…
claude Nov 20, 2026
d49d474
Merge fix/r18-mimick: E129 node:test mocks of mimicked members come a…
claude Nov 20, 2026
d4030e2
test(round 18 integration): node:test mocks of fluent members on shar…
claude Nov 20, 2026
f9ce534
docs(round 18): document the round-18 behaviour (E121-E132, T82, T83)…
claude Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ A clear and concise description of what you expected to happen.
- Typescript version: ` `
- substitute.js version: ` `
- Node version: ` `
- Module system (CommonJS, native ESM, bundler): ` `
- Test runner (ava, jest, mocha, node:test, vitest, ...): ` `

**Additional context**
Add any other context about the problem here.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ updates:
interval: daily
time: "04:00"
open-pull-requests-limit: 10

# The test runners used by compatibility-checks/ (dev tooling only).
- package-ecosystem: npm
directory: "/compatibility-checks"
schedule:
interval: weekly
open-pull-requests-limit: 5
26 changes: 13 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@ on:
schedule:
- cron: '0 6 * * 1'

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['javascript-typescript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
show-progress: false

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
182 changes: 163 additions & 19 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,171 @@
name: Node CI
on: [push]

on:
push:
pull_request:
workflow_dispatch:
# The publish workflow runs exactly these checks before it publishes.
workflow_call:

permissions:
contents: read

env:
# The oldest Node.js version the package supports. It must equal engines.node in package.json
# (packaging/package.test.js checks that), and the minimum-node job below smoke-tests the packed package on it.
MINIMUM_NODE_VERSION: '10.0.0'
# The oldest Node.js version with native ES module support, for the ESM entry point (dist/index.mjs).
MINIMUM_ESM_NODE_VERSION: '12.17.0'
# F2: Node.js 13.0 and 13.1 read "exports" but not its conditions. They load the package through the array fallback
# in exports["."] (the CommonJS entry); without it, require() fails there.
EXPORTS_FALLBACK_NODE_VERSION: '13.0.0'
# Node.js 13.2 to 13.6 have ES modules but not the "import" condition, so 13.7 is the oldest 13.x release on which
# the ES module entry works.
MINIMUM_ESM_NODE_13_VERSION: '13.7.0'

jobs:
build:
test:
name: Test on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 21]
# Every Node.js LTS line that is still supported: https://nodejs.org/en/about/previous-releases
node-version: [22, 24, 26]
steps:
- uses: actions/checkout@v5
with:
show-progress: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run the specs and the packaging checks
run: npm test
- name: Run the type tests
run: npm run test:types --if-present
# Type-checks and runs the code examples of README.md and MIGRATION.md against the built package, and checks links.
- name: Check the code examples in the documentation
run: npm run test:docs

# F4: README, MIGRATION and CHANGELOG promise TypeScript 3.6 or newer. Type-checks the built typings with exactly that
# version (spec-types/min-ts/check.js installs it on the fly with npx), so a .d.ts change that needs newer
# TypeScript fails CI and is never published.
types-min-ts:
name: Typings on the oldest supported TypeScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
show-progress: false
- name: Use the development Node.js version
uses: actions/setup-node@v5
with:
node-version-file: package.json
cache: npm
- name: Install dependencies
run: npm ci
- name: Build and type-check the typings with the oldest supported TypeScript
run: npm run test:types:min-ts

compatibility:
name: Test runner compatibility on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22, 24, 26]
steps:
- uses: actions/checkout@v5
with:
show-progress: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: |
package-lock.json
compatibility-checks/package-lock.json
- name: Install dependencies
run: npm ci
- name: Install the compatibility check dependencies
run: npm ci
working-directory: compatibility-checks
# The pretest script packs the repository like npm publish does and installs that tarball,
# so ava, jest, mocha, node:test and vitest run against the package as it would be published.
- name: Run the compatibility checks against the packed package
run: npm test
working-directory: compatibility-checks

minimum-node:
name: Packed package on the oldest supported Node versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Transpile typescript
run: npm run build --if-present
- name: Run tests
run: npm test
env:
CI: true
- uses: actions/checkout@v5
with:
show-progress: false
- name: Use the development Node.js version
uses: actions/setup-node@v5
with:
node-version-file: package.json
cache: npm
- name: Install dependencies
run: npm ci
- name: Pack the package like npm publish does
run: |
consumer="$RUNNER_TEMP/consumer"
mkdir -p "$consumer/node_modules/@fluffy-spoon/substitute"
npm pack --pack-destination "$RUNNER_TEMP"
tar -xzf "$RUNNER_TEMP"/fluffy-spoon-substitute-*.tgz -C "$consumer/node_modules/@fluffy-spoon/substitute" --strip-components=1
cp packaging/smoke/* "$consumer/"
- name: Use Node.js ${{ env.MINIMUM_NODE_VERSION }}
uses: actions/setup-node@v5
with:
node-version: ${{ env.MINIMUM_NODE_VERSION }}
# G:PK-2: engines.node must be a version the package really runs on.
# R3TD-5: deep-imports.js checks, on every version below, that the deep imports work or fail as
# packaging/smoke/deep-import-support.js (and CONTRIBUTING.md and MIGRATION.md) say.
- name: CommonJS smoke test on Node ${{ env.MINIMUM_NODE_VERSION }}
working-directory: ${{ runner.temp }}/consumer
run: |
node --version
node require.js
node deep-imports.js
- name: Use Node.js ${{ env.MINIMUM_ESM_NODE_VERSION }}
uses: actions/setup-node@v5
with:
node-version: ${{ env.MINIMUM_ESM_NODE_VERSION }}
- name: CommonJS and ES module smoke test on Node ${{ env.MINIMUM_ESM_NODE_VERSION }}
working-directory: ${{ runner.temp }}/consumer
run: |
node --version
node require.js
node import.mjs
node deep-imports.js
- name: Use Node.js ${{ env.EXPORTS_FALLBACK_NODE_VERSION }}
uses: actions/setup-node@v5
with:
node-version: ${{ env.EXPORTS_FALLBACK_NODE_VERSION }}
- name: CommonJS smoke test on Node ${{ env.EXPORTS_FALLBACK_NODE_VERSION }} (exports without conditions)
working-directory: ${{ runner.temp }}/consumer
run: |
node --version
node require.js
node deep-imports.js
- name: Use Node.js ${{ env.MINIMUM_ESM_NODE_13_VERSION }}
uses: actions/setup-node@v5
with:
node-version: ${{ env.MINIMUM_ESM_NODE_13_VERSION }}
- name: CommonJS and ES module smoke test on Node ${{ env.MINIMUM_ESM_NODE_13_VERSION }}
working-directory: ${{ runner.temp }}/consumer
run: |
node --version
node require.js
node import.mjs
node deep-imports.js
91 changes: 41 additions & 50 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,57 @@
name: Publish

# Publishing a GitHub release publishes the package to npm. See CONTRIBUTING.md ("Releasing").
# - The release tag must match the version in package.json (v2.0.1 or 2.0.1 for version 2.0.1).
# - A stable version is published with the npm dist-tag `latest`. A prerelease version (2.1.0-beta.1) or a release
# marked as a prerelease on GitHub is published with the dist-tag `beta`.
#
# There is no GitHub Packages job: GitHub Packages only hosts npm packages whose scope is the repository owner
# (@ffmathy), so it cannot host @fluffy-spoon/substitute, and the former job failed on every release.
on:
release:
types: [created]
# `published` also fires for a release that was saved as a draft first (`created` does not).
types: [published]

permissions:
contents: read

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm test
ci:
name: CI
uses: ./.github/workflows/nodejs.yml

publish-npm:
needs: build-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm run build
- run: echo "tag=latest" >> $GITHUB_ENV
- name: Sets npm tag
if: contains(github.event.release.tag_name, 'beta')
run: echo "tag=beta" >> $GITHUB_ENV
- run: npm publish --access public --tag ${{ env.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

publish-github:
needs: build-test
name: Publish to npm
needs: ci
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# Lets npm publish with provenance (and with trusted publishing, if it is configured on npmjs.com).
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
show-progress: false
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm run build
- run: echo "tag=latest" >> $GITHUB_ENV
- name: Sets npm tag
if: contains(github.event.release.tag_name, 'beta')
run: echo "tag=beta" >> $GITHUB_ENV
- run: npm publish --tag ${{ env.tag }}
node-version-file: package.json
registry-url: https://registry.npmjs.org/
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Determine the npm dist-tag
id: dist-tag
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
PRERELEASE: ${{ github.event.release.prerelease }}
run: |
version="$(node -p "require('./package.json').version")"
tag="$(node packaging/dist-tag.js "$RELEASE_TAG" "$version" "$PRERELEASE")"
echo "Publishing $version with the dist-tag $tag"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
# npm publish runs the prepack script, which builds dist/ from scratch.
- name: Publish
run: npm publish --provenance --access public --tag "$DIST_TAG"
env:
DIST_TAG: ${{ steps.dist-tag.outputs.tag }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,6 @@ ASALocalRun/

# Build
dist/
dist-spec/
fluffy-spoon-substitute-*.tgz
package/
Loading