@adonisjs/events 8.4.3-0 → 8.4.5-0

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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The MIT License
2
2
 
3
- Copyright 2022 Harminder Virk, contributors
3
+ Copyright (c) 2023 AdonisJS Framework
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -1,11 +1,5 @@
1
- import { Application } from '@adonisjs/application';
1
+ import type { Application } from '@adonisjs/application';
2
2
  import { Emitter } from '../src/emitter.js';
3
- type FactoryParameters = {
4
- app: Application<any>;
5
- };
6
3
  export declare class EmitterFactory {
7
- #private;
8
- merge(params: Partial<FactoryParameters>): this;
9
- create(): Emitter<Record<string | number | symbol, any>>;
4
+ create(app: Application<any>): Emitter<Record<string | number | symbol, any>>;
10
5
  }
11
- export {};
@@ -1,15 +1,6 @@
1
- import { AppFactory } from '@adonisjs/application/test_factories/app';
2
1
  import { Emitter } from '../src/emitter.js';
3
2
  export class EmitterFactory {
4
- #parameters = {};
5
- #getApp() {
6
- return this.#parameters.app || new AppFactory().create(new URL('./app/', import.meta.url));
7
- }
8
- merge(params) {
9
- Object.assign(this.#parameters, params);
10
- return this;
11
- }
12
- create() {
13
- return new Emitter(this.#getApp());
3
+ create(app) {
4
+ return new Emitter(app);
14
5
  }
15
6
  }
@@ -0,0 +1 @@
1
+ export { EmitterFactory } from './emitter.js';
@@ -0,0 +1 @@
1
+ export { EmitterFactory } from './emitter.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/events",
3
- "version": "8.4.3-0",
3
+ "version": "8.4.5-0",
4
4
  "description": "An implementation of the event emitter built on top of emittery",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "exports": {
17
17
  ".": "./build/index.js",
18
- "./test_factories/*": "./build/test_factories/*.js",
18
+ "./factories": "./build/test_factories/main.js",
19
19
  "./types": "./build/src/types.js"
20
20
  },
21
21
  "scripts": {
@@ -39,11 +39,11 @@
39
39
  "author": "virk,adonisjs",
40
40
  "license": "MIT",
41
41
  "devDependencies": {
42
- "@adonisjs/application": "^6.8.0-0",
43
- "@adonisjs/config": "^4.1.3-0",
44
- "@adonisjs/env": "^4.1.2-0",
45
- "@adonisjs/fold": "^9.9.0-0",
46
- "@adonisjs/logger": "^5.2.0-0",
42
+ "@adonisjs/application": "^7.0.0-0",
43
+ "@adonisjs/config": "^4.2.0-0",
44
+ "@adonisjs/env": "^4.1.3-0",
45
+ "@adonisjs/fold": "^9.9.2-0",
46
+ "@adonisjs/logger": "^5.4.1-0",
47
47
  "@commitlint/cli": "^17.4.2",
48
48
  "@commitlint/config-conventional": "^17.4.2",
49
49
  "@japa/assert": "^1.3.6",
@@ -52,7 +52,7 @@
52
52
  "@japa/runner": "^2.2.2",
53
53
  "@japa/spec-reporter": "^1.3.2",
54
54
  "@poppinss/dev-utils": "^2.0.1",
55
- "@swc/core": "^1.3.27",
55
+ "@swc/core": "^1.3.29",
56
56
  "@types/fs-extra": "^11.0.1",
57
57
  "@types/node": "^18.11.18",
58
58
  "c8": "^7.12.0",
@@ -75,8 +75,8 @@
75
75
  "emittery": "^1.0.1"
76
76
  },
77
77
  "peerDependencies": {
78
- "@adonisjs/application": "^6.8.0-0",
79
- "@adonisjs/fold": "^9.9.0-0"
78
+ "@adonisjs/application": "^7.0.0-0",
79
+ "@adonisjs/fold": "^9.9.2-0"
80
80
  },
81
81
  "repository": {
82
82
  "type": "git",