Skip to content

Commit 1d865bc

Browse files
chore(*): reformat CHANGELOG.md
1 parent a5341c9 commit 1d865bc

File tree

1 file changed

+30
-25
lines changed

1 file changed

+30
-25
lines changed

CHANGELOG.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444

4545
### BREAKING CHANGES
4646

47-
* **TransitionHook:** Transition hooks no longer expose the internal `State` object (now named `StateObject`)
47+
## **TransitionHook:** Transition hooks no longer expose the internal `State` object (now named `StateObject`)
4848

49-
- #### Before:
49+
#### Before:
5050

5151
```js
5252
import { State } from "ui-router-core";
@@ -59,7 +59,7 @@ transitionsvc.onEnter(match, (trans: Transition, state: State) => {
5959
}
6060
```
6161

62-
- #### Now:
62+
#### Now:
6363

6464
```js
6565
import { StateDeclaration } from "ui-router-core";
@@ -73,37 +73,38 @@ transitionsvc.onEnter(match, (trans: Transition, state: StateDeclaration) => {
7373
}
7474
```
7575

76-
- #### Motivation:
76+
#### Motivation:
7777

7878
The `State` object (now named `StateObject`) is an internal API and should not be exposed via any public APIs.
7979
If you depend on the internal APIs, you can still access the internal object by calling `state.$$state()`.
8080

81-
- #### BC Likelihood
81+
#### BC Likelihood
8282

8383
How likely is this BC to affect me?
8484

8585
Medium: You will likely be affected you 1) have transition hooks, 2) are using typescript and/or 3) use the internal ui-router State API.
8686

87-
- #### BC Severity
87+
#### BC Severity
8888

8989
How severe is this BC?
9090

9191
Low: Access to the internal api is still available using `$$state()`.
92-
* **StateObject:** Renamed internal API `State` object to `StateObject`
9392

94-
- #### Before:
93+
## **StateObject:** Renamed internal API `State` object to `StateObject`
94+
95+
#### Before:
9596

9697
```
9798
import {State} from "ui-router-core";
9899
```
99100

100-
- #### Now:
101+
#### Now:
101102

102103
```
103104
import {StateObject} from "ui-router-core";
104105
```
105106

106-
- #### Motivation:
107+
#### Motivation:
107108

108109
We'd like to use the `State` name/symbol as a public API. It will be an
109110
ES7/TS decorator for ES6/TS state definition classes, i.e:
@@ -121,20 +122,22 @@ export class FooState implements StateDeclaration {
121122
}
122123
```
123124

124-
- #### BC Likelihood
125+
#### BC Likelihood
125126

126127
How likely is this to affect me?
127128

128129
Low: This only affects code that imports the internal API symbol `State`.
129130
You will likely be affected you 1) import that symbol, 2) are using typescript and 3) explicitly
130131
typed a variable such as `let internalStateObject = state.$$state();`
131132

132-
- #### BC Severity
133+
#### BC Severity
133134

134135
How severe is this change?
135136

136137
Low: Find all places where `State` is imported and rename to `StateObject`
137-
* **Transition:** All Transition errors are now wrapped in a Rejection object.
138+
139+
140+
## **Transition:** All Transition errors are now wrapped in a Rejection object.
138141

139142
#### Before:
140143

@@ -181,9 +184,10 @@ Medium: apps which have onError handlers for rejected values
181184
How severe is this change?
182185

183186
Low: Find all error handlers (or .catch/.then chains) that do not understand Rejection. Add `err.detail` processing.
184-
* **onBefore:** `onBefore` hooks are now run asynchronously like all the other hooks.
185187

186-
- #### Old behavior
188+
## **onBefore:** `onBefore` hooks are now run asynchronously like all the other hooks.
189+
190+
#### Old behavior
187191

188192
Previously, the `onBefore` hooks were run in the same stackframe as `transitionTo`.
189193
If they threw an error, it could be caught using try/catch.
@@ -197,7 +201,7 @@ try {
197201
}
198202
```
199203

200-
- #### New behavior
204+
#### New behavior
201205

202206
Now, `onBefore` hooks are processed asynchronously.
203207
To handle errors, use any of the async error handling paradigms:
@@ -220,56 +224,57 @@ To handle errors, use any of the async error handling paradigms:
220224
stateService.defaultErrorHandler(error => { // global error handler });
221225
```
222226

223-
- #### Motivation
227+
#### Motivation
224228

225229
Why introduce a BC?
226230

227231
- No subtle behavior differences by hook type
228232
- Simpler code and mental model
229233
- Fewer edge cases to account for
230234

231-
- #### BC Liklihood
235+
#### BC Liklihood
232236

233237
How likely is this to affect my app?
234238

235239
Very Low: Apps that registered onBefore hooks and depend on
236240
synchronous execution are affected.
237241

238-
- #### BC Severity
242+
#### BC Severity
239243

240244
How severe is this BC?
241245

242246
Low: Switch to asynchronous handling, such as chaining off the
243247
transition promise
244-
* **defaultErrorHandler:** ABORTED transitions do not invoke the `defaultErrorHandler`
248+
249+
## **defaultErrorHandler:** ABORTED transitions do not invoke the `defaultErrorHandler`
245250

246251
Returning `false` from a transition hook will abort the transition.
247252

248-
- #### Old behavior
253+
#### Old behavior
249254

250255
Previously, this case was considered an error and was logged by
251256
`defaultErrorHandler`.
252257
After your feedback, we agree that this is not typically an error.
253258

254-
- #### New behavior
259+
#### New behavior
255260

256261
Now, aborted transitions do not trigger the `defaultErrorHandler`
257262

258-
- #### Motivation:
263+
#### Motivation:
259264

260265
> Why introduce a BC?
261266

262267
Most users do not consider ABORT to be an error. The default error
263268
handler should match this assumption.
264269

265-
- #### BC liklihood
270+
#### BC liklihood
266271

267272
> How likely am I to be affected?
268273

269274
Low: Most users do not consider ABORT to be an error. For most users
270275
this will not be a BC.
271276

272-
- #### BC severity
277+
#### BC severity
273278

274279
> How severe is this BC?
275280

0 commit comments

Comments
 (0)