Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(flags): Enjoy the benefits of /decide?v=4 #1843

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Mar 21, 2025

This reverts commit 502c4c0 which reverted 4c25512. We got ourselves a revert chain!

The purpose of this commit is to re-enable support for /decide?v=4. See this PR for more details: #1838

Copy link

vercel bot commented Mar 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Mar 21, 2025 5:54pm

@haacked haacked added the bump patch Bump patch version when this PR gets merged label Mar 21, 2025
@haacked haacked changed the title Revert "Revert "feat: Enjoy the benefits of /decide?v=4 (#1838)" (#… fix(flags): Enjoy the benefits of /decide?v=4 Mar 21, 2025
@haacked haacked requested a review from dmarticus March 21, 2025 17:53
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR re-enables support for /decide?v=4 endpoint across the PostHog JavaScript SDK, updating test files and adding IE11 compatibility.

  • Added Object.fromEntries polyfill in src/entrypoints/array.full.es5.ts for IE11 support
  • Updated test assertions in src/__tests__/posthog-core.loaded.test.ts to expect /decide/?v=4 endpoint
  • Modified src/posthog-featureflags.ts to handle both legacy and v4 API formats
  • Updated URL patterns in playwright/session-recording/session-recording-network-recorder.spec.ts for v4 endpoint testing
  • Ensured backward compatibility while enabling access to newer feature flag functionality

6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's hoping we don't have to revert this again lmao.

Thanks for doing this :)

Copy link

Size Change: +22.6 kB (+0.63%)

Total Size: 3.63 MB

Filename Size Change
dist/array.full.es5.js 301 kB +22.6 kB (+8.1%) 🔍
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 220 kB
dist/array.full.js 381 kB
dist/array.full.no-external.js 380 kB
dist/array.js 188 kB
dist/array.no-external.js 187 kB
dist/customizations.full.js 14.1 kB
dist/dead-clicks-autocapture.js 14.5 kB
dist/exception-autocapture.js 9.94 kB
dist/external-scripts-loader.js 2.75 kB
dist/main.js 189 kB
dist/module.full.js 381 kB
dist/module.full.no-external.js 380 kB
dist/module.js 189 kB
dist/module.no-external.js 187 kB
dist/posthog-recorder.js 211 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 71.3 kB
dist/surveys.js 76.6 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@haacked haacked merged commit d5066c5 into main Mar 21, 2025
29 of 30 checks passed
@haacked haacked deleted the haacked/re-enable-decide-v4 branch March 21, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants