Skip to content

Commit 227e0af

Browse files
committed
Remove withURLState alias
1 parent a456ea2 commit 227e0af

4 files changed

Lines changed: 2 additions & 12 deletions

File tree

.changeset/witty-mice-drum.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"@tailor-platform/app-shell": minor
33
---
44

5-
Add `withURLCollectionState` as the preferred name for wiring collection state to the URL in `useCollectionVariables`.
6-
7-
`withURLState` remains available as a deprecated alias.
5+
Add `withURLCollectionState` for wiring collection state to the URL in `useCollectionVariables`.
86

97
```tsx
108
const searchParams = useSearchParams();

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export {
189189
type DataTableContextValue,
190190
} from "./components/data-table";
191191
export { useCollectionVariables } from "./hooks/use-collection-variables";
192-
export { withURLCollectionState, withURLState } from "./lib/collection-url-state";
192+
export { withURLCollectionState } from "./lib/collection-url-state";
193193
export {
194194
CollectionControlProvider,
195195
useCollectionControl,

packages/core/src/lib/collection-url-state.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { describe, it, expect, vi } from "vitest";
22
import type { CollectionPersistedState, TableMetadataMap } from "@/types/collection";
33
import {
44
withURLCollectionState,
5-
withURLState,
65
encodeFilterValue,
76
decodeFilterValue,
87
parseCollectionSearchParams,
@@ -162,10 +161,6 @@ describe("withURLCollectionState", () => {
162161
"p=30&s=createdAt%3Adesc&f.status%3Aeq=pending",
163162
);
164163
});
165-
166-
it("keeps withURLState as a deprecated alias", () => {
167-
expect(withURLState).toBe(withURLCollectionState);
168-
});
169164
});
170165

171166
describe("encodeFilterValue", () => {

packages/core/src/lib/collection-url-state.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ export function withURLCollectionState(
178178
};
179179
}
180180

181-
/** @deprecated use withURLCollectionState */
182-
export const withURLState = withURLCollectionState;
183-
184181
/**
185182
* Encodes a filter value for URL storage.
186183
* - Arrays are JSON-encoded to avoid ambiguity with values that contain commas.

0 commit comments

Comments
 (0)