Remove preconstruct, update wyw (#13844)

To simplify our setup, moving back to Vite to build twenty-shared.

Also upgrading wyw

---------

Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
Félix Malfait
2025-08-12 12:43:35 +02:00
committed by GitHub
parent 954da6da9d
commit 8b59fcaea7
77 changed files with 493 additions and 716 deletions
@@ -14,7 +14,7 @@ import { SelectableList } from '@/ui/layout/selectable-list/components/Selectabl
import { SelectableListItem } from '@/ui/layout/selectable-list/components/SelectableListItem';
import { selectedItemIdComponentState } from '@/ui/layout/selectable-list/states/selectedItemIdComponentState';
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
import { type ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { type ViewFilterOperand } from 'twenty-shared/types';
import { MenuItem } from 'twenty-ui/navigation';
type AdvancedFilterRecordFilterOperandSelectContentProps = {
@@ -12,7 +12,7 @@ import {
type VariableDateViewFilterValueUnit,
} from '@/views/view-filter-value/utils/resolveDateViewFilterValue';
import { useState } from 'react';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { FieldMetadataType } from '~/generated-metadata/graphql';
@@ -6,7 +6,7 @@ import { ObjectFilterDropdownRecordSelect } from '@/object-record/object-filter-
import { ObjectFilterDropdownSearchInput } from '@/object-record/object-filter-dropdown/components/ObjectFilterDropdownSearchInput';
import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { getFilterTypeFromFieldType } from '@/object-metadata/utils/formatFieldMetadataItemsAsFilterDefinitions';
import { ObjectFilterDropdownBooleanSelect } from '@/object-record/object-filter-dropdown/components/ObjectFilterDropdownBooleanSelect';
@@ -1,6 +1,6 @@
import { ObjectFilterDropdownComponentInstanceContext } from '@/object-record/object-filter-dropdown/states/contexts/ObjectFilterDropdownComponentInstanceContext';
import { createComponentState } from '@/ui/utilities/state/component-state/utils/createComponentState';
import { type ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { type ViewFilterOperand } from 'twenty-shared/types';
export const selectedOperandInDropdownComponentState =
createComponentState<ViewFilterOperand | null>({
@@ -1,4 +1,4 @@
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { capitalize } from 'twenty-shared/utils';
import { getOperandLabel, getOperandLabelShort } from '../getOperandLabel';
@@ -1,4 +1,4 @@
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { isFilterOperandExpectingValue } from '../isFilterOperandExpectingValue';
@@ -1,4 +1,4 @@
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
export const configurableViewFilterOperands = new Set<ViewFilterOperand>([
ViewFilterOperand.Is,
@@ -1,5 +1,5 @@
import { t } from '@lingui/core/macro';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
export const getOperandLabel = (
operand: ViewFilterOperand | null | undefined,
@@ -1,4 +1,4 @@
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
export const isFilterOperandExpectingValue = (operand: ViewFilterOperand) => {
switch (operand) {
@@ -1,8 +1,10 @@
import { type RATING_VALUES } from '@/object-record/record-field/meta-types/constants/RatingValues';
import { type ZodHelperLiteral } from '@/object-record/record-field/types/ZodHelperLiteral';
import { type ObjectRecord } from '@/object-record/types/ObjectRecord';
import { type AllowedAddressSubField } from 'twenty-shared/src/types/AddressFieldsType';
import { ConnectedAccountProvider } from 'twenty-shared/types';
import {
ConnectedAccountProvider,
type AllowedAddressSubField,
} from 'twenty-shared/types';
import { type ThemeColor } from 'twenty-ui/theme';
import { z } from 'zod';
import { type RelationType } from '~/generated-metadata/graphql';
@@ -1,6 +1,6 @@
import { z } from 'zod';
import { ALLOWED_ADDRESS_SUBFIELDS } from 'twenty-shared/src/types/AddressFieldsType';
import { ALLOWED_ADDRESS_SUBFIELDS } from 'twenty-shared/types';
import { type FieldAddressValue } from '../FieldMetadata';
export const addressSchema = z.object({
@@ -4,7 +4,7 @@ import { currentRecordFiltersComponentState } from '@/object-record/record-filte
import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
import { act } from 'react';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { FieldMetadataType } from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
import { useRemoveRecordFilter } from '../useRemoveRecordFilter';
@@ -4,7 +4,7 @@ import { act } from 'react';
import { currentRecordFiltersComponentState } from '@/object-record/record-filter/states/currentRecordFiltersComponentState';
import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { FieldMetadataType } from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
import { useUpsertRecordFilter } from '../useUpsertRecordFilter';
@@ -1,7 +1,7 @@
import { type FilterableAndTSVectorFieldType } from '@/object-record/record-filter/types/FilterableFieldType';
import { type FILTER_OPERANDS_MAP } from '@/object-record/record-filter/utils/getRecordFilterOperands';
import { type CompositeFieldSubFieldName } from '@/settings/data-model/types/CompositeFieldSubFieldName';
import { type ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { type ViewFilterOperand } from 'twenty-shared/types';
export type RecordFilter = {
id: string;
@@ -1 +1 @@
export { ViewFilterOperand as RecordFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
export { ViewFilterOperand as RecordFilterOperand } from 'twenty-shared/types';
@@ -3,7 +3,7 @@ import { type RecordFilter } from '@/object-record/record-filter/types/RecordFil
import { RecordFilterOperand } from '@/object-record/record-filter/types/RecordFilterOperand';
import { type RecordFilterValueDependencies } from '@/object-record/record-filter/types/RecordFilterValueDependencies';
import { computeRecordGqlOperationFilter } from '@/object-record/record-filter/utils/computeRecordGqlOperationFilter';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { FieldMetadataType } from '~/generated-metadata/graphql';
import { getCompaniesMock } from '~/testing/mock-data/companies';
@@ -20,7 +20,7 @@ import { type RecordFilter } from '@/object-record/record-filter/types/RecordFil
import { computeEmptyGqlOperationFilterForEmails } from '@/object-record/record-filter/utils/compute-empty-record-gql-operation-filter/for-composite-field/computeEmptyGqlOperationFilterForEmails';
import { computeEmptyGqlOperationFilterForLinks } from '@/object-record/record-filter/utils/compute-empty-record-gql-operation-filter/for-composite-field/computeEmptyGqlOperationFilterForLinks';
import { isNonEmptyString } from '@sniptt/guards';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { type Field } from '~/generated/graphql';
import { generateILikeFiltersForCompositeFields } from '~/utils/array/generateILikeFiltersForCompositeFields';
@@ -5,8 +5,10 @@ import {
type FilterableFieldType,
} from '@/object-record/record-filter/types/FilterableFieldType';
import { type CompositeFieldSubFieldName } from '@/settings/data-model/types/CompositeFieldSubFieldName';
import { ViewFilterOperand as RecordFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { FieldMetadataType } from 'twenty-shared/types';
import {
FieldMetadataType,
ViewFilterOperand as RecordFilterOperand,
} from 'twenty-shared/types';
import { assertUnreachable } from 'twenty-shared/utils';
export type GetRecordFilterOperandsParams = {
@@ -10,7 +10,7 @@ import { isSoftDeleteFilterActiveComponentState } from '@/object-record/record-t
import { useRecoilComponentCallbackState } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentCallbackState';
import { useRecoilCallback } from 'recoil';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
type UseHandleToggleTrashColumnFilterProps = {
@@ -26,7 +26,7 @@ import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDrop
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
import { useLingui } from '@lingui/react/macro';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { RelationType } from '~/generated-metadata/graphql';
import { getAppPath } from '~/utils/navigation/getAppPath';
@@ -2,7 +2,7 @@ import { type FieldMetadataItemOption } from '@/object-metadata/types/FieldMetad
import { type FilterableFieldType } from '@/object-record/record-filter/types/FilterableFieldType';
import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';
import { type ColorScheme } from '@/workspace-member/types/WorkspaceMember';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { RelationType } from '~/generated-metadata/graphql';
import { buildValueFromFilter } from './buildRecordInputFromFilter';
@@ -7,7 +7,7 @@ import {
type RecordFilterToRecordInputOperand,
} from '@/object-record/record-filter/types/RecordFilter';
import { FILTER_OPERANDS_MAP } from '@/object-record/record-filter/utils/getRecordFilterOperands';
import { ViewFilterOperand } from 'twenty-shared/src/types/ViewFilterOperand';
import { ViewFilterOperand } from 'twenty-shared/types';
import { assertUnreachable, parseJson } from 'twenty-shared/utils';
import { RelationType } from '~/generated-metadata/graphql';