| 
3 | 3 | [](https://www.npmjs.com/package/posthog-js)  | 
4 | 4 | [](https://opensource.org/licenses/MIT)  | 
5 | 5 | 
 
  | 
6 |  | -For information on using this library in your app, [see PostHog Docs](https://posthog.com/docs/libraries/js).    | 
 | 6 | +For information on using this library in your app, [see PostHog Docs](https://posthog.com/docs/libraries/js).  | 
7 | 7 | This README is intended for developing the library itself.  | 
8 | 8 | 
 
  | 
9 | 9 | ## Dependencies  | 
@@ -93,36 +93,3 @@ Then, once this link has been created, any time you need to make a change to `po  | 
93 | 93 | - In the `posthog-js` directory: `pnpm link --global`  | 
94 | 94 | - (for `posthog` this means: `pnpm link --global posthog-js && pnpm i && pnpm copy-scripts`)  | 
95 | 95 | - You can then remove the link by, e.g., running `pnpm link --global posthog-js` from within `posthog`  | 
96 |  | - | 
97 |  | -## Releasing a new version  | 
98 |  | - | 
99 |  | -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.  | 
100 |  | - | 
101 |  | -If you forget to add the label, don't try to update the version locally as you won't be able to push that commit to the main branch. Instead, just make a new PR.  | 
102 |  | - | 
103 |  | -### Prereleases  | 
104 |  | - | 
105 |  | -To release an alpha or beta version, you'll need to use the CLI locally:  | 
106 |  | - | 
107 |  | -#### CLI  | 
108 |  | - | 
109 |  | -Only one person is set as a collaborator on NPM, so they're the only person that can manually publish alphas  | 
110 |  | - | 
111 |  | -1. Make sure you're a collaborator on `posthog-js` in npm ([check here](https://www.npmjs.com/package/posthog-js)).  | 
112 |  | -2. Make sure you're logged into the npm CLI (`npm login`).  | 
113 |  | -3. Check out your work-in-progress branch (do not release an alpha/beta from `main`).  | 
114 |  | -4. Run the following commands, using the same bump level (major/minor/patch) as your PR:  | 
115 |  | - | 
116 |  | -    ```bash  | 
117 |  | -    npm version [premajor | preminor | prepatch] --preid=beta  | 
118 |  | -    npm publish --tag beta  | 
119 |  | -    git push --tags  | 
120 |  | -    ```  | 
121 |  | - | 
122 |  | -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).  | 
123 |  | - | 
124 |  | -#### Automagically  | 
125 |  | - | 
126 |  | -Use the "release alpha" label on your PR to have an alpha version published automatically. This automation currently doesn't check whether an alpha exists for the version it will try to publish. If you need to publish two alphas from one PR you'll need to fix that  | 
127 |  | - | 
128 |  | -Remember that these versions are public and folk might use them, so make sure they're not _too_ alpha 🙈  | 
0 commit comments