@autofleet/sequelize-utils 5.0.3 → 5.0.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/dist/index.js CHANGED
@@ -39,7 +39,8 @@ exports.default = (sequelize) => {
39
39
  });
40
40
  // eslint-disable-next-line @typescript-eslint/ban-types
41
41
  const httpBasedTransaction = (req, cb) => transactionWithRetry((transaction) => __awaiter(void 0, void 0, void 0, function* () {
42
- req.on('abort', () => __awaiter(void 0, void 0, void 0, function* () {
42
+ // https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/test/parallel/test-http-aborted.js#L9
43
+ req.on('aborted', () => __awaiter(void 0, void 0, void 0, function* () {
43
44
  yield transaction.rollback();
44
45
  }));
45
46
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/sequelize-utils",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -30,7 +30,8 @@ export default (sequelize: Sequelize): {
30
30
 
31
31
  // eslint-disable-next-line @typescript-eslint/ban-types
32
32
  const httpBasedTransaction = (req: any, cb: Function) => transactionWithRetry(async (transaction: Transaction) => {
33
- req.on('abort', async () => {
33
+ // https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/test/parallel/test-http-aborted.js#L9
34
+ req.on('aborted', async () => {
34
35
  await transaction.rollback();
35
36
  });
36
37
  try {