-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Breaking] refactor: remove mc-scripts extract-intl, document usage o…
…f @formatjs/cli command (#1790) * [Breaking] Migrate packages to new @apollo/client (#1677) * refactor: migrate to new @apollo/client package * docs: breaking changes * fix: remove es6 import of apollo version * fix(apollo/cache): define type policies, remove unused key fields from product queries * feat: expose apollo hooks with context type bound to MC * docs: draft release notes for migrating to new apollo client * docs(website): divider for release notes content * refactor: remove unused type * fix: tests and build * fix: unused import * fix: test * test: fix leftovers * fix(website): text style workaround * chore: update @graphql-codegen/add to v2 * chore: rebase leftovers * docs(apollo-3): improve description on request context * docs: improve wording * refactor: use apollo-link-logger package * refactor(app-shell): allow to configure the apollo client (and cache) * test: fix assertions * fix: links * fix: prettier Co-authored-by: Adnan Asani <adnasa@users.noreply.github.com> * [Breaking] refactor: drop mc-http-server, make --use-local-assets the default behavior (#1787) * refactor: drop mc-http-server, make --use-local-assets the default behavior * fix: ports * docs: remove references to http-server * docs: keep old pages path but link to other documents * docs: changeset * fix: use transformer-local for starting app locally in production mode with login and logout dev pages * fix(website): links * refactor: add mc-scripts serve command to serve the production-built custom application locally * chore: remove refs to mc-http-server * refactor: remove mc-scripts extract-intl, document usage of @formatjs/cli command Co-authored-by: Adnan Asani <adnasa@users.noreply.github.com>
- Loading branch information
Showing
17 changed files
with
113 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
'merchant-center-application-template-starter': major | ||
'@commercetools-frontend/application-config': major | ||
'@commercetools-frontend/application-shell': major | ||
'@commercetools-frontend/application-shell-connectors': major | ||
'@commercetools-frontend/mc-dev-authentication': major | ||
'@commercetools-frontend/mc-html-template': major | ||
'@commercetools-frontend/mc-scripts': major | ||
'playground': major | ||
'@commercetools-local/visual-testing-app': major | ||
'@commercetools-website/custom-applications': major | ||
--- | ||
|
||
Remove `mc-scripts extract-intl` command in favor of the official `@formatjs/cli` package. | ||
We recommend to update your script to extract Intl messages to use the `formatjs extract` command. | ||
|
||
See full release notes: https://docs.commercetools.com/custom-applications/releases/2020-10-12-migrating-to-v17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// https://formatjs.io/docs/tooling/cli#extraction | ||
exports.format = function format(extractedMessages) { | ||
return ( | ||
Object.keys(extractedMessages) | ||
// transform strings to lowercase to imitate phraseapp sorting | ||
.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())) | ||
.reduce( | ||
(allMessages, messageId) => ({ | ||
...allMessages, | ||
// Return a simple key/value JSON object. | ||
[messageId]: extractedMessages[messageId].defaultMessage, | ||
}), | ||
{} | ||
) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"MainView.title": "Hello, world", | ||
"ViewOne.title": "View one", | ||
"ViewTwo.title": "View two" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// https://formatjs.io/docs/tooling/cli#extraction | ||
exports.format = function format(extractedMessages) { | ||
return ( | ||
Object.keys(extractedMessages) | ||
// transform strings to lowercase to imitate phraseapp sorting | ||
.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())) | ||
.reduce( | ||
(allMessages, messageId) => ({ | ||
...allMessages, | ||
// Return a simple key/value JSON object. | ||
[messageId]: extractedMessages[messageId].defaultMessage, | ||
}), | ||
{} | ||
) | ||
); | ||
}; |
Oops, something went wrong.