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

Remove lodash #464

Merged
merged 1 commit into from
Jul 16, 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
Remove lodash
  • Loading branch information
RobbieTheWagner committed Jul 16, 2024
commit 2ca8116cf85a80525b401339809373e388a9c3ec
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
"deepmerge": "^4.3.1",
"ember-auto-import": "^2.7.2",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.3.0",
"lodash-es": "^4.17.21",
"webpack": "^5.91.0"
"ember-cli-htmlbars": "^6.3.0"
},
"devDependencies": {
"@babel/core": "^7.24.4",
Expand Down Expand Up @@ -94,7 +92,8 @@
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.1.0",
"typescript": "^5.5.3"
"typescript": "^5.5.3",
"webpack": "^5.91.0"
},
"peerDependencies": {
"ember-source": ">= 3.28.0",
Expand Down
5 changes: 1 addition & 4 deletions tests/dummy/app/components/chart-highstock-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { inject as service } from '@ember/service';
import { action } from '@ember/object';

import stockData from '../data/stock';
import cloneDeep from 'lodash-es/cloneDeep';

const clone = window.structuredClone ?? cloneDeep;

export default class BarBasic extends Component {
@service('dynamic-chart')
Expand All @@ -20,7 +17,7 @@ export default class BarBasic extends Component {
},
};

chartData = clone(stockData);
chartData = structuredClone(stockData);

@action
updateSeriesData() {
Expand Down
5 changes: 1 addition & 4 deletions tests/dummy/app/components/chart-line-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { inject as service } from '@ember/service';
import Component from '@glimmer/component';
import commitStats from '../data/commit-stats';
import { action } from '@ember/object';
import cloneDeep from 'lodash-es/cloneDeep';

const clone = window.structuredClone ?? cloneDeep;

export default class BarBasic extends Component {
@service('dynamic-chart')
Expand All @@ -30,7 +27,7 @@ export default class BarBasic extends Component {
},
};

chartData = clone(commitStats);
chartData = structuredClone(commitStats);

@action
updateSeriesData() {
Expand Down
5 changes: 1 addition & 4 deletions tests/dummy/app/services/dynamic-chart.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import Service from '@ember/service';
import cloneDeep from 'lodash-es/cloneDeep';

const clone = window.structuredClone ?? cloneDeep;

export default class DynamicChart extends Service {
getRandomInt(min, max) {
Expand All @@ -19,7 +16,7 @@ export default class DynamicChart extends Service {
}

updateSeriesCount(chartData, numSeries) {
let chartDataCopy = clone(chartData);
let chartDataCopy = structuredClone(chartData);
return chartDataCopy.slice(0, numSeries);
}
}
7 changes: 2 additions & 5 deletions tests/integration/components/high-charts-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, settled, waitFor } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import cloneDeep from 'lodash-es/cloneDeep';

const clone = window.structuredClone ?? cloneDeep;

import {
lineChartOptions,
Expand Down Expand Up @@ -67,7 +64,7 @@ module('Integration | Component | High Charts', function (hooks) {
.exists({ count: 3 }, 'base series count');

// add a series to chart content
let cityDataCopy = clone(cityData);
let cityDataCopy = structuredClone(cityData);
cityDataCopy.push({
name: 'San Francisco',
data: [
Expand Down Expand Up @@ -98,7 +95,7 @@ module('Integration | Component | High Charts', function (hooks) {
.exists({ count: 3 }, 'base series count');

// remove a series from chart content
let cityDataCopy = clone(cityData);
let cityDataCopy = structuredClone(cityData);
cityDataCopy = cityDataCopy.slice(0, 2);

this.set('cityData', cityDataCopy);
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8155,11 +8155,6 @@ locate-path@^7.1.0:
dependencies:
p-locate "^6.0.0"

lodash-es@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==

lodash._baseflatten@^3.0.0:
version "3.1.4"
resolved "https://registry.yarnpkg.com/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz#0770ff80131af6e34f3b511796a7ba5214e65ff7"
Expand Down
Loading