-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upgrade): return a function (instead of array) from `downgradeIn…
…jectable()` (#14037) This makes it more consistent with the dynamic version of `upgrade` and makes it possible to share code between the dynamic and static versions. This commit also refactors the file layout, moving common and dynamic-specific files to `common/` and `dynamic/` directories respectively and renaming `aot/` to `static/`. Some private keys, used as AngularJS DI tokens, have also been renamed, but this should not affect apps, since these keys are undocumented and not supposed to be used externally. BREAKING CHANGE: Previously, `upgrade/static/downgradeInjectable` returned an array of the form: ```js ['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }] ``` Now it returns a function with an `$inject` property: ```js factory.$inject = ['dep1', 'dep2', ...]; function factory(dep1, dep2, ...) { ... } ``` It shouldn't affect the behavior of apps, since both forms are equally suitable to be used for registering AngularJS injectable services, but it is possible that type-checking might fail or that current code breaks if it relies on the returned value being an array.
- Loading branch information
Showing
35 changed files
with
169 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.