Skip to content

Commit

Permalink
Merge branch 'master' into chore-make-hobby-docker-install
Browse files Browse the repository at this point in the history
  • Loading branch information
danielxnj committed Nov 29, 2023
2 parents 89b15a3 + 2a2cb37 commit 41e41af
Show file tree
Hide file tree
Showing 129 changed files with 4,467 additions and 1,194 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.eslintrc.js
jest.config.ts
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module.exports = {
'compat',
'posthog',
'simple-import-sort',
'import',
],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
Expand Down Expand Up @@ -261,6 +262,19 @@ module.exports = {
'no-constant-condition': 'off',
'no-prototype-builtins': 'off',
'no-irregular-whitespace': 'off',
'import/no-restricted-paths': [
'error',
{
zones: [
{
target: './frontend/**',
from: './ee/frontend/**',
message:
"EE licensed TypeScript should only be accessed via the posthogEE objects. Use `import posthogEE from '@posthog/ee/exports'`",
},
],
},
],
},
overrides: [
{
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
if: needs.changes.outputs.shouldTriggerCypress == 'true'
uses: depot/pull-action@v1
with:
build-id: ${{ needs.container.outputs.build-id }} # TODO: Use unit-build-id when the Unit image works
build-id: ${{ needs.container.outputs.unit-build-id }}
tags: ${{ needs.container.outputs.tag }}

- name: Write .env # This step intentionally has no if, so that GH always considers the action as having run
Expand All @@ -196,6 +196,7 @@ jobs:
OBJECT_STORAGE_ACCESS_KEY_ID=object_storage_root_user
OBJECT_STORAGE_SECRET_ACCESS_KEY=object_storage_root_password
GITHUB_ACTION_RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
CELERY_METRICS_PORT=8999
EOT
- name: Start PostHog
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ jobs:
if: needs.changes.outputs.frontend == 'true'
run: pnpm schema:build:json && git diff --exit-code

- name: Check if mobile replay "schema.json" is up to date
if: needs.changes.outputs.frontend == 'true'
run: pnpm mobile-replay:schema:build:json && git diff --exit-code

- name: Check toolbar bundle size
if: needs.changes.outputs.frontend == 'true'
uses: preactjs/compressed-size-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .run/PostHog.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<env name="PYTHONUNBUFFERED" value="1" />
<env name="SESSION_RECORDING_KAFKA_COMPRESSION" value="gzip" />
<env name="SESSION_RECORDING_KAFKA_HOSTS" value="localhost" />
<env name="SESSION_RECORDING_KAFKA_MAX_REQUEST_SIZE_BYTES" value="524288" />
<env name="SESSION_RECORDING_KAFKA_MAX_REQUEST_SIZE_BYTES" value="20971520" />
<env name="SKIP_SERVICE_VERSION_REQUIREMENTS" value="1" />
<env name="REPLAY_EVENTS_NEW_CONSUMER_RATIO" value="1" />
</envs>
Expand Down Expand Up @@ -48,4 +48,4 @@
<option name="customRunCommand" value="" />
<method v="2" />
</configuration>
</component>
</component>
19 changes: 9 additions & 10 deletions ee/frontend/exports.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { PostHogEE } from '@posthog/ee/types'

const myTestCode = (): void => {
// eslint-disable-next-line no-console
console.log('it works!')
}
import { transformEventToWeb, transformToWeb } from './mobile-replay'

const postHogEE: PostHogEE = {
enabled: true,
myTestCode,
}

export default postHogEE
export default async (): Promise<PostHogEE> =>
Promise.resolve({
enabled: true,
mobileReplay: {
transformEventToWeb,
transformToWeb,
},
})
Loading

0 comments on commit 41e41af

Please sign in to comment.