@everystack/api 0.4.7 → 0.4.8

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to `@everystack/api` are documented here.
4
4
 
5
5
  Format based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
+ ## [0.4.8] - 2026-10-18
8
+
9
+ ### Fixed
10
+
11
+ - compile under NodeNext; the primary-key tiebreak no longer hands a pg-core column to asc()
12
+
7
13
  ## [0.4.7] - 2026-10-18
8
14
 
9
15
  ### BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/api",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "PostgREST-compatible HTTP handler + typed fetch client for Drizzle ORM",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Scalable Technology, Inc. <licensing@scalable.technology>",
@@ -3141,11 +3141,15 @@ function buildOrderBy(
3141
3141
 
3142
3142
  // Aggregate groups do not represent individual rows, so their order cannot use the row key.
3143
3143
  if (tieBreak && is(table, PgTable)) {
3144
+ // Resolve the key columns from `columns` (getTableColumns), the same typing asc() gets for
3145
+ // the named columns above. getTableConfig's pg-core column types are a second Column class
3146
+ // under NodeNext (drizzle's .d.cts imports both .js and .cjs), so they must not reach asc().
3144
3147
  const config = getTableConfig(table);
3148
+ const byName = new Map(columns.map(column => [column.name, column]));
3145
3149
  const primaryColumns = [
3146
- ...config.columns.filter(column => column.primary),
3147
- ...config.primaryKeys.flatMap(key => key.columns),
3148
- ];
3150
+ ...columns.filter(column => column.primary),
3151
+ ...config.primaryKeys.flatMap(key => key.columns.map(keyColumn => byName.get(keyColumn.name))),
3152
+ ].filter((column): column is DrizzleColumn => column !== undefined);
3149
3153
  for (const column of primaryColumns) {
3150
3154
  if (!named.has(column.name) && !isHidden?.(column.name)) {
3151
3155
  expressions.push(asc(column));