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

Allow using projects to properly tree-shake lodash #2406

Merged
merged 1 commit into from
Dec 13, 2024
Merged
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 @@ -40,7 +40,7 @@ import {
setReadonly,
UISchemaElement,
} from '@jsonforms/core';
import { cloneDeep } from 'lodash';
import cloneDeep from 'lodash/cloneDeep';

@Component({
selector: 'ObjectRenderer',
Expand Down
3 changes: 2 additions & 1 deletion packages/angular/src/library/jsonforms.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ import { JsonFormsBaseRenderer } from './base.renderer';
import { JsonFormsControl } from './control';
import { JsonFormsAngularService } from './jsonforms.service';

import { get, isEqual } from 'lodash';
import isEqual from 'lodash/isEqual';
import get from 'lodash/get';

const areEqual = (
prevProps: StatePropsOfJsonFormsRenderer,
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/src/library/jsonforms.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
import { BehaviorSubject, Observable } from 'rxjs';
import type { JsonFormsBaseRenderer } from './base.renderer';

import { cloneDeep } from 'lodash';
import cloneDeep from 'lodash/cloneDeep';
import type Ajv from 'ajv';
import type { ErrorObject } from 'ajv';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/mappers/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import {
} from '../store';
import { isInherentlyEnabled } from './util';
import { CombinatorKeyword } from './combinators';
import { isEqual } from 'lodash';
import isEqual from 'lodash/isEqual';

const move = (array: any[], index: number, delta: number) => {
const newIndex: number = index + delta;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/reducers/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
} from '../actions';
import { JsonFormsCore, Reducer, ValidationMode } from '../store';
import Ajv, { ErrorObject } from 'ajv';
import { isFunction } from 'lodash';
import isFunction from 'lodash/isFunction';
import { createAjv, validate } from '../util';

export const initState: JsonFormsCore = {
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/examples/arraysI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
import { registerExamples } from '../register';
import { ArrayTranslationEnum, Translator } from '@jsonforms/core';
import { get } from 'lodash';
import get from 'lodash/get';

export const schema = {
type: 'object',
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-vanilla/src/complex/ObjectRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
useJsonFormsControlWithDetail,
} from '../../config/jsonforms';
import { useVanillaControl } from '../util';
import { isEmpty } from 'lodash';
import isEmpty from 'lodash/isEmpty';

const controlRenderer = defineComponent({
name: 'ObjectRenderer',
Expand Down
Loading