Skip to content

Commit

Permalink
refactor: hide JSON-LD provider, switch to Provider around
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlj95 committed Oct 31, 2024
1 parent df4af13 commit 1069d4e
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 22 deletions.
13 changes: 5 additions & 8 deletions projects/ngx-meta/api-extractor/ngx-meta.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,11 @@ export type OpenGraphProfileGender = typeof OPEN_GRAPH_PROFILE_GENDER_FEMALE | t
// @public
export type OpenGraphType = typeof OPEN_GRAPH_TYPE_MUSIC_SONG | typeof OPEN_GRAPH_TYPE_MUSIC_ALBUM | typeof OPEN_GRAPH_TYPE_MUSIC_PLAYLIST | typeof OPEN_GRAPH_TYPE_MUSIC_RADIO_STATION | typeof OPEN_GRAPH_TYPE_VIDEO_MOVIE | typeof OPEN_GRAPH_TYPE_VIDEO_EPISODE | typeof OPEN_GRAPH_TYPE_VIDEO_TV_SHOW | typeof OPEN_GRAPH_TYPE_VIDEO_OTHER | typeof OPEN_GRAPH_TYPE_ARTICLE | typeof OPEN_GRAPH_TYPE_BOOK | typeof OPEN_GRAPH_TYPE_PROFILE | typeof OPEN_GRAPH_TYPE_WEBSITE;

// @public
export const provideJsonLdInHead: () => Provider;

// @public
export const provideNgxMetaCore: (...features: CoreFeatures) => EnvironmentProviders;

// @public
export const provideNgxMetaJsonLd: () => Provider[];
export const provideNgxMetaJsonLd: () => Provider;

// Warning: (ae-incompatible-release-tags) The symbol "provideNgxMetaManager" is marked as @public, but its signature references "_ProvideNgxMetaManagerOptions" which is marked as @internal
//
Expand Down Expand Up @@ -415,19 +412,19 @@ export type _ProvideNgxMetaModuleManagerOptions<T> = Partial<{
}> & _ProvideNgxMetaManagerOptions;

// @public
export const provideNgxMetaOpenGraph: () => Provider[];
export const provideNgxMetaOpenGraph: () => Provider;

// @public
export const provideNgxMetaOpenGraphProfile: () => Provider[];
export const provideNgxMetaOpenGraphProfile: () => Provider;

// @public
export const provideNgxMetaRouting: () => EnvironmentProviders;

// @public
export const provideNgxMetaStandard: () => Provider[];
export const provideNgxMetaStandard: () => Provider;

// @public
export const provideNgxMetaTwitterCard: () => Provider[];
export const provideNgxMetaTwitterCard: () => Provider;

// @public
export const provideOpenGraphDescription: () => Provider;
Expand Down
1 change: 0 additions & 1 deletion projects/ngx-meta/src/json-ld/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './src/managers'
export * from './src/types'
export * from './src/providers'
1 change: 0 additions & 1 deletion projects/ngx-meta/src/json-ld/src/managers/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { provideNgxMetaJsonLd } from './provide-ngx-meta-json-ld'
* @public
*/
@NgModule({
providers: provideNgxMetaJsonLd(),
providers: [provideNgxMetaJsonLd()],
})
export class NgxMetaJsonLdModule {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { provideJsonLdInHead } from '../managers'
import { provideJsonLdInHead } from '../managers/provide-json-ld-in-head'
import { Provider } from '@angular/core'

/**
Expand All @@ -12,4 +12,4 @@ import { Provider } from '@angular/core'
*
* @public
*/
export const provideNgxMetaJsonLd = (): Provider[] => [provideJsonLdInHead()]
export const provideNgxMetaJsonLd = (): Provider => [provideJsonLdInHead()]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface JsonLdMetadata {
*
* Provider:
*
* {@link provideJsonLdInHead}
* {@link provideNgxMetaJsonLd}
*/
readonly jsonLd?: object | null
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { provideNgxMetaOpenGraph } from './provide-ngx-meta-open-graph'
* @public
*/
@NgModule({
providers: provideNgxMetaOpenGraph(),
providers: [provideNgxMetaOpenGraph()],
})
export class NgxMetaOpenGraphModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
*
* @public
*/
export const provideNgxMetaOpenGraph = (): Provider[] => [
export const provideNgxMetaOpenGraph = (): Provider => [
provideOpenGraphTitle(),
provideOpenGraphType(),
provideOpenGraphImage(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { provideNgxMetaOpenGraphProfile } from './provide-ngx-meta-open-graph-pr
* @public
*/
@NgModule({
providers: provideNgxMetaOpenGraphProfile(),
providers: [provideNgxMetaOpenGraphProfile()],
})
export class NgxMetaOpenGraphProfileModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
*
* @public
*/
export const provideNgxMetaOpenGraphProfile = (): Provider[] => [
export const provideNgxMetaOpenGraphProfile = (): Provider => [
provideOpenGraphProfileFirstName(),
provideOpenGraphProfileLastName(),
provideOpenGraphProfileUsername(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { provideNgxMetaStandard } from './provide-ngx-meta-standard'
* @public
*/
@NgModule({
providers: provideNgxMetaStandard(),
providers: [provideNgxMetaStandard()],
})
export class NgxMetaStandardModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
*
* @public
*/
export const provideNgxMetaStandard = (): Provider[] => [
export const provideNgxMetaStandard = (): Provider => [
provideStandardTitle(),
provideStandardDescription(),
provideStandardAuthor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { provideNgxMetaTwitterCard } from './provide-ngx-meta-twitter-card'
* @public
*/
@NgModule({
providers: provideNgxMetaTwitterCard(),
providers: [provideNgxMetaTwitterCard()],
})
export class NgxMetaTwitterCardModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
*
* @public
*/
export const provideNgxMetaTwitterCard = (): Provider[] => [
export const provideNgxMetaTwitterCard = (): Provider => [
provideTwitterCardCard(),
provideTwitterCardSite(),
provideTwitterCardCreator(),
Expand Down

0 comments on commit 1069d4e

Please sign in to comment.