@roots/bud-client 6.20.0 → 6.22.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/README.md CHANGED
@@ -69,9 +69,6 @@ However, the amount of effort needed to maintain and develop new features and pr
69
69
  <a href="https://worksitesafety.ca/careers/">
70
70
  <img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="200" height="150"/>
71
71
  </a>
72
- <a href="https://www.copiadigital.com/">
73
- <img src="https://cdn.roots.io/app/uploads/copia-digital.svg" alt="Copia Digital" width="200" height="150"/>
74
- </a>
75
- <a href="https://www.freave.com/">
76
- <img src="https://cdn.roots.io/app/uploads/freave.svg" alt="Freave" width="200" height="150"/>
72
+ <a href="https://www.itineris.co.uk/">
73
+ <img src="https://cdn.roots.io/app/uploads/itineris.svg" alt="Itineris" width="200" height="150"/>
77
74
  </a>
@@ -2,10 +2,10 @@ interface EventSourceFactory {
2
2
  new (path: string): EventSource;
3
3
  }
4
4
  export declare const injectEvents: (eventSource: EventSourceFactory) => {
5
- new (options: Partial<Options> & {
5
+ new (options: {
6
6
  name: string;
7
7
  path: string;
8
- }): {
8
+ } & Partial<Options>): {
9
9
  /**
10
10
  * Registered listeners
11
11
  */
@@ -18,10 +18,10 @@ export declare const injectEvents: (eventSource: EventSourceFactory) => {
18
18
  * EventSource `onopen` handler
19
19
  */
20
20
  onopen: () => void;
21
- options: Partial<Options> & {
21
+ options: {
22
22
  name: string;
23
23
  path: string;
24
- };
24
+ } & Partial<Options>;
25
25
  /**
26
26
  * EventSource `addMessageListener` handler
27
27
  */
@@ -46,10 +46,10 @@ export declare const injectEvents: (eventSource: EventSourceFactory) => {
46
46
  * Singleton constructor
47
47
  *
48
48
  */
49
- make(options: Partial<Options> & {
49
+ make(options: {
50
50
  name: string;
51
51
  path: string;
52
- }): {
52
+ } & Partial<Options>): {
53
53
  /**
54
54
  * Registered listeners
55
55
  */
@@ -62,10 +62,10 @@ export declare const injectEvents: (eventSource: EventSourceFactory) => {
62
62
  * EventSource `onopen` handler
63
63
  */
64
64
  onopen: () => void;
65
- options: Partial<Options> & {
65
+ options: {
66
66
  name: string;
67
67
  path: string;
68
- };
68
+ } & Partial<Options>;
69
69
  /**
70
70
  * EventSource `addMessageListener` handler
71
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roots/bud-client",
3
- "version": "6.20.0",
3
+ "version": "6.22.0",
4
4
  "description": "Client scripts for @roots/bud",
5
5
  "engines": {
6
6
  "node": ">=16"
@@ -69,9 +69,9 @@
69
69
  "types": "./lib/index.d.ts",
70
70
  "module": "./lib/index.mjs",
71
71
  "devDependencies": {
72
- "@roots/bud": "6.20.0",
72
+ "@roots/bud": "6.22.0",
73
73
  "@skypack/package-check": "0.2.2",
74
- "@types/node": "20.10.5",
74
+ "@types/node": "20.12.8",
75
75
  "@types/webpack-env": "1.18.4"
76
76
  },
77
77
  "dependencies": {
package/src/hot/client.ts CHANGED
@@ -84,8 +84,8 @@ export const client = async (
84
84
  }
85
85
 
86
86
  const onAccepted = (info: __WebpackModuleApi.HotNotifierInfo) => {
87
- window.bud.controllers.map(
88
- controller => controller?.update({action: `sync`, errors: []}),
87
+ window.bud.controllers.map(controller =>
88
+ controller?.update({action: `sync`, errors: []}),
89
89
  )
90
90
  }
91
91
 
@@ -93,8 +93,8 @@ export const client = async (
93
93
  * Webpack HMR error handler
94
94
  */
95
95
  const onErrored = (error: any) => {
96
- window.bud.controllers.map(
97
- controller => controller?.update({errors: [error]}),
96
+ window.bud.controllers.map(controller =>
97
+ controller?.update({errors: [error]}),
98
98
  )
99
99
  }
100
100
 
package/src/hot/events.ts CHANGED
@@ -16,7 +16,7 @@ export const injectEvents = (eventSource: EventSourceFactory) => {
16
16
  *
17
17
  */
18
18
  public static make(
19
- options: Partial<Options> & {name: string; path: string},
19
+ options: {name: string; path: string} & Partial<Options>,
20
20
  ): Events {
21
21
  if (typeof window.bud.hmr[options.name] === `undefined`)
22
22
  Object.assign(window.bud.hmr, {
@@ -63,7 +63,7 @@ export const injectEvents = (eventSource: EventSourceFactory) => {
63
63
  *
64
64
  */
65
65
  private constructor(
66
- public options: Partial<Options> & {name: string; path: string},
66
+ public options: {name: string; path: string} & Partial<Options>,
67
67
  ) {
68
68
  super(options.path)
69
69