@cronitorio/cronitor-rum-nextjs 0.3.0 → 0.5.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.
- package/README.md +11 -1
- package/package.json +7 -7
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -50
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cronitor RUM Next.js integration
|
|
2
2
|
|
|
3
|
-
> **Important:** As of version 0.2.0 of this package only Next.js 13 or later will be supported. For previous versions of Next.js please install version 0.1.0 of this package.
|
|
3
|
+
> **Important:** As of version 0.2.0 of this package only Next.js 13 or later will be supported. Version 0.5.0 adds official support for Next.js 14-16. For previous versions of Next.js please install version 0.1.0 of this package.
|
|
4
4
|
|
|
5
5
|
Official [Cronitor Real User Monitoring](https://cronitor.io/real-user-monitoring) integration for Next.js.
|
|
6
6
|
|
|
@@ -66,6 +66,16 @@ export default CustomApp;
|
|
|
66
66
|
|
|
67
67
|
## Changelog
|
|
68
68
|
|
|
69
|
+
### 0.5.0
|
|
70
|
+
|
|
71
|
+
- Add official support for Next.js 14, 15, and 16.
|
|
72
|
+
- Add support for React 19.
|
|
73
|
+
- Update TypeScript to version 5.
|
|
74
|
+
|
|
75
|
+
### 0.4.0
|
|
76
|
+
|
|
77
|
+
- Update cronitor-rum lib.
|
|
78
|
+
|
|
69
79
|
### 0.3.0
|
|
70
80
|
|
|
71
81
|
- Update cronitor-rum-js lib.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cronitorio/cronitor-rum-nextjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Official Cronitor integration for Next.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"lint": "tslint -p tsconfig.json"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"next": "^13",
|
|
33
|
-
"react": "^18"
|
|
32
|
+
"next": "^13 || ^14 || ^15 || ^16",
|
|
33
|
+
"react": "^18 || ^19"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@cronitorio/cronitor-rum
|
|
36
|
+
"@cronitorio/cronitor-rum": "^0.4.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/react": "^18.0
|
|
40
|
-
"next": "^
|
|
39
|
+
"@types/react": "^18.2.0",
|
|
40
|
+
"next": "^14.0.0",
|
|
41
41
|
"prettier": "^2.8.3",
|
|
42
42
|
"react": "^18.2.0",
|
|
43
43
|
"tslint": "^6.1.3",
|
|
44
44
|
"tslint-config-prettier": "^1.18.0",
|
|
45
|
-
"typescript": "^
|
|
45
|
+
"typescript": "^5.0.0"
|
|
46
46
|
},
|
|
47
47
|
"bugs": {
|
|
48
48
|
"url": "https://github.com/cronitorio/cronitor-rum-nextjs/issues"
|
package/dist/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as Cronitor from '@cronitorio/cronitor-rum-js';
|
|
2
|
-
/**
|
|
3
|
-
* React hook for automatically tracking navigation changes on Next.js apps.
|
|
4
|
-
*
|
|
5
|
-
* @param clientKey the client key for the Cronitor site.
|
|
6
|
-
* @param config the Cronitor tracker configuration object.
|
|
7
|
-
*/
|
|
8
|
-
export declare function useCronitor(clientKey: string, config?: Cronitor.CronitorRUMConfig): typeof Cronitor;
|
package/dist/index.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.useCronitor = void 0;
|
|
28
|
-
const Cronitor = __importStar(require("@cronitorio/cronitor-rum-js"));
|
|
29
|
-
const navigation_1 = require("next/navigation");
|
|
30
|
-
const react_1 = require("react");
|
|
31
|
-
/**
|
|
32
|
-
* React hook for automatically tracking navigation changes on Next.js apps.
|
|
33
|
-
*
|
|
34
|
-
* @param clientKey the client key for the Cronitor site.
|
|
35
|
-
* @param config the Cronitor tracker configuration object.
|
|
36
|
-
*/
|
|
37
|
-
function useCronitor(clientKey, config = {}) {
|
|
38
|
-
const pathname = (0, navigation_1.usePathname)();
|
|
39
|
-
const searchParams = (0, navigation_1.useSearchParams)();
|
|
40
|
-
(0, react_1.useEffect)(() => {
|
|
41
|
-
Cronitor.load(clientKey, config);
|
|
42
|
-
}, []);
|
|
43
|
-
(0, react_1.useEffect)(() => {
|
|
44
|
-
Cronitor.track('Pageview');
|
|
45
|
-
}, [pathname, searchParams]);
|
|
46
|
-
return Cronitor;
|
|
47
|
-
}
|
|
48
|
-
exports.useCronitor = useCronitor;
|
|
49
|
-
;
|
|
50
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,sEAAwD;AACxD,gDAA+D;AAC/D,iCAAkC;AAElC;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,SAAiB,EAAE,SAAqC,EAAE;IACpF,MAAM,QAAQ,GAAG,IAAA,wBAAW,GAAE,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAA,4BAAe,GAAE,CAAC;IAEvC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAbD,kCAaC;AAAA,CAAC"}
|