Skip to content

Commit 99d5f2b

Browse files
committed
refactor: remove old internal compatiblity shim
1 parent 498b873 commit 99d5f2b

3 files changed

Lines changed: 1 addition & 32 deletions

File tree

‎src/lib/calculation-type.js‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎test/property/properties.test.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { parse } from '../../src/lib/parser.js';
1616
import { simplify } from '../../src/lib/simplify.js';
1717
import { analyze } from '../../src/lib/analyze.js';
1818
import { serialize } from '../../src/lib/serialize.js';
19-
import { checkCalculationType } from '../../src/lib/calculation-type.js';
2019
import {
2120
astArb,
2221
astArbWithDegenerate,
@@ -152,7 +151,7 @@ test('property: -(-x) ≡ simplify(x)', () => {
152151
// The structural generator intentionally combines arbitrary dimensions,
153152
// which can otherwise produce invalid sums such as `-0 + 0px`.
154153
fc.property(
155-
astArb(3).filter((ast) => checkCalculationType(ast).kind !== 'failure'),
154+
astArb(3).filter((ast) => analyze(ast).valid),
156155
(ast) => {
157156
const doubleNeg = negate(negate(ast));
158157
const lhs = simplify(doubleNeg);

‎test/unit/analyze.test.js‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { test } from 'node:test';
22
import assert from 'node:assert/strict';
33
import { analyze } from '../../src/lib/analyze.js';
4-
import { checkCalculationType } from '../../src/lib/calculation-type.js';
54
import { call, num } from '../../src/lib/node.js';
65
import { indexBlocks } from '../../src/lib/block-index.js';
76
import { parse } from '../../src/lib/parser.js';
@@ -277,10 +276,6 @@ test('analyze: enforces the calculation depth limit', () => {
277276
() => analyze(tree),
278277
/Calculation nesting exceeds the limit of 1024/
279278
);
280-
assert.throws(
281-
() => checkCalculationType(tree),
282-
/Calculation nesting exceeds the limit of 1024/
283-
);
284279
});
285280

286281
test('analyze: treats inherited object names as unknown functions', () => {

0 commit comments

Comments
 (0)