@codecademy/tracking 0.16.1-alpha.8317ab.0 → 0.17.1-alpha.3e4d58.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/CHANGELOG.md +24 -2
- package/dist/events/track.js +3 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,34 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
### [0.
|
|
6
|
+
### [0.17.1-alpha.3e4d58.0](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.17.0...@codecademy/tracking@0.17.1-alpha.3e4d58.0) (2021-12-17)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
* **tracking:**
|
|
11
|
+
* **tracking:** directly call navigator.sendBeacon without .bind ([3e4d58b](https://github.com/Codecademy/client-modules/commit/3e4d58bc2aa8e0832cd68401319837efa3d0ad90))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.17.0](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.16.1...@codecademy/tracking@0.17.0) (2021-11-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ⚠ BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* **eslint-config:** bump ESLint to 8 and typescript-eslint to 5 (#4)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **eslint-config:** bump ESLint to 8 and typescript-eslint to 5 ([#4](https://github.com/Codecademy/client-modules/issues/4)) ([64423d6](https://github.com/Codecademy/client-modules/commit/64423d69ad0f90f2e717373db6b1988b715681cc))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### [0.16.1](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.16.0...@codecademy/tracking@0.16.1) (2021-11-12)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **tracking:** super-bind the sendBeacon to navigator ([b32a8ec](https://github.com/Codecademy/client-modules/commit/b32a8ece14b2c2d62abf98f762f1be17690406f8))
|
|
12
34
|
|
|
13
35
|
|
|
14
36
|
|
package/dist/events/track.js
CHANGED
|
@@ -40,14 +40,12 @@ export var createTracker = function createTracker(_ref) {
|
|
|
40
40
|
var v = _ref3[1];
|
|
41
41
|
form.append(k, v.toString());
|
|
42
42
|
} // Firefox allows users to disable navigator.sendBeacon, and very old Safari versions don't have it.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var sendBeacon = // [WEB-1700]: Additionally, Chrome 79-80 gives "Illegal invocation" with ?., so through 2022 we should support them.
|
|
43
|
+
// [WEB-1700]: Additionally, Chrome 79-80 gives "Illegal invocation" with ?., so through 2022 we should support them.
|
|
46
44
|
// It seems similar to this: https://github.com/vercel/next.js/issues/23856
|
|
47
45
|
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
48
|
-
navigator.sendBeacon && navigator.sendBeacon.bind(navigator);
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
|
|
48
|
+
if (navigator.sendBeacon && navigator.sendBeacon(uri, form)) {
|
|
51
49
|
return;
|
|
52
50
|
} // Either way, we fall back to standard fetch if sendBeacon fails.
|
|
53
51
|
// We don't mind this rejecting with an error because it's tracking, and we'll know if that starts to fail.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/tracking",
|
|
3
3
|
"description": "Tracking library for Codecademy apps.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.1-alpha.3e4d58.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "e127202a793d367ccd1704e48c206913ac76c142"
|
|
40
40
|
}
|