Skip to content

Commit

Permalink
fix(cli): rename formatAmountToLocale to format for currency-utils co…
Browse files Browse the repository at this point in the history
…demod (#644)
  • Loading branch information
fernandofleury authored Jul 21, 2020
1 parent 271f1d9 commit 7bc5ad4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cli/migrate/__testfixtures__/currency-utils-1.output.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { formatCurrency, formatAmountForLocale } from '@sumup/intl';
import { formatCurrency, format } from '@sumup/intl';

const amount = '42';
const locale = 'en-US';
const currency = 'USD';

formatCurrency(amount, locale, currency);
formatAmountForLocale(amount, locale, currency);
format(amount, locale, currency);
4 changes: 2 additions & 2 deletions src/cli/migrate/__testfixtures__/currency-utils-2.output.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { formatAmountForLocale } from '@sumup/intl';
import { format } from '@sumup/intl';

const amount = '42';
const locale = 'en-US';
const currency = 'USD';

formatAmountForLocale(amount, locale, currency);
format(amount, locale, currency);
2 changes: 1 addition & 1 deletion src/cli/migrate/currency-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const transform: Transform = (file, api) => {
}

if (formatAmountForLocale.length) {
const name = 'formatAmountForLocale';
const name = 'format';
const identifier = j.identifier(name);
const importSpecifier = j.importSpecifier(identifier);

Expand Down

0 comments on commit 7bc5ad4

Please sign in to comment.