@reykjavik/webtools 0.1.10 → 0.1.11
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.
- package/CHANGELOG.md +6 -0
- package/esm/http.d.ts +1 -1
- package/esm/next/SiteImprove.js +6 -2
- package/esm/next/http.d.ts +2 -2
- package/http.d.ts +1 -1
- package/next/SiteImprove.js +6 -2
- package/next/http.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/esm/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerResponse } from 'http';
|
|
1
|
+
import type { ServerResponse } from 'http';
|
|
2
2
|
/** The client should continue the request or ignore the response if the request is already finished. */
|
|
3
3
|
export declare const HTTP_100_Continue = 100;
|
|
4
4
|
/** Response to an Upgrade request header from the client and indicates the protocol the server is switching to. */
|
package/esm/next/SiteImprove.js
CHANGED
|
@@ -2,8 +2,12 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import { Router } from 'next/router.js';
|
|
3
3
|
import NextScript from 'next/script.js';
|
|
4
4
|
import { useCookieHubConsent } from '../CookieHubConsent.js';
|
|
5
|
-
// Fixes an issue with `next/script` types
|
|
6
|
-
|
|
5
|
+
// Fixes an issue with `next/script`'s types and mixture of default and named exports.
|
|
6
|
+
// This workaround doesn't seem to be necessary in Next.js 13.5 (pages router), but
|
|
7
|
+
// is definitely needed for the webpack bundler used by Next.js 11. (v12 is untested.)
|
|
8
|
+
const Script = ('__esModule' in NextScript && 'default' in NextScript
|
|
9
|
+
? NextScript.default
|
|
10
|
+
: NextScript);
|
|
7
11
|
// END: Mock typing of SiteImprove's event tracking API
|
|
8
12
|
// --------------------------------------------------------------------------
|
|
9
13
|
//
|
package/esm/next/http.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import React, { FunctionComponent } from 'react';
|
|
3
|
-
import { Cleanup } from '@reykjavik/hanna-utils';
|
|
4
|
-
import { ServerResponse } from 'http';
|
|
3
|
+
import type { Cleanup } from '@reykjavik/hanna-utils';
|
|
4
|
+
import type { ServerResponse } from 'http';
|
|
5
5
|
import type { AppType } from 'next/app.js';
|
|
6
6
|
import type { HTTP_ERROR_ALL, TTLConfig } from '../http.js';
|
|
7
7
|
export * from '../http.js';
|
package/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerResponse } from 'http';
|
|
1
|
+
import type { ServerResponse } from 'http';
|
|
2
2
|
/** The client should continue the request or ignore the response if the request is already finished. */
|
|
3
3
|
export declare const HTTP_100_Continue = 100;
|
|
4
4
|
/** Response to an Upgrade request header from the client and indicates the protocol the server is switching to. */
|
package/next/SiteImprove.js
CHANGED
|
@@ -31,8 +31,12 @@ const react_1 = __importStar(require("react"));
|
|
|
31
31
|
const router_js_1 = require("next/router.js");
|
|
32
32
|
const script_js_1 = __importDefault(require("next/script.js"));
|
|
33
33
|
const CookieHubConsent_js_1 = require("../CookieHubConsent.js");
|
|
34
|
-
// Fixes an issue with `next/script` types
|
|
35
|
-
|
|
34
|
+
// Fixes an issue with `next/script`'s types and mixture of default and named exports.
|
|
35
|
+
// This workaround doesn't seem to be necessary in Next.js 13.5 (pages router), but
|
|
36
|
+
// is definitely needed for the webpack bundler used by Next.js 11. (v12 is untested.)
|
|
37
|
+
const Script = ('__esModule' in script_js_1.default && 'default' in script_js_1.default
|
|
38
|
+
? script_js_1.default.default
|
|
39
|
+
: script_js_1.default);
|
|
36
40
|
// END: Mock typing of SiteImprove's event tracking API
|
|
37
41
|
// --------------------------------------------------------------------------
|
|
38
42
|
//
|
package/next/http.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import React, { FunctionComponent } from 'react';
|
|
3
|
-
import { Cleanup } from '@reykjavik/hanna-utils';
|
|
4
|
-
import { ServerResponse } from 'http';
|
|
3
|
+
import type { Cleanup } from '@reykjavik/hanna-utils';
|
|
4
|
+
import type { ServerResponse } from 'http';
|
|
5
5
|
import type { AppType } from 'next/app.js';
|
|
6
6
|
import type { HTTP_ERROR_ALL, TTLConfig } from '../http.js';
|
|
7
7
|
export * from '../http.js';
|
package/package.json
CHANGED