fix(metadata): update package metadata and align company schema integration with latest tsclass types

This commit is contained in:
2026-05-01 18:23:23 +00:00
parent 75d64e1ebd
commit a59dbc12e5
17 changed files with 7100 additions and 3901 deletions
+42
View File
@@ -0,0 +1,42 @@
{
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmRegistryUrl": "registry.npmjs.org"
},
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "websetup",
"shortDescription": "web metadata setup utilities",
"description": "A library for setting up basic properties of a web page including meta tags, OpenGraph tags, JSON-LD structured data, with support for dynamic content.",
"npmPackagename": "@push.rocks/websetup",
"license": "MIT",
"keywords": [
"web development",
"SEO",
"OpenGraph",
"JSON-LD",
"meta tags",
"structured data",
"TypeScript",
"dynamic content",
"website setup",
"smart delay",
"smart promise",
"tag management"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}
+52
View File
@@ -0,0 +1,52 @@
# Changelog
## 2026-05-01 - 3.0.20 - fix(metadata)
update package metadata and align company schema integration with latest tsclass types
- migrates build and test tooling to the @git.zone packages and adds package exports
- updates company-related metadata handling from legacy contact fields to the newer business type shape
- makes product publisher data optional and adds safer fallbacks for OpenGraph and JSON-LD tag generation
- replaces the browser test with the current chromium-based test entrypoint
## 2026-03-01 - 3.0.19 - maintenance
Repository housekeeping and metadata updates were consolidated for this release line.
- Removed `.gitlab-ci.yml`
- Updated project description
- Updated `tsconfig`
- Updated `npmextra.json` git host settings
## 2023-05-08 - 3.0.18 - core
Applied a core update as part of the 3.0.163.0.18 patch series.
- Summarized repeated `fix(core): update` changes across versions 3.0.16, 3.0.17, and 3.0.18
## 2021-12-10 - 3.0.15 - core
Applied a core update as part of the 3.0.03.0.15 patch series.
- Summarized repeated `fix(core): update` changes across versions 3.0.0 through 3.0.15
## 2020-09-22 - 3.0.0 - core
Introduced a breaking core update for the 3.0 release line.
- Breaking change from version 2.0.18 to 3.0.0 due to core update
## 2020-07-08 - 2.0.18 - core
Introduced a breaking core update for the 2.x release line.
- Breaking change from version 1.0.8 to 2.0.18 due to core update
## 2020-06-27 - 2.0.17 - core
Routine core maintenance updates were released across the 2.0.32.0.17 range.
- Summarized repeated `fix(core): update` changes across versions 2.0.3 through 2.0.17
## 2019-07-16 - 1.0.8 - core
Removed service worker support in a breaking core change.
- BREAKING CHANGE: remove serviceworker
## 2019-03-27 - 1.0.7 - core
Routine core maintenance updates were released across the 1.0.11.0.7 range.
- Summarized repeated `fix(core): update` changes across versions 1.0.1 through 1.0.7
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2018 Lossless GmbH (hello@lossless.com)
Copyright (c) 2026 Task Venture Capital GmbH <hello@task.vc>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+12 -4
View File
@@ -1,14 +1,15 @@
{
"npmci": {
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
"npmRegistryUrl": "registry.npmjs.org"
},
"gitzone": {
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "websetup",
"shortDescription": "web metadata setup utilities",
"description": "A library for setting up basic properties of a web page including meta tags, OpenGraph tags, JSON-LD structured data, with support for dynamic content.",
"npmPackagename": "@push.rocks/websetup",
"license": "MIT",
@@ -26,9 +27,16 @@
"smart promise",
"tag management"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"tsdoc": {
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}
+14 -10
View File
@@ -3,13 +3,16 @@
"version": "3.0.19",
"private": false,
"description": "A library for setting up basic properties of a web page including meta tags, OpenGraph tags, JSON-LD structured data, with support for dynamic content.",
"exports": {
".": "./dist_ts/index.js"
},
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH",
"author": "Task Venture Capital GmbH <hello@task.vc>",
"license": "MIT",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)",
"test": "tstest test/",
"build": "tsbuild --web && tsbundle npm",
"buildDocs": "tsdoc"
},
"keywords": [
@@ -27,15 +30,14 @@
"tag management"
],
"devDependencies": {
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.7",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.4"
"@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsbundle": "^2.10.1",
"@git.zone/tstest": "^3.6.3",
"@types/node": "^25.6.0"
},
"dependencies": {
"@pushrocks/smartdelay": "^3.0.1",
"@pushrocks/smartpromise": "^4.0.2",
"@tsclass/tsclass": "^4.0.41"
"@push.rocks/smartpromise": "^4.2.4",
"@tsclass/tsclass": "^9.5.1"
},
"files": [
"ts/**/*",
@@ -46,6 +48,8 @@
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
".smartconfig.json",
"license",
"npmextra.json",
"readme.md"
],
+6932 -3840
View File
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,4 @@
import { expect, tap, webhelpers } from '@pushrocks/tapbundle';
webhelpers.enable();
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as websetup from '../ts/index.js';
@@ -15,4 +14,4 @@ tap.test('first test', async () => {
expect(document.title).toEqual('mytitle');
});
tap.start();
export default tap.start();
+4 -4
View File
@@ -1,8 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/websetup',
version: '3.0.19',
description: 'setup basic page properties'
name: '@push.rocks/websetup',
version: '3.0.20',
description: 'A library for setting up basic properties of a web page including meta tags, OpenGraph tags, JSON-LD structured data, with support for dynamic content.'
}
+1 -1
View File
@@ -3,7 +3,7 @@ export interface IMetaObject {
title: string;
description?: string;
canonicalDomain?: string;
ldCompany?: plugins.tsclass.business.ICompany;
ldCompany?: plugins.tsclass.business.TCompany;
ldProduct?: plugins.tsclass.saas.IProduct;
// handles
+13 -11
View File
@@ -4,7 +4,7 @@ import * as interfaces from './interfaces/index.js';
import { Tag } from './websetup.classes.tag.js';
export class JsonLdTag extends Tag {
public static createCompanyJsonLd(companyDataArg: plugins.tsclass.business.ICompany) {
public static createCompanyJsonLd(companyDataArg: plugins.tsclass.business.TCompany) {
// STATIC
// lets care about linked data
const companyLd = {
@@ -12,24 +12,26 @@ export class JsonLdTag extends Tag {
'@type': 'Corporation',
name: companyDataArg.name,
alternateName: companyDataArg.name.replace(' GmbH', ''),
url: companyDataArg.contact.website,
logo: companyDataArg.contact.logoUrl,
url: companyDataArg.website,
logo: companyDataArg.logoUrl,
contactPoint: {
'@type': 'ContactPoint',
telephone: companyDataArg.contact.phone,
telephone: companyDataArg.phone,
contactType: 'customer service',
areaServed: 'DE',
availableLanguage: ['en', 'German'],
},
sameAs: [],
sameAs: [] as string[],
};
if (companyDataArg.contact.facebookUrl) {
companyLd.sameAs.push(companyDataArg.contact.facebookUrl);
const facebookUrl = companyDataArg.socials?.find((socialArg) => socialArg.type === 'facebook')?.url;
if (facebookUrl) {
companyLd.sameAs.push(facebookUrl);
}
if (companyDataArg.contact.twitterUrl) {
companyLd.sameAs.push(companyDataArg.contact.twitterUrl);
const twitterUrl = companyDataArg.socials?.find((socialArg) => socialArg.type === 'twitter')?.url;
if (twitterUrl) {
companyLd.sameAs.push(twitterUrl);
}
const ldTag = new JsonLdTag(companyLd);
@@ -67,7 +69,7 @@ export class JsonLdTag extends Tag {
}
public static createProductJsonLd(
productArg: plugins.tsclass.saas.IProduct,
publisherArg: plugins.tsclass.business.ICompany
publisherArg?: plugins.tsclass.business.TCompany
) {
const productLd = {
'@context': 'https://schema.org',
@@ -87,7 +89,7 @@ export class JsonLdTag extends Tag {
priceCurrency: 'EUR',
},
},
publisher: this.createCompanyJsonLd(publisherArg).elementRef.textContent,
publisher: publisherArg ? this.createCompanyJsonLd(publisherArg).elementRef.textContent : undefined,
screenshot: 'https://www.social.io/screenshot.png',
url: 'https://www.social.io/',
};
+1 -3
View File
@@ -3,9 +3,7 @@ import { Tag } from './websetup.classes.tag.js';
export class LinkTag extends Tag {
constructor(relArg: string, hrefArg: string) {
super();
const linkElement = !!document.querySelector("link[rel='canonical']")
? document.querySelector("link[rel='canonical']")
: document.createElement('link');
const linkElement = document.querySelector("link[rel='canonical']") ?? document.createElement('link');
linkElement.setAttribute('rel', relArg);
linkElement.setAttribute('href', hrefArg);
this.elementRef = linkElement;
+7 -7
View File
@@ -4,10 +4,10 @@ import { Tag } from './websetup.classes.tag.js';
export class OpengraphTag extends Tag {
public static createNewsArticleOgTags(newsArticleArg: plugins.tsclass.content.IArticle) {
const tagArray: OpengraphTag[] = [];
tagArray.push(new OpengraphTag('og:url', newsArticleArg.url));
tagArray.push(new OpengraphTag('og:url', newsArticleArg.url ?? globalThis.location.href));
tagArray.push(new OpengraphTag('og:title', newsArticleArg.title));
tagArray.push(new OpengraphTag('og:description', newsArticleArg.content));
tagArray.push(new OpengraphTag('og:image', newsArticleArg.featuredImageUrl));
tagArray.push(new OpengraphTag('og:image', newsArticleArg.featuredImageUrl ?? ''));
return tagArray;
}
@@ -16,20 +16,20 @@ export class OpengraphTag extends Tag {
tagArray.push(new OpengraphTag('og:type', 'product'));
tagArray.push(new OpengraphTag('og:url', globalThis.location.href));
tagArray.push(new OpengraphTag('og:title', `${productArg.name} - ${productArg.slogan}`));
tagArray.push(new OpengraphTag('og:site_name', productArg.name))
tagArray.push(new OpengraphTag('og:site_name', productArg.name));
tagArray.push(new OpengraphTag('og:description', productArg.description));
tagArray.push(new OpengraphTag('og:image', productArg.logoLink));
return tagArray;
}
public static createCompanyOgTags(companyArg: plugins.tsclass.business.ICompany) {
public static createCompanyOgTags(companyArg: plugins.tsclass.business.TCompany) {
const tagArray: OpengraphTag[] = [];
tagArray.push(new OpengraphTag('og:type', 'company'));
tagArray.push(new OpengraphTag('og:url', globalThis.location.href));
tagArray.push(new OpengraphTag('og:title', `${companyArg.name} - ${companyArg.slogan}`));
tagArray.push(new OpengraphTag('og:site_name', companyArg.name))
tagArray.push(new OpengraphTag('og:title', companyArg.name));
tagArray.push(new OpengraphTag('og:site_name', companyArg.name));
tagArray.push(new OpengraphTag('og:description', companyArg.description));
tagArray.push(new OpengraphTag('og:image', companyArg.logoLink));
tagArray.push(new OpengraphTag('og:image', companyArg.logoUrl ?? ''));
return tagArray;
}
+2 -2
View File
@@ -1,9 +1,9 @@
import * as plugins from './websetup.plugins.js';
export class Tag {
public elementRef: Element;
public elementRef!: Element;
public tagLevel: 'global' | 'levelbound';
public tagLevel: 'global' | 'levelbound' = 'levelbound';
public appendToDom() {
if (!this.elementRef.parentElement && !this.elementRef.parentNode) {
+12 -11
View File
@@ -11,14 +11,14 @@ export type TLevelState = 'enabled' | 'disabled';
export class TagLevel {
public tagManagerRef: TagManager;
private titleStore: string;
private titleStore?: string;
public set title(titleArg: string) {
this.titleStore = titleArg;
if (this.state === 'enabled') {
document.title = this.titleStore;
}
}
public get title() {
public get title(): string | undefined {
return this.titleStore;
}
@@ -29,6 +29,7 @@ export class TagLevel {
constructor(tagManagerRefArg: TagManager, levelType: TBaseLevelType) {
this.tagManagerRef = tagManagerRefArg;
this.type = levelType;
}
public addTag(tagArg: Tag | Tag[]) {
@@ -44,34 +45,34 @@ export class TagLevel {
}
}
public async addCompanyInfo(companyDataArg: plugins.tsclass.business.ICompany) {
public async addCompanyInfo(companyDataArg: plugins.tsclass.business.TCompany) {
this.addTag(JsonLdTag.createCompanyJsonLd(companyDataArg));
// lets care about open graph
this.addTag(new OpengraphTag('og:type', 'business.business'));
this.addTag(new OpengraphTag('og:title', companyDataArg.name));
this.addTag(new OpengraphTag('og:url', companyDataArg.contact.website));
this.addTag(new OpengraphTag('og:image', companyDataArg.contact.logoUrl));
this.addTag(new OpengraphTag('og:url', companyDataArg.website ?? ''));
this.addTag(new OpengraphTag('og:image', companyDataArg.logoUrl ?? ''));
this.addTag(
new OpengraphTag(
'business:contact_data:street_address',
`${companyDataArg.contact.address.streetName} ${companyDataArg.contact.address.houseNumber}`
`${companyDataArg.address.streetName} ${companyDataArg.address.houseNumber}`
)
);
this.addTag(
new OpengraphTag('business:contact_data:locality', companyDataArg.contact.address.postalCode)
new OpengraphTag('business:contact_data:locality', companyDataArg.address.postalCode)
);
this.addTag(
new OpengraphTag('business:contact_data:region', companyDataArg.contact.address.city)
new OpengraphTag('business:contact_data:region', companyDataArg.address.city)
);
this.addTag(
new OpengraphTag(
'business:contact_data:postal_code',
companyDataArg.contact.address.postalCode
companyDataArg.address.postalCode
)
);
this.addTag(
new OpengraphTag('business:contact_data:country_name', companyDataArg.contact.address.country)
new OpengraphTag('business:contact_data:country_name', companyDataArg.address.country)
);
}
@@ -80,7 +81,7 @@ export class TagLevel {
this.addTag(OpengraphTag.createNewsArticleOgTags(articleArg));
}
public addProductInfo(productArg: plugins.tsclass.saas.IProduct, companyArg: plugins.tsclass.business.ICompany) {
public addProductInfo(productArg: plugins.tsclass.saas.IProduct, companyArg?: plugins.tsclass.business.TCompany) {
this.addTag(JsonLdTag.createProductJsonLd(productArg, companyArg));
this.addTag(OpengraphTag.createProductOgTags(productArg));
}
+1 -1
View File
@@ -10,7 +10,7 @@ export class TagManager {
public baseLevel: TagLevel = new TagLevel(this, 'base');
public activeLevel: TagLevel;
public activeLevel!: TagLevel;
public async setup(metaObjectArg: interfaces.IMetaObject) {
// global tag level
+2 -3
View File
@@ -1,8 +1,7 @@
// pushrocks scope
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartpromise from '@push.rocks/smartpromise';
export { smartdelay, smartpromise };
export { smartpromise };
// tsclass scope
import * as tsclass from '@tsclass/tsclass';
+3 -1
View File
@@ -5,8 +5,10 @@
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noImplicitAny": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
"types": ["node"]
},
"exclude": [
"dist_*/**/*.d.ts"