@atscript/db-memory 0.1.144 → 0.1.145

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/dist/index.cjs CHANGED
@@ -1028,18 +1028,16 @@ var MemoryAdapter = class extends _atscript_db.BaseDbAdapter {
1028
1028
  * so the store can never be mutated through a returned value.
1029
1029
  *
1030
1030
  * - No projection → a full clone.
1031
- * - INCLUSION form (`{ field: 1 }`) → a new object with only the selected
1032
- * paths PLUS the primary-key field(s) (mirrors Mongo including `_id`).
1031
+ * - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
1032
+ * paths — like the SQL adapters (since 0.1.145; it used to add the primary
1033
+ * key, which made projected responses differ across adapters).
1033
1034
  * - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
1034
1035
  *
1035
1036
  * Top-level and nested dot-paths are supported; exotic Mongo projection
1036
1037
  * quirks (array positional, `$slice`, etc.) are intentionally NOT replicated.
1037
1038
  */
1038
1039
  _projectAndClone(row, $select) {
1039
- return projectRow(row, $select?.asProjection, {
1040
- pkFields: this._physicalPkFields(),
1041
- clone: true
1042
- });
1040
+ return projectRow(row, $select?.asProjection, { clone: true });
1043
1041
  }
1044
1042
  /**
1045
1043
  * Reads the pagination/sort/projection controls with their intended types.
package/dist/index.d.cts CHANGED
@@ -320,8 +320,9 @@ declare class MemoryAdapter extends BaseDbAdapter {
320
320
  * so the store can never be mutated through a returned value.
321
321
  *
322
322
  * - No projection → a full clone.
323
- * - INCLUSION form (`{ field: 1 }`) → a new object with only the selected
324
- * paths PLUS the primary-key field(s) (mirrors Mongo including `_id`).
323
+ * - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
324
+ * paths — like the SQL adapters (since 0.1.145; it used to add the primary
325
+ * key, which made projected responses differ across adapters).
325
326
  * - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
326
327
  *
327
328
  * Top-level and nested dot-paths are supported; exotic Mongo projection
package/dist/index.d.mts CHANGED
@@ -320,8 +320,9 @@ declare class MemoryAdapter extends BaseDbAdapter {
320
320
  * so the store can never be mutated through a returned value.
321
321
  *
322
322
  * - No projection → a full clone.
323
- * - INCLUSION form (`{ field: 1 }`) → a new object with only the selected
324
- * paths PLUS the primary-key field(s) (mirrors Mongo including `_id`).
323
+ * - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
324
+ * paths — like the SQL adapters (since 0.1.145; it used to add the primary
325
+ * key, which made projected responses differ across adapters).
325
326
  * - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
326
327
  *
327
328
  * Top-level and nested dot-paths are supported; exotic Mongo projection
package/dist/index.mjs CHANGED
@@ -1027,18 +1027,16 @@ var MemoryAdapter = class extends BaseDbAdapter {
1027
1027
  * so the store can never be mutated through a returned value.
1028
1028
  *
1029
1029
  * - No projection → a full clone.
1030
- * - INCLUSION form (`{ field: 1 }`) → a new object with only the selected
1031
- * paths PLUS the primary-key field(s) (mirrors Mongo including `_id`).
1030
+ * - INCLUSION form (`{ field: 1 }`) → a new object with exactly the selected
1031
+ * paths — like the SQL adapters (since 0.1.145; it used to add the primary
1032
+ * key, which made projected responses differ across adapters).
1032
1033
  * - EXCLUSION form (`{ field: 0 }`) → a clone with those paths removed.
1033
1034
  *
1034
1035
  * Top-level and nested dot-paths are supported; exotic Mongo projection
1035
1036
  * quirks (array positional, `$slice`, etc.) are intentionally NOT replicated.
1036
1037
  */
1037
1038
  _projectAndClone(row, $select) {
1038
- return projectRow(row, $select?.asProjection, {
1039
- pkFields: this._physicalPkFields(),
1040
- clone: true
1041
- });
1039
+ return projectRow(row, $select?.asProjection, { clone: true });
1042
1040
  }
1043
1041
  /**
1044
1042
  * Reads the pagination/sort/projection controls with their intended types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-memory",
3
- "version": "0.1.144",
3
+ "version": "0.1.145",
4
4
  "description": "In-memory adapter for atscript-db.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -36,16 +36,16 @@
36
36
  "access": "public"
37
37
  },
38
38
  "devDependencies": {
39
- "@atscript/core": "^0.1.96",
40
- "@atscript/typescript": "^0.1.96",
39
+ "@atscript/core": "^0.1.97",
40
+ "@atscript/typescript": "^0.1.97",
41
41
  "@uniqu/core": "^0.1.11",
42
- "unplugin-atscript": "^0.1.96"
42
+ "unplugin-atscript": "^0.1.97"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atscript/core": "^0.1.96",
46
- "@atscript/typescript": "^0.1.96",
45
+ "@atscript/core": "^0.1.97",
46
+ "@atscript/typescript": "^0.1.97",
47
47
  "@uniqu/core": "^0.1.11",
48
- "@atscript/db": "^0.1.144"
48
+ "@atscript/db": "^0.1.145"
49
49
  },
50
50
  "scripts": {
51
51
  "postinstall": "asc -f dts",