An Angular CLI workspace created by Angular CLI version 17.0.2 to host some Angular utils
That's it 😜 But whatever ones are to come 🔮 will live here
🏡 for ngx-meta library. And whatever ones are to come :)
Home Page: https://ngx-meta.dev
License: MIT License
An Angular CLI workspace created by Angular CLI version 17.0.2 to host some Angular utils
That's it 😜 But whatever ones are to come 🔮 will live here
Current route metadta types for scoped metadata (standard, open graph, open graph profile, ...) set the proper type but don't allow undefined
to be there. So in case you define a generic type that may allow some kind of scoped metadata, but may not be there in some cases, you have to do some workarounds
To take into account in #90
For instance, we can warn about things development, but keep quiet on production.
Angular does it quite often:
https://github.com/angular/angular/blob/17.0.7/packages/router/src/router_module.ts#L38-L39
This ngDevMode
constant is a private util for @angular
though. Not available outside
However, we can use isDevMode
which actually uses that ngDevMode
const under the hood
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
semantic-release cannot push the version tag to the branch main
on the remote Git repository with URL https://x-access-token:[secure]@github.com/davidlj95/ngx
.
This can be caused by:
Good luck with your project ✨
Your semantic-release bot 📦🚀
Currently, we export XMetadataRouteData
so that you can write type-safe metadata objects. However, those types are for routes only. So when using metadata types that are not for routes, you don't have types for that.
For instance, when setting defaults:
Or when calling the metadata service:
Issues:
Naming:
Functionality:
Some options:
To keep bundle size in control
We have the E2E apps in there, so we could run Source Map Explorer and keep track of results somehwere
https://github.com/davidlj95/chrislb/blob/main/package.json#L29
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
package.json
file.A package.json file at the root of your project is required to release on npm.
Please follow the npm guideline to create a valid package.json
file.
Good luck with your project ✨
Your semantic-release bot 📦🚀
Mainly, Metadata
's constructor accepting a {name: string, scope: string, globalName: string}
.
Argument names end up in app bundles. So a lot of repeated name
, scope
and globalName
around.
Some bytes could be saved in there
Explain how lib works so fellow devs can use it as fast as possible
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
package.json
file.A package.json file at the root of your project is required to release on npm.
Please follow the npm guideline to create a valid package.json
file.
Good luck with your project ✨
Your semantic-release bot 📦🚀
Could be nice to avoid users to migrate to setting the client using the lib if they're using a TitleStrategy already
To take into account: Route.title
Given the path to values will be scope.name
maybe we can leave that to be a part of a new definition: ScopedMetadataDefinition
Given the MetadataDefinition
main interface requires to provide an id and then ScopedMetadataDefinition
builds this by doing scope.name
.
This would help with JSON LD, that isn't scoped. So the id is just jsonLd
. And no global name, given jsonLd
is already kind of a global as not scoped.
Relates to #97
ngx-meta
After using latest version of library in a real life app, found out the IDE lets you import same thing from several places.
For instance, if importing something from core
entry point, it suggests you can import it from:
@davidlj95/ngx-meta/core
: the right one. Things are actually there for both flattened & unflattened exports.@davidlj95/ngx-meta/core/public-api
: shouldn't be used, as that public-api
file could change@davidlj95/ngx-meta/core/src/some-file
: shouldn't be used, as that some-file
filename / path could change.In order to avoid using non-recommended imports 2/3, we should rollup our Typescript definitions, as Angular Package Format recommends.
API Extractor is recommended for that purpose. Which we already use for the API Report and docs.
So seems we'll need to go another way
1.0.0-alpha.45
import { GlobalMetadata } from '@davidlj95/ngx-meta/core'
Originally posted by davidlj95 March 21, 2024
Sometimes it fails due to rate limit. Maybe that's because search API consumes many calls internally
Can detect errors that don't appear in compilation. Like files not used directly in compilation
There's no easy way of doing so right now
According to standard:
twitter:description
: maximum 200 charactersog:description
: A one to two sentence description of your objectSo could be nice to apply those restrictions
It's what we actually need to upsert or remove using Angular's Meta
Better not to expose everything to avoid doing too many breaking changes
Bundle size is quite too big due to lots of features being provided in there. Firstly, modules take way too much space (Open Graph, Twitter card) when they're essentially just setting some <meta>
elements. That's preventing myself from using the library. Given I'd honestly prefer to just apply those using Angular's Meta
service from a performance point of view.
For instance, each metadata setter given it's injectable, has some overhead. So what it could be just a call to the MetaService
to update a meta tag is envolved with much code around. Which increases the bundle size.
For instance, let's look at the DescriptionStandardMetadata
when gets compiled for production (beautified for visualisation purposes)
Uc = 'description',
Fw = (() => {
let e = class e extends Ge {
constructor(n) {
super(Uc, Uc), (this.metaService = n)
}
set(n) {
this.metaService.set(new Vt(Uc), n)
}
}
;(e.ɵfac = function (o) {
return new (o || e)(p(V))
}),
(e.ɵprov = g({ token: e, factory: e.ɵfac }))
let t = e
return t
})(),
That's 256 characters when picking it raw from the bundle (no whitespaces / new lines). So 256 bytes.
When the actual call that matters: this.metaService.set(new Vt(Uc), n)
takes 35 chars -> 35 bytes. That's 221 bytes extra per each metadata.
Those 221 bytes are dedicated to:
Which could be reduced to just 1 per each kind of metadata type (Open Graph, Twitter Card, Standard, ...)
In Open Graph, if just joining was enough, that would mean saving 6 times 221 bytes (there are 7 metadata). So 1,326B -> 1.3kB.
Let's reduce the bundle size. For instance, by joining all metadata setters in one class
See #150 to see how a reduction was possible whilst still allowing to configure individual metadata setters 🤓
ngx-meta
Provided a default canonical URL as a URL object*. Then, provided a canonical URL in some page's route metadata as a URL object.
The result is the page setting canonical URL metadata elements to [object Object]
instead of the one in the route.
*A bit weird use case to have a default canonical URL. But the same bug may appear in other scenarios due to the code causing it.
1.0.0-alpha.47
Set a default canonical URL using a URL
object
NgxMetaCoreModule.forRoot({
defaults: { canonicalUrl: new URL('https://example.org')} satisfies GlobalMetadata,
}),
Then, set a canonical URL using a URL
object too
const routes: Routes = [
// ...
{
path: 'example',
component: ExamplePageComponent,
data: {
meta: { canonicalUrl: new URL('https://example.org/example') }
} satisfies NgxMetadataRouteData<GlobalMetadata>
},
// ...
]
Canonical URL could be automatic. For instance, by providing the app's base URL, then, using the route information, retrieve the page URL. And assume it's the canonical URL unless another is configured.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
.github/actions/setup/action.yml
pnpm/action-setup v4.0.0@fe02b34f77f8bc703788d5817da081398fad5dd2
actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/pull-request-completed.yml
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
actions/github-script v7@60a0d83039c74a4aee543508d2ffcb1c3799cdea
peter-evans/find-comment v3@3eae4d37986fb5a8592848f6a574fdf654e61f9e
peter-evans/create-or-update-comment v4@71345be0265236311c031f5c7866368bd1eff043
.github/workflows/reusable-api-extractor.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
.github/workflows/reusable-build.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/cache v4@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
.github/workflows/reusable-bundle-size.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
pnpm/action-setup v4.0.0@fe02b34f77f8bc703788d5817da081398fad5dd2
actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
actions/github-script v7@60a0d83039c74a4aee543508d2ffcb1c3799cdea
actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
actions/github-script v7@60a0d83039c74a4aee543508d2ffcb1c3799cdea
.github/workflows/reusable-docs.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
actions/setup-python v5@82c7e631bb3cdc910f68e0081d67478d79c6982d
pnpm/action-setup v4.0.0@fe02b34f77f8bc703788d5817da081398fad5dd2
actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
actions/cache v4@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
cloudflare/pages-action 1@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca
.github/workflows/reusable-e2e.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
pnpm/action-setup v4.0.0@fe02b34f77f8bc703788d5817da081398fad5dd2
actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
actions/cache v4@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
cypress-io/github-action v6.6.1@1b70233146622b69e789ccdd4f9452adc638d25a
.github/workflows/reusable-example-apps.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
pnpm/action-setup v4.0.0@fe02b34f77f8bc703788d5817da081398fad5dd2
actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
actions/cache v4@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
.github/workflows/reusable-lint.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
.github/workflows/reusable-release.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/download-artifact v4@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
peter-evans/create-pull-request v6@6d6857d36972b65feb161a90e484f2984215f83e
.github/workflows/reusable-style.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
.github/workflows/reusable-test.yml
actions/checkout v4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
.node-version
node 20.13.1
package.json
@angular/animations 17.3.8
@angular/common 17.3.8
@angular/compiler 17.3.8
@angular/core 17.3.8
@angular/forms 17.3.8
@angular/platform-browser 17.3.8
@angular/platform-browser-dynamic 17.3.8
@angular/router 17.3.8
rxjs 7.8.1
tslib 2.6.2
zone.js 0.14.5
@angular-devkit/build-angular 17.3.7
@angular-eslint/builder 17.4.0
@angular-eslint/eslint-plugin 17.4.0
@angular-eslint/eslint-plugin-template 17.4.0
@angular-eslint/schematics 17.4.0
@angular-eslint/template-parser 17.4.0
@angular/cli 17.3.7
@angular/compiler-cli 17.3.8
@commitlint/cli 19.3.0
@commitlint/config-conventional 19.2.2
@microsoft/api-documenter 7.23.38
@microsoft/api-extractor 7.43.4
@semantic-release/changelog 6.0.3
@types/jasmine 5.1.4
@typescript-eslint/eslint-plugin 7.8.0
@typescript-eslint/parser 7.8.0
conventional-changelog-conventionalcommits 7.0.2
dts-bundle-generator 9.5.1
eslint 8.57.0
eslint-config-prettier 9.1.0
husky 9.0.11
jasmine-core 5.1.2
karma 6.4.3
karma-chrome-launcher 3.2.0
karma-coverage 2.2.1
karma-jasmine 5.1.0
karma-jasmine-html-reporter 2.1.0
lint-staged 15.2.2
ng-lint-staged 12.0.4
ng-mocks 14.12.2
ng-packagr 17.3.0
prettier 3.2.5
semantic-release 23.1.1
typescript 5.4.5
pnpm 9.1.0
projects/ngx-meta/bundle-size/package.json
source-map-explorer 2.5.3
pnpm 9.1.0
projects/ngx-meta/docs/package.json
@fontsource-variable/inter-tight 5.0.21
@fontsource/dm-mono 5.0.20
projects/ngx-meta/e2e/package.json
cypress 13.9.0
typescript 5.4.5
pnpm 9.1.0
projects/ngx-meta/example-apps/package.json
@types/node 20.12.11
@types/semver 7.5.8
execa 9.0.2
semver 7.6.2
ts-morph 22.0.0
typescript 5.4.5
pnpm 9.1.0
projects/ngx-meta/example-apps/src/angular-cli-versions.json
v15 15.2.11
v16 16.2.14
v17 17.3.7
pnpm 9.1.0
projects/ngx-meta/src/package.json
tslib ^2.3.0
@angular/common ^17 || ^16 || ^15
@angular/core ^17 || ^16 || ^15
@angular/router ^17 || ^16 || ^15
projects/ngx-meta/docs/pyproject.toml
projects/ngx-meta/docs/pyproject.toml
python ==3.12.3
mkdocs-autolinks-plugin 0.7.1
mkdocs-material 9.5.21
mkdocs-git-revision-date-localized-plugin 1.2.5
Given right now, we need to use a converter to importing modules at bootstrap time
ngx/projects/ngx-meta/e2e/a17/src/app/app.config.ts
Lines 15 to 22 in 111a699
Whilst the new way with standalone apps is to use provideX
methods
Those create environment injectors, which can't be used by component injectors. That can bring new possibilities
So we can add something like provideNgxMetaRouting()
for instance
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
tarballDir
option.The tarballDir option option, if defined, must be a String
.
Your configuration for the tarballDir
option is true
.
Good luck with your project ✨
Your semantic-release bot 📦🚀
Would be nice to ensure that functionality, cost is not much
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.