Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
fix: use lodash.fromPairs over Object.fromEntries
Browse files Browse the repository at this point in the history
  • Loading branch information
buschtoens committed Jun 18, 2019
1 parent 23d899e commit 75fe432
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"ember-auto-import": "^1.4.1",
"ember-cli-babel": "^7.1.2",
"ember-cli-typescript": "^2.0.1",
"lodash.frompairs": "^4.0.1",
"lodash.transform": "^4.6.0",
"p-event": "^4.1.0",
"postcss": "^7.0.17",
Expand All @@ -62,6 +63,7 @@
"@types/ember-testing-helpers": "^0.0.3",
"@types/ember__test-helpers": "^0.7.8",
"@types/express": "^4.17.0",
"@types/lodash.frompairs": "^4.0.6",
"@types/lodash.transform": "^4.6.6",
"@types/node": "^12.0.8",
"@types/p-event": "^3.0.0",
Expand Down
3 changes: 2 additions & 1 deletion ts/addon.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { join } from 'path';
import fromPairs from 'lodash.frompairs';
import { addon } from './lib/utils/ember-cli-entities';
import BroccoliDebug from 'broccoli-debug';
import { register } from './plugins/preprocessor-registry';
Expand Down Expand Up @@ -108,7 +109,7 @@ const addonPrototype = addon({

const configFile = configCreatorJS(`${this.name}/config`, {
options: this.makeupOptions,
themePaths: Object.fromEntries(
themePaths: fromPairs(
this.themeProviders
.getThemeNames()
.map(themeName => [
Expand Down
4 changes: 1 addition & 3 deletions ts/themes/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ export class ThemeProviderRegistry {
);
if (!(plugin instanceof ThemeProvider)) {
this.parent.ui.writeWarnLine(
`Addon '${
addon.name
}' did not return a 'ThemeProvider' instance from its 'createEmberMakeupThemeProvider' hook.`
`Addon '${addon.name}' did not return a 'ThemeProvider' instance from its 'createEmberMakeupThemeProvider' hook.`
);
}

Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,13 @@
dependencies:
"@types/sizzle" "*"

"@types/lodash.frompairs@^4.0.6":
version "4.0.6"
resolved "https://registry.yarnpkg.com/@types/lodash.frompairs/-/lodash.frompairs-4.0.6.tgz#09b082c10fa753dc2001302b75ac79ca1e0a9ea3"
integrity sha512-rwCUf4NMKhXpiVjL/RXP8YOk+rd02/J4tACADEgaMXRVnzDbSSlBMKFZoX/ARmHVLg3Qc98Um4PErGv8FbxU7w==
dependencies:
"@types/lodash" "*"

"@types/lodash.transform@^4.6.6":
version "4.6.6"
resolved "https://registry.yarnpkg.com/@types/lodash.transform/-/lodash.transform-4.6.6.tgz#f69d442089180d7724430ede6b7a985720117132"
Expand Down Expand Up @@ -7084,6 +7091,11 @@ lodash.forown@~2.3.0:
lodash._objecttypes "~2.3.0"
lodash.keys "~2.3.0"

lodash.frompairs@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.frompairs/-/lodash.frompairs-4.0.1.tgz#bc4e5207fa2757c136e573614e9664506b2b1bd2"
integrity sha1-vE5SB/onV8E25XNhTpZkUGsrG9I=

lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
Expand Down

0 comments on commit 75fe432

Please sign in to comment.