Minor Changes
-
647cd77: Add the opt-in
missingConcurrencyOptiondiagnostic instyle.Effect.allandEffect.forEachrun sequentially unlessconcurrencyis set, which readers coming fromPromise.alloften do not expect. The rule reports calls whose options argument is missing or is an object literal without aconcurrencykey, in every spelling: data-first, data-last in a pipe, curried, and insideEffect.gen/Effect.fnbodies.yield* Effect.forEach(items, save) // reported yield* Effect.forEach(items, save, { concurrency: 1 }) // ok yield* Effect.all(checks, { concurrency: 4 }) // ok
A quick fix adds
concurrency: 1, which keeps the current behaviour:Effect.forEach(items, save)becomesEffect.forEach(items, save, { concurrency: 1 }), andEffect.all(checks, { discard: true })becomesEffect.all(checks, { discard: true, concurrency: 1 }). Options that are not an object literal, or that use a spread, are not reported. A literal underas const,asorsatisfiesis checked like a bare one; undersatisfiesthe call is reported without the quick fix, since addingconcurrencymay not satisfy the type. The rule defaults to off and supports Effect v3 and v4.Piping flows now recognize Effect v4's
forEachas a dual, soEffect.forEach(items, f)andEffect.forEach(f)(items)normalize like they do on v3.
Patch Changes
-
0f776a9: Fix
schemaNumberfalse positives forisInt()andisFinite()checks wrapped in.abort()or combined with.and(...)..abort()keeps the filter's predicate andX.and(Y)runs both filters, so the schema still rejectsNaN,Infinityand-Infinity, like the bare filter and the.annotate(...)form, which was already accepted. A finite filter on either side of.and(...)counts, and the wrappers can be chained in any order, in.check(...)and in pipedSchema.check(...).Schema.Number.check(Schema.isInt().abort()) // no longer reported Schema.Number.check(Schema.isFinite().abort(), Schema.isBetween({ minimum: 1, maximum: 24 })) // no longer reported Schema.Number.check(Schema.isInt().and(Schema.isGreaterThan(0))) // no longer reported Schema.Number.check(Schema.isGreaterThan(0).and(Schema.isInt())) // no longer reported Schema.Number.check(Schema.isGreaterThan(0).abort()) // still reported
-
f374280: Update the TypeScript next tag to
typescript@next, which shipstypescript-gocommitad24728023c52ef6a92a278046cdb69621048365, update the TypeScript beta tag totypescript@beta, and update the TypeScript latest tag totypescript@latest.