akanjs 2.3.11-rc.3 → 2.3.11-rc.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akanjs",
3
- "version": "2.3.11-rc.3",
3
+ "version": "2.3.11-rc.4",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -723,7 +723,6 @@ class QueryCompiler {
723
723
  throw new Error("Operator nodes must be attached to a document path");
724
724
  }
725
725
  const parts = Object.entries(query).flatMap(([path, value]) => {
726
- if (path.startsWith("$")) throw new Error(`Mongo-style query operator is not supported: ${path}`);
727
726
  if (value === undefined) throw new Error(`Undefined query value is not allowed: ${path}`);
728
727
  return [this.compileField(path, value)];
729
728
  });
@@ -793,8 +792,6 @@ class QueryCompiler {
793
792
  if (value && typeof value === "object" && !Array.isArray(value)) {
794
793
  const operators = value as Record<string, unknown>;
795
794
  const keys = Object.keys(operators);
796
- const legacyKey = keys.find((key) => key.startsWith("$"));
797
- if (legacyKey) throw new Error(`Mongo-style query operator is not supported on ${path}: ${legacyKey}`);
798
795
  if (keys.some((key) => QUERY_OPERATOR_KEYS.has(key))) {
799
796
  const parts = keys.flatMap((key) => {
800
797
  if (!QUERY_OPERATOR_KEYS.has(key)) return [];
@@ -840,7 +837,6 @@ class UpdateCompiler {
840
837
  const jsonOps: { op: DocumentUpdateOperator; path: string; value: unknown }[] = [];
841
838
  for (const [path, raw] of Object.entries(update)) {
842
839
  if (raw === undefined) continue;
843
- if (path.startsWith("$")) throw new Error(`Mongo-style update operator is not supported: ${path}`);
844
840
  const node: DocumentUpdateNode = isDocumentUpdateNode(raw) ? raw : { kind: "update", op: "set", value: raw };
845
841
  this.#assertPath(path);
846
842
  if (node.op === "setOnInsert") {
@@ -1207,7 +1203,6 @@ export class SqlDocumentStore {
1207
1203
  path.split(".").reduce<unknown>((obj, key) => (obj as DocumentRecord | undefined)?.[key], doc);
1208
1204
  for (const [path, raw] of Object.entries(update)) {
1209
1205
  if (raw === undefined) continue;
1210
- if (path.startsWith("$")) throw new Error(`Mongo-style update operator is not supported: ${path}`);
1211
1206
  const node: DocumentUpdateNode = isDocumentUpdateNode(raw) ? raw : { kind: "update", op: "set", value: raw };
1212
1207
  const current = getPath(path);
1213
1208
  switch (node.op) {