@naturalcycles/js-lib 15.11.0 → 15.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,6 @@ export async function loadGTag(gtagId, enabled = true) {
|
|
|
8
8
|
return;
|
|
9
9
|
globalThis.dataLayer ||= [];
|
|
10
10
|
globalThis.gtag ||= function gtag() {
|
|
11
|
-
// biome-ignore lint/complexity/useArrowFunction: ok
|
|
12
11
|
// biome-ignore lint/complexity/noArguments: ok
|
|
13
12
|
globalThis.dataLayer.push(arguments);
|
|
14
13
|
};
|
package/dist/http/fetcher.js
CHANGED
|
@@ -38,7 +38,7 @@ export class Fetcher {
|
|
|
38
38
|
* Version is to be incremented every time a difference in behaviour (or a bugfix) is done.
|
|
39
39
|
*/
|
|
40
40
|
static VERSION = 2;
|
|
41
|
-
static userAgent = isServerSide() ? `fetcher
|
|
41
|
+
static userAgent = isServerSide() ? `fetcher/${this.VERSION}` : undefined;
|
|
42
42
|
constructor(cfg = {}) {
|
|
43
43
|
if (typeof globalThis.fetch !== 'function') {
|
|
44
44
|
throw new TypeError('globalThis.fetch is not available');
|
package/package.json
CHANGED
|
@@ -15,7 +15,6 @@ export async function loadGTag(gtagId: string, enabled = true): Promise<void> {
|
|
|
15
15
|
|
|
16
16
|
globalThis.dataLayer ||= []
|
|
17
17
|
globalThis.gtag ||= function gtag() {
|
|
18
|
-
// biome-ignore lint/complexity/useArrowFunction: ok
|
|
19
18
|
// biome-ignore lint/complexity/noArguments: ok
|
|
20
19
|
globalThis.dataLayer.push(arguments)
|
|
21
20
|
}
|
package/src/http/fetcher.ts
CHANGED
|
@@ -82,7 +82,7 @@ export class Fetcher {
|
|
|
82
82
|
* Version is to be incremented every time a difference in behaviour (or a bugfix) is done.
|
|
83
83
|
*/
|
|
84
84
|
static readonly VERSION = 2
|
|
85
|
-
static readonly userAgent = isServerSide() ? `fetcher
|
|
85
|
+
static readonly userAgent = isServerSide() ? `fetcher/${this.VERSION}` : undefined
|
|
86
86
|
|
|
87
87
|
private constructor(cfg: FetcherCfg & FetcherOptions = {}) {
|
|
88
88
|
if (typeof globalThis.fetch !== 'function') {
|