@aeriajs/common 0.0.113 → 0.0.114

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/pipe.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export type PipeOptions<TReturn> = {
2
2
  returnFirst?: boolean | ((value: unknown) => Awaited<TReturn> | undefined);
3
3
  };
4
- export declare const pipe: <TArgs extends unknown[], TReturn>(functions: ((p1: TReturn, ...args: TArgs) => TReturn)[], options?: PipeOptions<TReturn>) => (value: Awaited<TReturn>, ...args: TArgs) => Promise<TReturn>;
4
+ export declare const pipe: <TArgs extends unknown[], TReturn>(functions: ((p1: TReturn | undefined, ...args: TArgs) => TReturn | Promise<TReturn> | undefined)[], options?: PipeOptions<TReturn>) => (value: Awaited<TReturn> | undefined, ...args: TArgs) => Promise<TReturn | undefined>;
package/dist/pipe.js CHANGED
@@ -7,7 +7,6 @@ const pipe = (functions, options) => {
7
7
  let ret = value;
8
8
  for (const fn of functions) {
9
9
  ret = await fn(ret, ...args);
10
- // eslint-disable-next-line
11
10
  if (returnFirst && ret !== undefined) {
12
11
  switch (typeof returnFirst) {
13
12
  case 'function': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/common",
3
- "version": "0.0.113",
3
+ "version": "0.0.114",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,13 +31,13 @@
31
31
  "bson": "^6.5.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@aeriajs/types": "^0.0.96",
34
+ "@aeriajs/types": "^0.0.97",
35
35
  "bson": "^6.5.0"
36
36
  },
37
37
  "scripts": {
38
38
  "test": "vitest run",
39
- "lint": "eslint src",
40
- "lint:fix": "eslint src --fix",
39
+ "lint": "eslint .",
40
+ "lint:fix": "eslint . --fix",
41
41
  "build": "pnpm build:cjs && pnpm build:esm",
42
42
  "build:cjs": "tsc",
43
43
  "build:esm": "esbuild './src/**/*.ts' --outdir=dist --out-extension:.js=.mjs && pnpm build:esm-transform",