mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
d26aa00438
* fix: change us to app API missing onboarding pages * fix * Update UI snapshots for `chromium` (2) * chore: append latest to the properties that are overwritten for every event * fix * Update UI snapshots for `chromium` (2) * rest * Resolve the `keyMapping` mess once and for all * Fix some rendering * Add `type` to more places * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * fix: add groups to taxonomy --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michael Matloka <michal@matloka.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com> Co-authored-by: Michael Matloka <dev@twixes.com>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { CORE_FILTER_DEFINITIONS_BY_GROUP } from 'lib/taxonomy'
|
|
|
|
// Creates PROPERTY_NAME_ALIASES in posthog/api/property_definition.py
|
|
// eslint-disable-next-line no-console
|
|
console.log(
|
|
JSON.stringify(
|
|
Object.fromEntries(
|
|
Array.from(Object.entries(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties))
|
|
.map(([key, value]) => [key, value.label])
|
|
.filter(([key, label]) => {
|
|
if (!key) {
|
|
return false
|
|
}
|
|
if (!label || label.includes('deprecated')) {
|
|
return false
|
|
}
|
|
|
|
const keyLower = key.toLowerCase()
|
|
const labelLower = label.toLowerCase()
|
|
|
|
if (keyLower.includes(labelLower)) {
|
|
return false
|
|
}
|
|
|
|
const keyLowerNoSpecial = keyLower.replace(/[$_]+/g, ' ')
|
|
const labelWords = labelLower.split(/\s+/)
|
|
|
|
return !labelWords.every((word) => keyLowerNoSpecial.includes(word))
|
|
})
|
|
.sort()
|
|
),
|
|
null,
|
|
4
|
|
)
|
|
)
|