aveazul 2.1.0 → 2.1.1

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/aveazul.d.ts CHANGED
@@ -78,6 +78,19 @@ declare class AveAzul<T> extends Promise<T> {
78
78
  * no need to explicitly wrap returns in new AveAzul(). This behavior is standard across all
79
79
  * spec-compliant JS engines (V8, SpiderMonkey, JavaScriptCore, etc).
80
80
  */
81
+ /**
82
+ * The instance-side counterpart to the `declare static` block above, and for the same reason:
83
+ * `then`/`catch`/`finally` construct through `this` (SpeciesConstructor), so each one really
84
+ * hands back an AveAzul -- but `Promise`'s lib types say plain `Promise`, so the first link in
85
+ * any chain loses every bluebird method and callers need `as AveAzulInstance<T>` to get them
86
+ * back. These are `declare`, so nothing is emitted and no runtime behavior changes.
87
+ *
88
+ * `AveAzul<T>` still satisfies `Promise<T>`/`PromiseLike<T>` after this, since the returned
89
+ * AveAzul is itself a Promise - await and interop are unaffected.
90
+ */
91
+ then: <TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => AveAzul<TResult1 | TResult2>;
92
+ catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null) => AveAzul<T | TResult>;
93
+ finally: (onfinally?: (() => void) | undefined | null) => AveAzul<T>;
81
94
  /**
82
95
  * Bluebird-style tap() method that lets you perform side effects in a chain
83
96
  * Similar to Bluebird's Promise.prototype.tap()
package/dist/aveazul.js CHANGED
@@ -17,12 +17,6 @@ class AveAzul extends Promise {
17
17
  constructor(executor) {
18
18
  super(executor);
19
19
  }
20
- /**
21
- * Note: Per ECMAScript specification, when extending Promise, both .then() and static methods
22
- * (resolve, reject, all, etc) must return instances of the derived class (AveAzul), so there's
23
- * no need to explicitly wrap returns in new AveAzul(). This behavior is standard across all
24
- * spec-compliant JS engines (V8, SpiderMonkey, JavaScriptCore, etc).
25
- */
26
20
  /**
27
21
  * Bluebird-style tap() method that lets you perform side effects in a chain
28
22
  * Similar to Bluebird's Promise.prototype.tap()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aveazul",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Bluebird drop-in replacement built on native Promise",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "scripts": {
19
19
  "build": "rm -rf dist && tsc -p tsconfig.json",
20
20
  "test": "npm run vitest && npm run build && npm run demo:cjs && npm run demo:esm",
21
- "ci:check": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json && npm test",
21
+ "ci:check": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json && npm test && npm run test:bluebird",
22
22
  "vitest": "vitest run",
23
23
  "test:watch": "vitest",
24
24
  "test:coverage": "vitest run --coverage",
@@ -80,11 +80,22 @@
80
80
  "directory": "packages/aveazul"
81
81
  },
82
82
  "dependencies": {
83
- "@jchip/error": "^2.1.0",
84
- "xaa": "^3.1.0"
83
+ "@jchip/error": "^2.1.1",
84
+ "xaa": "^3.1.1"
85
+ },
86
+ "devDependencies": {
87
+ "@fynjs/ts-resolve": "^1.0.1",
88
+ "@types/node": "^26.4.1",
89
+ "@vitest/coverage-v8": "^5.0.0",
90
+ "bluebird": "^3.7.2",
91
+ "publish-util": "^3.1.1",
92
+ "run-verify": "^2.1.1",
93
+ "typescript": "^7.0.2",
94
+ "vite": "^8.2.2",
95
+ "vitest": "^5.0.0"
85
96
  },
86
97
  "engines": {
87
- "node": ">=22.18.0"
98
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
88
99
  },
89
100
  "sideEffects": false
90
101
  }