Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ describe('the activity log logic', () => {
)
})
const formats = ['png', 'pdf', 'csv']
formats.map((format) => {
formats.forEach((format) => {
it(`can handle export of insight to ${format}`, async () => {
const logic = await insightTestSetup('test insight', 'exported', [
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/integrations/IntegrationScopesWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function IntegrationScopesWarning({
const scopes: any[] = []
const possibleScopeLocation = [integration.config.scope, integration.config.scopes]

possibleScopeLocation.map((scope) => {
possibleScopeLocation.forEach((scope) => {
if (typeof scope === 'string') {
scopes.push(scope.split(' '))
scopes.push(scope.split(','))
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/mocks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export type Mocks = Partial<Record<keyof typeof rest, Record<string, MockSignatu

export const mocksToHandlers = (mocks: Mocks): ReturnType<(typeof rest)['get']>[] => {
const response: ReturnType<(typeof rest)['get']>[] = []
Object.entries(mocks).map(([method, mockHandlers]) => {
Object.entries(mockHandlers).map(([path, handler]) => {
Object.entries(mocks).forEach(([method, mockHandlers]) => {
Object.entries(mockHandlers).forEach(([path, handler]) => {
const pathWithoutTrailingSlash = path.replace(/\/$/, '')
response.push(
(rest[method] as (typeof rest)['get'])(pathWithoutTrailingSlash, async (req, res, ctx) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const featureFlagReleaseConditionsLogic = kea<featureFlagReleaseCondition
},
removeConditionSet: ({ index }) => {
const previousLength = Object.keys(values.affectedUsers).length
range(index, previousLength).map((idx) => {
range(index, previousLength).forEach((idx) => {
const count = previousLength - 1 === idx ? undefined : values.affectedUsers[idx + 1]
actions.setAffectedUsers(idx, count)
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/pipeline/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export function pipelineNodeMenuCommonItems(node: Transformation | SiteApp | Imp
},
]
if (node.backend === PipelineBackend.Plugin) {
items.concat(pluginMenuItems(node))
items.push(...pluginMenuItems(node))
}
return items
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/projectLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const projectLogic = kea<projectLogicType>([
actions.loadCurrentOrganization()
actions.loadUser()

Object.keys(payload).map((property) => {
Object.keys(payload).forEach((property) => {
eventUsageLogic.findMounted()?.actions?.reportProjectSettingChange(property, payload[property])
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export const playerInspectorLogic = kea<playerInspectorLogicType>([
segments
.filter((segment) => segment.kind === 'gap')
.filter((segment) => segment.durationMs > 15000)
.map((segment) => {
.forEach((segment) => {
const { timestamp, timeInRecording } = timeRelativeToStart(
{ timestamp: segment.startTimestamp },
start
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/teamLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const teamLogic = kea<teamLogicType>([
message = `${parseUpdatedAttributeName(updatedAttribute)} updated successfully!`
}

Object.keys(payload).map((property) => {
Object.keys(payload).forEach((property) => {
eventUsageLogic.findMounted()?.actions?.reportTeamSettingChange(property, payload[property])
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const validateEventSinkConfig = (config: SalesforcePluginConfig): void => {
const eventMapping = parseEventSinkConfig(config)

if (eventMapping !== null) {
Object.entries(eventMapping).map((entry) => {
Object.entries(eventMapping).forEach((entry) => {
const eventSink = entry[1]
if (eventSink.salesforcePath == null || eventSink.salesforcePath.trim() === '') {
throw new Error('You must provide a salesforce path for each mapping in config.eventEndpointMapping.')
Expand Down
4 changes: 2 additions & 2 deletions plugin-server/src/worker/ingestion/person-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,14 @@ export class PersonState {
let updated = false
// tracking as set because we only care about if other or geoip was the cause of the update, not how many properties got updated
const metricsKeys = new Set<string>()
Object.entries(propertiesOnce).map(([key, value]) => {
Object.entries(propertiesOnce).forEach(([key, value]) => {
if (typeof personProperties[key] === 'undefined') {
updated = true
metricsKeys.add(this.getMetricKey(key))
personProperties[key] = value
}
})
Object.entries(properties).map(([key, value]) => {
Object.entries(properties).forEach(([key, value]) => {
if (personProperties[key] !== value) {
if (typeof personProperties[key] === 'undefined' || this.shouldUpdatePersonIfOnlyChange(key)) {
updated = true
Expand Down
2 changes: 1 addition & 1 deletion plugin-server/tests/worker/console.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('console extension', () => {
await closeHub(hub)
})

Object.values(PluginLogEntryType).map((type) => {
Object.values(PluginLogEntryType).forEach((type) => {
const typeMethod = type.toLowerCase() as keyof ConsoleExtension

describe(`console#${typeMethod}`, () => {
Expand Down