Skip to content
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

docs(deprecations): add deprecation page #3981

Merged
merged 3 commits into from
Aug 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion docs_app/content/file-not-found.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
<p>We're sorry. The page you are looking for cannot be found.</p>
</div>
</div>
<aio-file-not-found-search></aio-file-not-found-search>
108 changes: 56 additions & 52 deletions docs_app/content/navigation.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,60 @@
{
"TopBar": [
{
"url": "guide/overview",
"title": "Overview"
},
{
"url": "api",
"title": "Reference"
},
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "team",
"title": "Team"
}
],
"TopBar": [
{
"url": "guide/overview",
"title": "Overview"
},
{
"url": "api",
"title": "Reference"
},
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "team",
"title": "Team"
}
],

"TopBarNarrow": [],
"TopBarNarrow": [],

"SideNav": [
{
"url": "guide/overview",
"title": "Overview",
"tooltip": "RxJS Overview"
},
{
"url": "guide/installation",
"title": "Installation",
"tooltip": "Installation"
},
{
"url": "api",
"title": "Reference",
"tooltip": "RxJS Reference"
},
{
"title": "About Version 6",
"children": [
{
"url": "guide/v6/migration",
"title": "Migration"
}
]
},
{
"url": "code-of-conduct",
"title": "Code of Conduct",
"tooltip": "Code of Conduct"
}
],
"docVersions": []
"SideNav": [
{
"url": "guide/overview",
"title": "Overview",
"tooltip": "RxJS Overview"
},
{
"url": "guide/installation",
"title": "Installation",
"tooltip": "Installation"
},
{
"url": "api",
"title": "Reference",
"tooltip": "RxJS Reference"
},
{
"title": "About Version 6",
"children": [
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "api/deprecations",
"title": "Deprecations",
"tooltip": "List of Deprecations"
}
]
},
{
"url": "code-of-conduct",
"title": "Code of Conduct",
"tooltip": "Code of Conduct"
}
],
"docVersions": []
}

2 changes: 1 addition & 1 deletion docs_app/src/app/navigation/navigation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class NavigationService {
this.location.currentPath,

(navMap, url) => {
const urlKey = url.startsWith('api/') ? 'api' : url;
const urlKey = url.startsWith('api/') && !url.endsWith('deprecations') ? 'api' : url;
return navMap.get(urlKey) || { '' : { view: '', url: urlKey, nodes: [] }};
})
.pipe(publishReplay(1));
Expand Down
6 changes: 4 additions & 2 deletions docs_app/tools/transforms/angular-api-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
.processor(require('./processors/splitDescription'))
.processor(require('./processors/convertPrivateClassesToInterfaces'))
.processor(require('./processors/generateApiListDoc'))
.processor(require('./processors/generateDeprecationsListDoc'))
.processor(require('./processors/addNotYetDocumentedProperty'))
.processor(require('./processors/mergeDecoratorDocs'))
.processor(require('./processors/extractDecoratedClasses'))
Expand All @@ -41,7 +42,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
* more Angular specific API types, such as decorators and directives.
*/
.factory(function API_DOC_TYPES_TO_RENDER(EXPORT_DOC_TYPES) {
return EXPORT_DOC_TYPES.concat(['decorator', 'directive', 'pipe', 'module']);
return EXPORT_DOC_TYPES.concat(['decorator', 'directive', 'pipe', 'module', 'deprecation']);
})

