posthog-js 1.57.2 → 1.57.4
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 +14 -0
- package/README.md +29 -57
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/es.js +1 -1
- package/dist/es.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/lib/package.json +6 -3
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.57.4 - 2023-05-25
|
|
2
|
+
|
|
3
|
+
- fix: Session timeout overridden on reload (#645)
|
|
4
|
+
|
|
5
|
+
## 1.57.3 - 2023-05-23
|
|
6
|
+
|
|
7
|
+
- fix: properties with "length" value (#640)
|
|
8
|
+
- docs: Update README around releasing and development (#634)
|
|
9
|
+
- chore: add test for $identify events count optimization (#639)
|
|
10
|
+
- ci: consolidate library checks into one workflow (#638)
|
|
11
|
+
- ci: add prettier and eslint linting stage (#637)
|
|
12
|
+
- chore: add pre-commit to run lint staged. (#636)
|
|
13
|
+
- chore: add functional tests (#635)
|
|
14
|
+
|
|
1
15
|
## 1.57.2 - 2023-05-17
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/posthog-js)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
For information on using this library in your app, [see PostHog Docs](https://posthog.com/docs/libraries/js).
|
|
7
|
+
This README is intended for developing the library itself.
|
|
8
8
|
|
|
9
9
|
## Testing
|
|
10
10
|
|
|
@@ -47,71 +47,43 @@ You can use the create react app setup in `playground/nextjs` to test posthog-js
|
|
|
47
47
|
2. Cypress tests - integrates with a real chrome browser and is capable of testing timing, browser requests, etc. Useful for testing high-level library behavior, ordering and verifying requests. We shouldn't aim for 100% coverage here as it's impossible to test all possible combinations.
|
|
48
48
|
3. TestCafe E2E tests - integrates with a real posthog instance sends data to it. Hardest to write and maintain - keep these very high level
|
|
49
49
|
|
|
50
|
-
## Developing together with another
|
|
50
|
+
## Developing together with another project
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Install Yalc to link a local version of `posthog-js` in another JS project: `npm install -g yalc`
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
#### Run this to link the local version
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
4. In your locally running `PostHog/posthog` build, run `yarn copy-scripts`. (This copies the scripts generated in step 3 to the static assets folder for `PostHog/posthog`)
|
|
56
|
+
- In the `posthog-js` directory: `yalc publish`
|
|
57
|
+
- In the other directory: `yalc add posthog-js`, then install dependencies
|
|
58
|
+
(for `posthog` this means: `yalc add posthog-js && pnpm i && pnpm copy-scripts`)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
#### Run this to update the linked local version
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
- In the other directory: `yalc update`, then install dependencies
|
|
63
|
+
(for `posthog` this means: `yalc update && pnpm i && pnpm copy-scripts`)
|
|
64
64
|
|
|
65
|
-
Run
|
|
65
|
+
#### Run this to unlink the local version
|
|
66
66
|
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
- In the posthog repo
|
|
70
|
-
- Run `yalc add posthog-js && pnpm i && pnpm copy-scripts`
|
|
71
|
-
|
|
72
|
-
#### When making changes
|
|
73
|
-
|
|
74
|
-
- In the posthog-js repo
|
|
75
|
-
- Run `yalc publish`
|
|
76
|
-
- In the posthog repo
|
|
77
|
-
- Run `yalc update && pnpm i && pnpm copy-scripts`
|
|
78
|
-
|
|
79
|
-
#### To remove the local package
|
|
80
|
-
|
|
81
|
-
- In the posthog repo
|
|
82
|
-
- run `yalc remove posthog-js`
|
|
83
|
-
- run `yarn install`
|
|
67
|
+
- In the other directory: `yalc remove posthog-js`, then install dependencies
|
|
68
|
+
(for `posthog` this means: `yalc remove posthog-js && pnpm i && pnpm copy-scripts`)
|
|
84
69
|
|
|
85
70
|
## Releasing a new version
|
|
86
71
|
|
|
87
|
-
Just
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
It's advised to use `bump patch/minor/major` label on PRs - that way the above will be done automatically
|
|
91
|
-
when the PR is merged.
|
|
92
|
-
|
|
93
|
-
Courtesy of GitHub Actions.
|
|
94
|
-
|
|
95
|
-
### Manual steps
|
|
96
|
-
|
|
97
|
-
To release a new version, make sure you're logged into npm (`npm login`).
|
|
98
|
-
|
|
99
|
-
We tend to follow the following steps:
|
|
100
|
-
|
|
101
|
-
1. Merge your changes into master.
|
|
102
|
-
2. Release changes as a beta version:
|
|
103
|
-
- `npm version 1.x.x-beta.0`
|
|
104
|
-
- `npm publish --tag beta`
|
|
105
|
-
- `git push --tags`
|
|
106
|
-
3. Create a PR linking to this version in the [main PostHog repo](https://github.com/posthog/posthog).
|
|
107
|
-
4. Once deployed and tested, write up CHANGELOG.md, and commit.
|
|
108
|
-
5. Release a new version:
|
|
109
|
-
- `npm version 1.x.x`
|
|
110
|
-
- `npm publish`
|
|
111
|
-
- `git push --tags`
|
|
112
|
-
6. Create a PR linking to this version in the [main PostHog repo](https://github.com/posthog/posthog).
|
|
72
|
+
Just put a `bump patch/minor/major` label on your PR! Once the PR is merged, a new version with the appropriate version bump will be released, and the dependency will be updated in [posthog/PostHog](https://github.com/posthog/PostHog) – automatically.
|
|
73
|
+
|
|
74
|
+
If you want to release a new version without a PR (e.g. because you forgot to use the label), check out the `master` branch and run `npm version [major | minor | patch] && git push --tags` - this will trigger the automated release process just like the label.
|
|
113
75
|
|
|
76
|
+
### Prereleases
|
|
114
77
|
|
|
115
|
-
|
|
78
|
+
To release an alpha or beta version, you'll need to use the CLI locally:
|
|
116
79
|
|
|
117
|
-
|
|
80
|
+
1. Make sure you're a collaborator on `posthog-js` in npm ([check here](https://www.npmjs.com/package/posthog-js)).
|
|
81
|
+
2. Make sure you're logged into the npm CLI (`npm login`).
|
|
82
|
+
3. Check out your work-in-progress branch (do not release an alpha/beta from `master`).
|
|
83
|
+
4. Run the following commands, using the same bump level (major/minor/patch) as your PR:
|
|
84
|
+
```bash
|
|
85
|
+
npm version [premajor | preminor | prepatch] --preid=beta
|
|
86
|
+
npm publish --tag beta
|
|
87
|
+
git push --tags
|
|
88
|
+
```
|
|
89
|
+
5. Enjoy the new prerelease version. You can now use it locally, in a dummy app, or in the [main repo](https://github.com/posthog/PostHog).
|