feathers-utils

utils for feathers.js

MIT License

Downloads
3.9K
Stars
10
Committers
1

Bot releases are visible (Hide)

feathers-utils - Latest Release

Published by fratzinger 10 months ago

  • !feat(utils): optimizeBatchPatch with Record (#26) 36a3e24

https://github.com/fratzinger/feathers-utils/compare/v5.2.0...v6.0.0

feathers-utils -

Published by fratzinger 10 months ago

  • feat(utils): flattenQuery & deflattenQuery (#25) e774ec4

https://github.com/fratzinger/feathers-utils/compare/v5.1.0...v5.2.0

feathers-utils -

Published by fratzinger 10 months ago

  • feat: new hooks paramsFromClient/paramsForServer (#24) 4ec6ded

https://github.com/fratzinger/feathers-utils/compare/v5.0.2...v5.1.0

feathers-utils -

Published by fratzinger 10 months ago

feathers-utils -

Published by fratzinger 10 months ago

  • fix(forEach): type fromAll d34c412
  • fix(forEach): typeof fromAll 78157fe

https://github.com/fratzinger/feathers-utils/compare/v5.0.0...v5.0.1

feathers-utils -

Published by fratzinger 10 months ago

feathers-utils -

Published by fratzinger 10 months ago

  • feat(utils): new util optimizeBatchPatch (#22) 4d62c43
  it("optimizeBatchPatch", () => {
    const items = new Map<Id, Record<string, unknown>>([
      ["1", { name: "John" }],
      ["2", { name: "Jane" }],
      ["3", { name: "John" }],
      ["4", { name: "Jane" }],
      [5, { name: "Jack" }],
    ]);

    expect(optimizeBatchPatch(items)).toEqual([
      [null, { name: "John" }, { query: { id: { $in: ["1", "3"] } } }],
      [null, { name: "Jane" }, { query: { id: { $in: ["2", "4"] } } }],
      [5, { name: "Jack" }, undefined],
    ]);
  });

https://github.com/fratzinger/feathers-utils/compare/v4.1.0...v4.2.0

feathers-utils -

Published by fratzinger 11 months ago

  • feat(utils): new util - defineHooks (#21) 2035ab7

https://github.com/fratzinger/feathers-utils/compare/v4.0.0...v4.1.0

feathers-utils -

Published by fratzinger 11 months ago

Commits

  • !refactor(filterQuery): custom easy filterQuery (#20) 8b482c4

Breaking Change

The signature & behavior of filterQuery changed. New implementation looks like this:

export function filterQuery<Q extends Query>(
  providedQuery?: Q,
): FilterQueryResult<Q> {
  providedQuery ??= {} as Q;
  const { $select, $limit, $skip, $sort, ...query } = providedQuery;

  const result: FilterQueryResult<Q> = { query } as any;

  if ("$select" in providedQuery) {
    result.$select = $select;
  }

  if ("$limit" in providedQuery) {
    result.$limit = $limit;
  }

  if ("$skip" in providedQuery) {
    result.$skip = $skip;
  }

  if ("$sort" in providedQuery) {
    result.$sort = $sort;
  }

  return result;
}

https://github.com/fratzinger/feathers-utils/compare/v3.1.3...v4.0.0

feathers-utils -

Published by fratzinger 11 months ago

  • fix(getItemsIsArray): result / automatic 2ec7427

https://github.com/fratzinger/feathers-utils/compare/v3.1.2...v3.1.3

feathers-utils -

Published by fratzinger 11 months ago

  • chore: fix lints 24abdfd
  • chore: update dependencies d4d06b6
  • fix(forEach): type forEach generic Context (#19) cadb15c

https://github.com/fratzinger/feathers-utils/compare/v3.1.1...v3.1.2

feathers-utils -

Published by fratzinger about 1 year ago

  • fix(setQueryKeySafely): make params generic ebbf633

https://github.com/fratzinger/feathers-utils/compare/v3.1.0...v3.1.1

feathers-utils -

Published by fratzinger about 1 year ago

  • feat(utils): init setQueryKeySafely & update dependencies (#18) a99cddc

https://github.com/fratzinger/feathers-utils/compare/v3.0.3...v3.1.0

feathers-utils -

Published by fratzinger over 1 year ago

feathers-utils -

Published by fratzinger over 1 year ago

feathers-utils -

Published by fratzinger over 1 year ago

feathers-utils -

Published by fratzinger over 1 year ago

  • chore!: update dependencies & peerDependency (#17) 80d799a

https://github.com/fratzinger/feathers-utils/compare/v2.1.3...v3.0.0

feathers-utils -

Published by fratzinger over 1 year ago

feathers-utils -

Published by fratzinger over 1 year ago

feathers-utils -

Published by fratzinger over 1 year ago

  • fix: mergeArrays with possibly undefined 1519b20

https://github.com/fratzinger/feathers-utils/compare/v2.1.0...v2.1.1