-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: update to Angular 15 rc #3630
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.17 | ||
14.20 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import { ENVIRONMENT_INITIALIZER, inject, Type } from '@angular/core'; | ||
import { | ||
ENVIRONMENT_INITIALIZER, | ||
EnvironmentProviders, | ||
inject, | ||
makeEnvironmentProviders, | ||
Type, | ||
} from '@angular/core'; | ||
import { | ||
FEATURE_STATE_PROVIDER, | ||
ROOT_STORE_PROVIDER, | ||
Store, | ||
|
@@ -41,35 +46,33 @@ import { rootEffectsInit as effectsInit } from './effects_actions'; | |
export function provideEffects( | ||
...effects: Type<unknown>[] | ||
): EnvironmentProviders { | ||
return { | ||
ɵproviders: [ | ||
effects, | ||
{ | ||
provide: ENVIRONMENT_INITIALIZER, | ||
multi: true, | ||
useValue: () => { | ||
inject(ROOT_STORE_PROVIDER); | ||
inject(FEATURE_STATE_PROVIDER, { optional: true }); | ||
return makeEnvironmentProviders([ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Angular v15 now exports the |
||
effects, | ||
{ | ||
provide: ENVIRONMENT_INITIALIZER, | ||
multi: true, | ||
useValue: () => { | ||
inject(ROOT_STORE_PROVIDER); | ||
inject(FEATURE_STATE_PROVIDER, { optional: true }); | ||
|
||
const effectsRunner = inject(EffectsRunner); | ||
const effectSources = inject(EffectSources); | ||
const shouldInitEffects = !effectsRunner.isStarted; | ||
const effectsRunner = inject(EffectsRunner); | ||
const effectSources = inject(EffectSources); | ||
const shouldInitEffects = !effectsRunner.isStarted; | ||
|
||
if (shouldInitEffects) { | ||
effectsRunner.start(); | ||
} | ||
if (shouldInitEffects) { | ||
effectsRunner.start(); | ||
} | ||
|
||
for (const effectsClass of effects) { | ||
const effectsInstance = inject(effectsClass); | ||
effectSources.addEffects(effectsInstance); | ||
} | ||
for (const effectsClass of effects) { | ||
const effectsInstance = inject(effectsClass); | ||
effectSources.addEffects(effectsInstance); | ||
} | ||
|
||
if (shouldInitEffects) { | ||
const store = inject(Store); | ||
store.dispatch(effectsInit()); | ||
} | ||
}, | ||
if (shouldInitEffects) { | ||
const store = inject(Store); | ||
store.dispatch(effectsInit()); | ||
} | ||
}, | ||
], | ||
}; | ||
}, | ||
]); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ export class FullRouterStateSerializer | |
data: route.data, | ||
url: route.url, | ||
outlet: route.outlet, | ||
title: route.title, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In v15, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. * There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh ok. I was worried there for a minute 😄 |
||
routeConfig: route.routeConfig | ||
? { | ||
component: route.routeConfig.component, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Angular v15 suports Node v14.20 or higher. I also updated
"engines"
inpackage.json
to be the same as in the Angular repo.