Skip to content

Commit c242702

Browse files
authored
feat(err): add rollup plugin package (#2587)
* add rollup playground * add rollup plugin package * use write bundle hook * add codeowners * add project and version args * update lockfile * enable by default * fix jest dep * fix jest dep * add changeset * add changelog and readme * upgrade posthog-cli
1 parent 48a73df commit c242702

38 files changed

+26733
-26433
lines changed

.changeset/evil-heads-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@posthog/core': patch
3+
---
4+
5+
export log level type

.changeset/stale-lies-taste.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@posthog/rollup-plugin': major
3+
---
4+
5+
first version

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module.exports = {
7272
'packages/react-native/**',
7373
'packages/node/**',
7474
'packages/web/**',
75+
'packages/rollup-plugin/**',
7576
'examples/**',
7677
'playground/**',
7778
],

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ packages/browser/src/sessionid.ts @PostHog/team-web-analyti
2626
packages/browser/src/session-props.ts @PostHog/team-web-analytics
2727
packages/browser/src/utils/blocked-uas.ts @PostHog/team-web-analytics
2828
packages/browser/src/consent.ts @PostHog/team-web-analytics
29+
30+
# Error tracking
31+
packages/rollup-plugin/ @PostHog/team-error-tracking
32+
packages/nuxt/ @PostHog/team-error-tracking
33+
packages/nextjs-config/ @PostHog/team-error-tracking
34+
packages/core/src/process/ @PostHog/team-error-tracking

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ _Please describe._
2525
- [ ] @posthog/ai
2626
- [ ] @posthog/nextjs-config
2727
- [ ] @posthog/nuxt
28+
- [ ] @posthog/rollup-plugin
2829

2930
## Additional context
3031

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ _Please describe._
2323
- [ ] @posthog/ai
2424
- [ ] @posthog/nextjs-config
2525
- [ ] @posthog/nuxt
26+
- [ ] @posthog/rollup-plugin
2627

2728
## Additional context
2829

.github/workflows/release.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- name: "@posthog/ai"
2727
- name: "@posthog/nextjs-config"
2828
- name: "@posthog/nuxt"
29+
- name: "@posthog/rollup-plugin"
2930

3031
steps:
3132
- name: Checkout the repository
@@ -58,7 +59,7 @@ jobs:
5859
package_version: ${{ steps.check-package-version.outputs.committed-version }}
5960
npm_token: ${{ secrets.NPM_TOKEN }}
6061
github_token: ${{ secrets.GITHUB_TOKEN }}
61-
62+
6263
- name: Dispatch generate-references for ${{ matrix.package.name }}
6364
if: steps.check-package-version.outputs.is-new-version == 'true'
6465
env:
@@ -104,15 +105,15 @@ jobs:
104105
if: ${{ failure() }}
105106
uses: PostHog/[email protected]
106107
with:
107-
posthog-token: '${{ secrets.POSTHOG_API_TOKEN }}'
108-
event: 'posthog-js-github-release-workflow-failure'
109-
properties: >-
110-
{
111-
"commitSha": "${{ github.sha }}",
112-
"jobStatus": "${{ job.status }}",
113-
"commitMessage": "${{ github.event.head_commit.message }}",
114-
"commitAuthor": "${{ github.event.head_commit.author.name }}",
115-
"ref": "${{ github.ref }}",
116-
"matrixPackage": "${{ matrix.package.name }}",
117-
"packageVersion": "${{ steps.check-package-version.outputs.committed-version }}"
118-
}
108+
posthog-token: "${{ secrets.POSTHOG_API_TOKEN }}"
109+
event: "posthog-js-github-release-workflow-failure"
110+
properties: >-
111+
{
112+
"commitSha": "${{ github.sha }}",
113+
"jobStatus": "${{ job.status }}",
114+
"commitMessage": "${{ github.event.head_commit.message }}",
115+
"commitAuthor": "${{ github.event.head_commit.author.name }}",
116+
"ref": "${{ github.ref }}",
117+
"matrixPackage": "${{ matrix.package.name }}",
118+
"packageVersion": "${{ steps.check-package-version.outputs.committed-version }}"
119+
}

examples/example-expo-53/.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// https://docs.expo.dev/guides/using-eslint/
22
module.exports = {
3-
ignorePatterns: ['metro.config.js'],
3+
ignorePatterns: ['metro.config.js', 'eslint.config.js'],
44
env: {
55
node: true,
66
es6: true,

examples/example-nextjs/next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default withPostHogConfig(nextConfig, {
99
personalApiKey: process.env.POSTHOG_PERSONAL_API_KEY!,
1010
envId: process.env.POSTHOG_API_PROJECT!,
1111
host: process.env.NEXT_PUBLIC_POSTHOG_API_HOST!,
12+
cliBinaryPath: process.env.POSTHOG_CLI_PATH, // Optional
1213
logLevel: 'debug',
1314
sourcemaps: {
1415
project: 'example-nextjs',

0 commit comments

Comments
 (0)