@carto/api-client 0.5.0 → 0.5.1-alpha.0

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/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://github.com/CartoDB/carto-api-client#readme",
9
9
  "author": "Don McCurdy <donmccurdy@carto.com>",
10
10
  "packageManager": "yarn@4.3.1",
11
- "version": "0.5.0",
11
+ "version": "0.5.1-alpha.0",
12
12
  "license": "MIT",
13
13
  "publishConfig": {
14
14
  "access": "public"
@@ -117,15 +117,16 @@
117
117
  "rimraf": "^6.0.1",
118
118
  "semver": "^7.7.1",
119
119
  "thenby": "^1.3.4",
120
- "tinybench": "^3.1.1",
120
+ "tinybench": "^4.0.1",
121
121
  "tsup": "^8.3.6",
122
122
  "typescript": "~5.8.2",
123
123
  "typescript-eslint": "^8.26.1",
124
124
  "vite": "^6.2.2",
125
- "vitest": "3.0.9"
125
+ "vitest": "3.1.1"
126
126
  },
127
127
  "resolutions": {
128
128
  "@carto/api-client": "portal:./",
129
129
  "rollup": "^4.20.0"
130
- }
130
+ },
131
+ "stableVersion": "0.5.0"
131
132
  }
@@ -18,7 +18,7 @@ export interface ViewState {
18
18
  }
19
19
 
20
20
  /** Common options for {@link WidgetRemoteSource} requests. */
21
- interface BaseRequestOptions {
21
+ export interface BaseRequestOptions {
22
22
  signal?: AbortSignal;
23
23
  spatialFilter?: SpatialFilter;
24
24
  spatialFiltersMode?: SpatialFilterPolyfillMode;
@@ -387,15 +387,15 @@ function assertColumn(
387
387
  features: FeatureData[],
388
388
  ...columnArgs: string[] | string[][]
389
389
  ) {
390
- // TODO(cleanup): Can drop support for multiple column shapes here?
391
-
392
390
  // Due to the multiple column shape, we normalise it as an array with normalizeColumns
393
391
  const columns = Array.from(new Set(columnArgs.map(normalizeColumns).flat()));
394
392
 
395
393
  const featureKeys = Object.keys(features[0]);
396
394
 
395
+ // For backward compatibility, '' should pass column validation. For example,
396
+ // operation='count',operationColumn='' is accepted.
397
397
  const invalidColumns = columns.filter(
398
- (column) => !featureKeys.includes(column)
398
+ (column) => column && !featureKeys.includes(column)
399
399
  );
400
400
 
401
401
  if (invalidColumns.length) {