/**
Expand Down Expand Up @@ -146,11 +147,12 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
splitDescription.docTypes = API_DOC_TYPES;
})

.config(function(computePathsProcessor, EXPORT_DOC_TYPES, generateApiListDoc) {
.config(function(computePathsProcessor, EXPORT_DOC_TYPES, generateApiListDoc, generateDeprecationListDoc) {

const API_SEGMENT = 'api';

generateApiListDoc.outputFolder = API_SEGMENT;
generateDeprecationListDoc.outputFolder = API_SEGMENT;

computePathsProcessor.pathTemplates.push({
docTypes: ['module'],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = function generateDeprecationListDoc() {

return {
$runAfter: ['extra-docs-added'],
$runBefore: ['rendering-docs'],
outputFolder: null,
$process: function(docs) {
docs.push({
docType: 'deprecation',
template: 'json-doc.template.json',
path: this.outputFolder + '/deprecations',
outputPath: this.outputFolder + '/deprecations.json',
data: docs
.filter(doc => doc.deprecated)
.map(doc => {
return {
name: doc.name,
type: doc.docType,
path: doc.path,
text: doc.deprecated
};
})
});
}
};
};
20 changes: 20 additions & 0 deletions docs_app/tools/transforms/templates/api/deprecation.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% block overview %}
<section class="deprecations">
<h1>Deprecations</h1>
<p class="important">The API listed below will be removed in the next major release!</p>
<table>
{% for deprecation in doc.data %}
<tr>
<td>
<a href="{$ deprecation.path $}">{$ deprecation.name $}</a>
</td>
<td>
{$ deprecation.text $}
</td>
</tr>
{% endfor %}
</table>
</section>
{% endblock %}


2 changes: 1 addition & 1 deletion src/internal/Observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class Observable<T> implements Subscribable<T> {
}) as Promise<void>;
}

/** @deprecated This is an internal implementation detail, do not use. */
/** @internal This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<any>): TeardownLogic {
const { source } = this;
return source && source.subscribe(subscriber);
Expand Down
2 changes: 1 addition & 1 deletion src/internal/Subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class SafeSubscriber<T> extends Subscriber<T> {
return false;
}

/** @deprecated This is an internal implementation detail, do not use. */
/** @internal This is an internal implementation detail, do not use. */
_unsubscribe(): void {
const { _parentSubscriber } = this;
this._context = null;
Expand Down
2 changes: 1 addition & 1 deletion src/internal/observable/empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const EMPTY = new Observable<never>(subscriber => subscriber.complete());
* @static true
* @name empty
* @owner Observable
* @deprecated Deprecated in favor of using EMPTY constant.
* @deprecated Deprecated in favor of using {@link index/EMPTY} constant.
*/
export function empty(scheduler?: SchedulerLike) {
return scheduler ? emptyScheduled(scheduler) : EMPTY;
Expand Down
2 changes: 1 addition & 1 deletion src/internal/observable/never.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { noop } from '../util/noop';
export const NEVER = new Observable<never>(noop);

/**
* @deprecated Deprecated in favor of using NEVER constant.
* @deprecated Deprecated in favor of using {@link NEVER} constant.
*/
export function never () {
return NEVER;
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operators/combineLatest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function combineLatest<T, TOther, R>(array: ObservableInput<TOther>[], pr
/* tslint:enable:max-line-length */

/**
* @deprecated Deprecated in favor of static combineLatest.
* @deprecated Deprecated in favor of static {@link combineLatest}.
*/
export function combineLatest<T, R>(...observables: Array<ObservableInput<any> |
Array<ObservableInput<any>> |
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operators/concat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function concat<T, R>(...observables: Array<ObservableInput<any> | Schedu
/* tslint:enable:max-line-length */

/**
* @deprecated Deprecated in favor of static concat.
* @deprecated Deprecated in favor of static {@link concat}.
*/
export function concat<T, R>(...observables: Array<ObservableInput<any> | SchedulerLike>): OperatorFunction<T, R> {
return (source: Observable<T>) => source.lift.call(concatStatic<T, R>(source, ...observables));
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operators/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function merge<T, R>(...observables: Array<ObservableInput<any> | Schedul
/* tslint:enable:max-line-length */

/**
* @deprecated Deprecated in favor of static merge.
* @deprecated Deprecated in favor of static {@link merge}.
*/
export function merge<T, R>(...observables: Array<ObservableInput<any> | SchedulerLike | number>): OperatorFunction<T, R> {
return (source: Observable<T>) => source.lift.call(mergeStatic(source, ...observables));
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operators/race.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function race<T, R>(...observables: Array<Observable<any> | Array<Observa
* @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.
* @method race
* @owner Observable
* @deprecated Deprecated in favor of static race.
* @deprecated Deprecated in favor of static {@link race}.
*/
export function race<T>(...observables: Array<Observable<T> | Array<Observable<T>>>): MonoTypeOperatorFunction<T> {
return function raceOperatorFunction(source: Observable<T>) {
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operators/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function zip<T, TOther, R>(array: Array<ObservableInput<TOther>>, project
/* tslint:enable:max-line-length */

/**
* @deprecated Deprecated in favor of static zip.
* @deprecated Deprecated in favor of static {@link zip}.
*/
export function zip<T, R>(...observables: Array<ObservableInput<any> | ((...values: Array<any>) => R)>): OperatorFunction<T, R> {
return function zipOperatorFunction(source: Observable<T>) {
Expand Down