querier-ts 2.5.1 → 2.5.3

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
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.5.3
4
+
5
+ ### Summary
6
+
7
+ - [ ] Bug fixes
8
+ - [x] Code refactoring
9
+ - [ ] New features
10
+ - [ ] Build and packaging updates
11
+ - [ ] Breaking changes
12
+
13
+ ### Build and packaging updates
14
+
15
+ - Improved JSDoc for `column()` method.
16
+
17
+ ## v2.5.2
18
+
19
+ ### Summary
20
+
21
+ - [ ] Bug fixes
22
+ - [ ] Code refactoring
23
+ - [ ] New features
24
+ - [x] Build and packaging updates
25
+ - [ ] Breaking changes
26
+
27
+ ### Build and packaging updates
28
+
29
+ - Removed `tsup` settings that could make debugging harder.
30
+ - Rebuilt `v2.5.1`, for `dist` was outdated.
31
+ - Added `build` script to `prepublishOnly` script, ensuring build before publishing.
32
+
3
33
  ## v2.5.1
4
34
 
5
35
  ### Summary
@@ -429,6 +429,12 @@ var _Query = class _Query {
429
429
  const firstColumn = this.getFirstColumn();
430
430
  return firstObject && firstColumn ? firstObject[firstColumn] : false;
431
431
  }
432
+ /**
433
+ * Internal implementation for retrieving column values.
434
+ *
435
+ * If no column is provided, the first available column is used.
436
+ * Returns an empty array if there are no rows or no columns.
437
+ */
432
438
  column(column) {
433
439
  const source = this.getLimitedRows();
434
440
  const length = source.length;
@@ -234,13 +234,18 @@ declare class Query<T extends object> {
234
234
  */
235
235
  scalar(): T[PropOf<T>] | false;
236
236
  /**
237
- * Returns the values of the first (selected) column of all rows.
237
+ * Returns the values from the first column for all rows.
238
238
  *
239
- * @param column (Optional) The column to get the values from.
240
- *
241
- * @returns Values from the first (selected) column.
239
+ * @returns An array containing the values of the first column for each row.
242
240
  */
243
241
  column(): T[PropOf<T>][];
242
+ /**
243
+ * Returns the values from a specific column for all rows.
244
+ *
245
+ * @param column The column whose values should be retrieved.
246
+ *
247
+ * @returns An array containing the values of the specified column for each row.
248
+ */
244
249
  column<TColumn extends PropOf<T>>(column: TColumn): T[TColumn][];
245
250
  /**
246
251
  * Returns the values of the rows. If there are selected columns, only their
package/dist/esm/index.js CHANGED
@@ -427,6 +427,12 @@ var _Query = class _Query {
427
427
  const firstColumn = this.getFirstColumn();
428
428
  return firstObject && firstColumn ? firstObject[firstColumn] : false;
429
429
  }
430
+ /**
431
+ * Internal implementation for retrieving column values.
432
+ *
433
+ * If no column is provided, the first available column is used.
434
+ * Returns an empty array if there are no rows or no columns.
435
+ */
430
436
  column(column) {
431
437
  const source = this.getLimitedRows();
432
438
  const length = source.length;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "querier-ts",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.5.3",
5
5
  "description": "A lightweight, type-safe in-memory query engine for JavaScript and TypeScript",
6
6
  "repository": {
7
7
  "type": "git",
@@ -47,7 +47,7 @@
47
47
  "format": "prettier --write \"src/**/*.ts\"",
48
48
  "lint": "eslint \"src/**/*.ts\" --fix",
49
49
  "prepare": "husky",
50
- "prepublishOnly": "pnpm test && pnpm lint",
50
+ "prepublishOnly": "pnpm build && pnpm test && pnpm lint",
51
51
  "preversion": "pnpm lint",
52
52
  "version": "pnpm format && git add -A src",
53
53
  "postversion": "git push && git push --tags"