├── .all-contributorsrc ├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── test.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── CODE_OF_CONDUCT.md ├── example ├── basic │ ├── babel.config.js │ ├── i18n │ │ ├── .keep │ │ ├── en.json │ │ └── ja.json │ ├── package.json │ ├── src │ │ ├── App.jsx │ │ └── messages.js │ └── yarn.lock └── with-typescript │ ├── babel.config.js │ ├── i18n │ ├── en.json │ └── ja.json │ ├── package.json │ ├── src │ ├── App.tsx │ └── messages.ts │ └── yarn.lock ├── jest.config.js ├── license ├── package.json ├── readme.md ├── renovate.json ├── src ├── cli.ts ├── extract-react-intl │ ├── index.ts │ ├── readme.md │ └── test │ │ ├── __snapshots__ │ │ └── test.ts.snap │ │ ├── fixtures │ │ ├── .babelrc │ │ ├── components │ │ │ ├── App │ │ │ │ ├── index.js │ │ │ │ └── messages.js │ │ │ ├── Greeting │ │ │ │ ├── index.js │ │ │ │ └── messages.js │ │ │ └── LanguageProvider │ │ │ │ └── index.js │ │ ├── index.html │ │ └── index.js │ │ ├── pluginOrdering │ │ ├── .babelrc │ │ └── messages.js │ │ ├── resolution │ │ ├── .babelrc │ │ └── messages.js │ │ └── test.ts ├── global.d.ts ├── index.ts └── test │ ├── fixtures │ ├── custom │ │ ├── a │ │ │ └── messages.js │ │ ├── b │ │ │ └── messages.js │ │ └── i18n.js │ ├── default │ │ ├── a │ │ │ ├── App.js │ │ │ └── messages.js │ │ └── b │ │ │ └── messages.js │ ├── removed │ │ ├── a │ │ │ └── messages.js │ │ └── b │ │ │ └── messages.js │ └── unsorted │ │ ├── a │ │ └── messages.js │ │ └── b │ │ └── messages.js │ ├── json │ ├── __snapshots__ │ │ └── test.ts.snap │ └── test.ts │ ├── test.ts │ └── yaml │ ├── __snapshots__ │ └── test.ts.snap │ └── test.ts ├── tsconfig.json └── yarn.lock /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "extract-react-intl-messages", 3 | "projectOwner": "akameco", 4 | "files": [ 5 | "readme.md" 6 | ], 7 | "imageSize": 100, 8 | "commit": true, 9 | "contributors": [ 10 | { 11 | "login": "akameco", 12 | "name": "akameco", 13 | "avatar_url": "https://avatars2.githubusercontent.com/u/4002137?v=4", 14 | "profile": "http://akameco.github.io", 15 | "contributions": [ 16 | "code", 17 | "test", 18 | "doc", 19 | "infra" 20 | ] 21 | }, 22 | { 23 | "login": "hoantran-it", 24 | "name": "Hoan Tran", 25 | "avatar_url": "https://avatars3.githubusercontent.com/u/13161875?v=4", 26 | "profile": "http://hoantran.info", 27 | "contributions": [ 28 | "code", 29 | "test" 30 | ] 31 | }, 32 | { 33 | "login": "giantpinkwalrus", 34 | "name": "giantpinkwalrus", 35 | "avatar_url": "https://avatars1.githubusercontent.com/u/3383240?v=4", 36 | "profile": "https://github.com/giantpinkwalrus", 37 | "contributions": [ 38 | "code" 39 | ] 40 | }, 41 | { 42 | "login": "enrique-ramirez", 43 | "name": "enrique-ramirez", 44 | "avatar_url": "https://avatars3.githubusercontent.com/u/1190640?v=4", 45 | "profile": "https://github.com/enrique-ramirez", 46 | "contributions": [ 47 | "doc" 48 | ] 49 | }, 50 | { 51 | "login": "hoschi", 52 | "name": "Stefan Gojan", 53 | "avatar_url": "https://avatars2.githubusercontent.com/u/163128?v=4", 54 | "profile": "http://stefan-gojan.de", 55 | "contributions": [ 56 | "bug", 57 | "code", 58 | "test" 59 | ] 60 | }, 61 | { 62 | "login": "solomon23", 63 | "name": "Solomon English", 64 | "avatar_url": "https://avatars1.githubusercontent.com/u/857744?v=4", 65 | "profile": "https://lithe.net", 66 | "contributions": [ 67 | "code" 68 | ] 69 | }, 70 | { 71 | "login": "Filson14", 72 | "name": "Filip \"Filson\" Pasternak", 73 | "avatar_url": "https://avatars1.githubusercontent.com/u/4540538?v=4", 74 | "profile": "https://github.com/Filson14", 75 | "contributions": [ 76 | "code" 77 | ] 78 | }, 79 | { 80 | "login": "nodaguti", 81 | "name": "nodaguti", 82 | "avatar_url": "https://avatars0.githubusercontent.com/u/27622?v=4", 83 | "profile": "http://about.me/nodaguti", 84 | "contributions": [ 85 | "code", 86 | "test" 87 | ] 88 | }, 89 | { 90 | "login": "fix-fix", 91 | "name": "fix-fix", 92 | "avatar_url": "https://avatars1.githubusercontent.com/u/11943024?v=4", 93 | "profile": "https://github.com/fix-fix", 94 | "contributions": [ 95 | "code" 96 | ] 97 | }, 98 | { 99 | "login": "bradbarrow", 100 | "name": "bradbarrow", 101 | "avatar_url": "https://avatars3.githubusercontent.com/u/1264276?v=4", 102 | "profile": "http://bradbarrow.com", 103 | "contributions": [ 104 | "bug", 105 | "code", 106 | "test" 107 | ] 108 | }, 109 | { 110 | "login": "gmaclennan", 111 | "name": "Gregor MacLennan", 112 | "avatar_url": "https://avatars1.githubusercontent.com/u/290457?v=4", 113 | "profile": "http://ddem.us/", 114 | "contributions": [ 115 | "code" 116 | ] 117 | }, 118 | { 119 | "login": "zarv1k", 120 | "name": "Dmitry Zarva", 121 | "avatar_url": "https://avatars1.githubusercontent.com/u/6296643?v=4", 122 | "profile": "https://github.com/zarv1k", 123 | "contributions": [ 124 | "code" 125 | ] 126 | }, 127 | { 128 | "login": "panpanc", 129 | "name": "Michael Pan", 130 | "avatar_url": "https://avatars2.githubusercontent.com/u/29132669?v=4", 131 | "profile": "https://github.com/panpanc", 132 | "contributions": [ 133 | "example" 134 | ] 135 | }, 136 | { 137 | "login": "testower", 138 | "name": "Tom Erik Støwer", 139 | "avatar_url": "https://avatars2.githubusercontent.com/u/231492?v=4", 140 | "profile": "https://github.com/testower", 141 | "contributions": [ 142 | "code" 143 | ] 144 | }, 145 | { 146 | "login": "lensbart", 147 | "name": "Bart Lens", 148 | "avatar_url": "https://avatars0.githubusercontent.com/u/20876627?v=4", 149 | "profile": "https://nextbook.io", 150 | "contributions": [ 151 | "code" 152 | ] 153 | }, 154 | { 155 | "login": "revskill10", 156 | "name": "Truong Hoang Dung", 157 | "avatar_url": "https://avatars3.githubusercontent.com/u/1390196?v=4", 158 | "profile": "https://github.com/revskill10", 159 | "contributions": [ 160 | "example" 161 | ] 162 | } 163 | ], 164 | "repoType": "github", 165 | "commitConvention": "none", 166 | "repoHost": "https://github.com", 167 | "skipCi": true, 168 | "contributorsPerLine": 7 169 | } 170 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "node": "current" 8 | } 9 | } 10 | ], 11 | "@babel/preset-react" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/test/fixtures/** 2 | **/test/resolution/** 3 | **/test/pluginOrdering/** 4 | flow-typed 5 | coverage 6 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["precure/auto"], 3 | "rules": { 4 | "@typescript-eslint/explicit-function-return-type": "off" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.js text eol=lf 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | - version: 10 | - `node` version: 11 | - `npm` (or `yarn`) version: 12 | 13 | **Do you want to request a *feature* or report a *bug*?:** 14 | 15 | **What is the current behavior?:** 16 | 17 | **What is the expected behavior?:** 18 | 19 | **Suggested solution:** 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | **What**: 8 | 9 | 10 | 11 | **Why**: 12 | 13 | 14 | 15 | **How**: 16 | 17 | 18 | **Checklist**: 19 | 20 | 21 | * [ ] Documentation 22 | * [ ] Tests 23 | * [ ] Ready to be merged 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | node-version: [10.x, 12.x] 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Setup node 14 | uses: actions/setup-node@v1 15 | with: 16 | node-version: ${{ matrix.node }} 17 | - run: yarn install 18 | - run: yarn lint 19 | - run: yarn test 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib 3 | dist 4 | .eslintcache 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/test/fixtures/** 2 | .github 3 | dist 4 | package.json 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "trailingComma": "none" 5 | } 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - Using welcoming and inclusive language 12 | - Being respectful of differing viewpoints and experiences 13 | - Gracefully accepting constructive criticism 14 | - Focusing on what is best for the community 15 | - Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | - Trolling, insulting/derogatory comments, and personal or political attacks 21 | - Public or private harassment 22 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | - Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at akameco.t@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /example/basic/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true) 3 | 4 | return { 5 | presets: ['react-app'] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example/basic/i18n/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akameco/extract-react-intl-messages/4b68e778bc2e6874cb9092f01729c6852d1082b9/example/basic/i18n/.keep -------------------------------------------------------------------------------- /example/basic/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "App": { 3 | "hello": "Hello Button", 4 | "submit": "Submit Button" 5 | }, 6 | "a": { 7 | "hello": "hello", 8 | "world": "world" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/basic/i18n/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "App": { 3 | "hello": "", 4 | "submit": "" 5 | }, 6 | "a": { 7 | "hello": "", 8 | "world": "" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/basic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "basic", 3 | "version": "1.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "i18n": "NODE_ENV=development extract-messages -l=en,ja -o i18n -d en 'src/**/*.{js,jsx}'" 7 | }, 8 | "dependencies": { 9 | "react": "^16.13.1", 10 | "react-intl": "^4.3.1" 11 | }, 12 | "devDependencies": { 13 | "@babel/core": "^7.9.0", 14 | "babel-preset-react-app": "^9.1.2", 15 | "extract-react-intl-messages": "latest" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /example/basic/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { injectIntl, useIntl } from 'react-intl' 3 | 4 | export const SubmitButton = injectIntl(({ intl }) => { 5 | const label = intl.formatMessage({ 6 | id: 'App.submit', 7 | defaultMessage: 'Submit Button' 8 | }) 9 | return 10 | }) 11 | 12 | export const HelloButton = () => { 13 | const intl = useIntl() 14 | const label = intl.formatMessage({ 15 | id: 'App.hello', 16 | defaultMessage: 'Hello Button' 17 | }) 18 | return 19 | } 20 | -------------------------------------------------------------------------------- /example/basic/src/messages.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-extraneous-dependencies */ 2 | import { defineMessages } from 'react-intl' 3 | 4 | export default defineMessages({ 5 | hello: { 6 | id: 'a.hello', 7 | defaultMessage: 'hello' 8 | }, 9 | world: { 10 | id: 'a.world', 11 | defaultMessage: 'world' 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /example/with-typescript/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true) 3 | 4 | return { 5 | presets: ['@babel/preset-react', '@babel/preset-typescript'] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example/with-typescript/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "App": { 3 | "hello": "Hello Button", 4 | "submit": "Submit Button" 5 | }, 6 | "a": { 7 | "hello": "hello", 8 | "world": "world" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/with-typescript/i18n/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "App": { 3 | "hello": "", 4 | "submit": "" 5 | }, 6 | "a": { 7 | "hello": "", 8 | "world": "" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/with-typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-typescript", 3 | "version": "1.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "i18n": "extract-messages -l=en,ja -o i18n -d en 'src/**/*.{ts,tsx}'" 7 | }, 8 | "dependencies": { 9 | "react": "^16.13.1", 10 | "react-intl": "^4.3.1" 11 | }, 12 | "devDependencies": { 13 | "@babel/core": "^7.9.0", 14 | "@babel/preset-react": "^7.9.4", 15 | "@babel/preset-typescript": "^7.9.0", 16 | "extract-react-intl-messages": "latest", 17 | "typescript": "^3.8.3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /example/with-typescript/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { injectIntl, useIntl } from 'react-intl' 3 | 4 | export const SubmitButton = injectIntl(({ intl }) => { 5 | const label = intl.formatMessage({ 6 | id: 'App.submit', 7 | defaultMessage: 'Submit Button' 8 | }) 9 | return 10 | }) 11 | 12 | export const HelloButton = () => { 13 | const intl = useIntl() 14 | const label = intl.formatMessage({ 15 | id: 'App.hello', 16 | defaultMessage: 'Hello Button' 17 | }) 18 | return 19 | } 20 | -------------------------------------------------------------------------------- /example/with-typescript/src/messages.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'a.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | world: { 9 | id: 'a.world', 10 | defaultMessage: 'world' 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /example/with-typescript/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": 6 | version "7.8.3" 7 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" 8 | integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== 9 | dependencies: 10 | "@babel/highlight" "^7.8.3" 11 | 12 | "@babel/core@^7.7.2", "@babel/core@^7.9.0": 13 | version "7.9.0" 14 | resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" 15 | integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== 16 | dependencies: 17 | "@babel/code-frame" "^7.8.3" 18 | "@babel/generator" "^7.9.0" 19 | "@babel/helper-module-transforms" "^7.9.0" 20 | "@babel/helpers" "^7.9.0" 21 | "@babel/parser" "^7.9.0" 22 | "@babel/template" "^7.8.6" 23 | "@babel/traverse" "^7.9.0" 24 | "@babel/types" "^7.9.0" 25 | convert-source-map "^1.7.0" 26 | debug "^4.1.0" 27 | gensync "^1.0.0-beta.1" 28 | json5 "^2.1.2" 29 | lodash "^4.17.13" 30 | resolve "^1.3.2" 31 | semver "^5.4.1" 32 | source-map "^0.5.0" 33 | 34 | "@babel/generator@^7.9.0": 35 | version "7.9.4" 36 | resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce" 37 | integrity sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA== 38 | dependencies: 39 | "@babel/types" "^7.9.0" 40 | jsesc "^2.5.1" 41 | lodash "^4.17.13" 42 | source-map "^0.5.0" 43 | 44 | "@babel/helper-annotate-as-pure@^7.8.3": 45 | version "7.8.3" 46 | resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" 47 | integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw== 48 | dependencies: 49 | "@babel/types" "^7.8.3" 50 | 51 | "@babel/helper-builder-react-jsx-experimental@^7.9.0": 52 | version "7.9.0" 53 | resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.0.tgz#066d80262ade488f9c1b1823ce5db88a4cedaa43" 54 | integrity sha512-3xJEiyuYU4Q/Ar9BsHisgdxZsRlsShMe90URZ0e6przL26CCs8NJbDoxH94kKT17PcxlMhsCAwZd90evCo26VQ== 55 | dependencies: 56 | "@babel/helper-annotate-as-pure" "^7.8.3" 57 | "@babel/helper-module-imports" "^7.8.3" 58 | "@babel/types" "^7.9.0" 59 | 60 | "@babel/helper-builder-react-jsx@^7.9.0": 61 | version "7.9.0" 62 | resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.9.0.tgz#16bf391990b57732700a3278d4d9a81231ea8d32" 63 | integrity sha512-weiIo4gaoGgnhff54GQ3P5wsUQmnSwpkvU0r6ZHq6TzoSzKy4JxHEgnxNytaKbov2a9z/CVNyzliuCOUPEX3Jw== 64 | dependencies: 65 | "@babel/helper-annotate-as-pure" "^7.8.3" 66 | "@babel/types" "^7.9.0" 67 | 68 | "@babel/helper-create-class-features-plugin@^7.8.3": 69 | version "7.8.6" 70 | resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz#243a5b46e2f8f0f674dc1387631eb6b28b851de0" 71 | integrity sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg== 72 | dependencies: 73 | "@babel/helper-function-name" "^7.8.3" 74 | "@babel/helper-member-expression-to-functions" "^7.8.3" 75 | "@babel/helper-optimise-call-expression" "^7.8.3" 76 | "@babel/helper-plugin-utils" "^7.8.3" 77 | "@babel/helper-replace-supers" "^7.8.6" 78 | "@babel/helper-split-export-declaration" "^7.8.3" 79 | 80 | "@babel/helper-function-name@^7.8.3": 81 | version "7.8.3" 82 | resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" 83 | integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== 84 | dependencies: 85 | "@babel/helper-get-function-arity" "^7.8.3" 86 | "@babel/template" "^7.8.3" 87 | "@babel/types" "^7.8.3" 88 | 89 | "@babel/helper-get-function-arity@^7.8.3": 90 | version "7.8.3" 91 | resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" 92 | integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== 93 | dependencies: 94 | "@babel/types" "^7.8.3" 95 | 96 | "@babel/helper-member-expression-to-functions@^7.8.3": 97 | version "7.8.3" 98 | resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" 99 | integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== 100 | dependencies: 101 | "@babel/types" "^7.8.3" 102 | 103 | "@babel/helper-module-imports@^7.8.3": 104 | version "7.8.3" 105 | resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" 106 | integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== 107 | dependencies: 108 | "@babel/types" "^7.8.3" 109 | 110 | "@babel/helper-module-transforms@^7.9.0": 111 | version "7.9.0" 112 | resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" 113 | integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== 114 | dependencies: 115 | "@babel/helper-module-imports" "^7.8.3" 116 | "@babel/helper-replace-supers" "^7.8.6" 117 | "@babel/helper-simple-access" "^7.8.3" 118 | "@babel/helper-split-export-declaration" "^7.8.3" 119 | "@babel/template" "^7.8.6" 120 | "@babel/types" "^7.9.0" 121 | lodash "^4.17.13" 122 | 123 | "@babel/helper-optimise-call-expression@^7.8.3": 124 | version "7.8.3" 125 | resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" 126 | integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== 127 | dependencies: 128 | "@babel/types" "^7.8.3" 129 | 130 | "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.3": 131 | version "7.8.3" 132 | resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" 133 | integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== 134 | 135 | "@babel/helper-replace-supers@^7.8.6": 136 | version "7.8.6" 137 | resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" 138 | integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== 139 | dependencies: 140 | "@babel/helper-member-expression-to-functions" "^7.8.3" 141 | "@babel/helper-optimise-call-expression" "^7.8.3" 142 | "@babel/traverse" "^7.8.6" 143 | "@babel/types" "^7.8.6" 144 | 145 | "@babel/helper-simple-access@^7.8.3": 146 | version "7.8.3" 147 | resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" 148 | integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== 149 | dependencies: 150 | "@babel/template" "^7.8.3" 151 | "@babel/types" "^7.8.3" 152 | 153 | "@babel/helper-split-export-declaration@^7.8.3": 154 | version "7.8.3" 155 | resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" 156 | integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== 157 | dependencies: 158 | "@babel/types" "^7.8.3" 159 | 160 | "@babel/helper-validator-identifier@^7.9.0": 161 | version "7.9.0" 162 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" 163 | integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== 164 | 165 | "@babel/helpers@^7.9.0": 166 | version "7.9.2" 167 | resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" 168 | integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== 169 | dependencies: 170 | "@babel/template" "^7.8.3" 171 | "@babel/traverse" "^7.9.0" 172 | "@babel/types" "^7.9.0" 173 | 174 | "@babel/highlight@^7.8.3": 175 | version "7.9.0" 176 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" 177 | integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== 178 | dependencies: 179 | "@babel/helper-validator-identifier" "^7.9.0" 180 | chalk "^2.0.0" 181 | js-tokens "^4.0.0" 182 | 183 | "@babel/parser@^7.1.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": 184 | version "7.9.4" 185 | resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" 186 | integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== 187 | 188 | "@babel/plugin-syntax-jsx@^7.8.3": 189 | version "7.8.3" 190 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz#521b06c83c40480f1e58b4fd33b92eceb1d6ea94" 191 | integrity sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A== 192 | dependencies: 193 | "@babel/helper-plugin-utils" "^7.8.3" 194 | 195 | "@babel/plugin-syntax-typescript@^7.8.3": 196 | version "7.8.3" 197 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz#c1f659dda97711a569cef75275f7e15dcaa6cabc" 198 | integrity sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg== 199 | dependencies: 200 | "@babel/helper-plugin-utils" "^7.8.3" 201 | 202 | "@babel/plugin-transform-react-display-name@^7.8.3": 203 | version "7.8.3" 204 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz#70ded987c91609f78353dd76d2fb2a0bb991e8e5" 205 | integrity sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A== 206 | dependencies: 207 | "@babel/helper-plugin-utils" "^7.8.3" 208 | 209 | "@babel/plugin-transform-react-jsx-development@^7.9.0": 210 | version "7.9.0" 211 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.9.0.tgz#3c2a130727caf00c2a293f0aed24520825dbf754" 212 | integrity sha512-tK8hWKrQncVvrhvtOiPpKrQjfNX3DtkNLSX4ObuGcpS9p0QrGetKmlySIGR07y48Zft8WVgPakqd/bk46JrMSw== 213 | dependencies: 214 | "@babel/helper-builder-react-jsx-experimental" "^7.9.0" 215 | "@babel/helper-plugin-utils" "^7.8.3" 216 | "@babel/plugin-syntax-jsx" "^7.8.3" 217 | 218 | "@babel/plugin-transform-react-jsx-self@^7.9.0": 219 | version "7.9.0" 220 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.9.0.tgz#f4f26a325820205239bb915bad8e06fcadabb49b" 221 | integrity sha512-K2ObbWPKT7KUTAoyjCsFilOkEgMvFG+y0FqOl6Lezd0/13kMkkjHskVsZvblRPj1PHA44PrToaZANrryppzTvQ== 222 | dependencies: 223 | "@babel/helper-plugin-utils" "^7.8.3" 224 | "@babel/plugin-syntax-jsx" "^7.8.3" 225 | 226 | "@babel/plugin-transform-react-jsx-source@^7.9.0": 227 | version "7.9.0" 228 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.9.0.tgz#89ef93025240dd5d17d3122294a093e5e0183de0" 229 | integrity sha512-K6m3LlSnTSfRkM6FcRk8saNEeaeyG5k7AVkBU2bZK3+1zdkSED3qNdsWrUgQBeTVD2Tp3VMmerxVO2yM5iITmw== 230 | dependencies: 231 | "@babel/helper-plugin-utils" "^7.8.3" 232 | "@babel/plugin-syntax-jsx" "^7.8.3" 233 | 234 | "@babel/plugin-transform-react-jsx@^7.9.4": 235 | version "7.9.4" 236 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz#86f576c8540bd06d0e95e0b61ea76d55f6cbd03f" 237 | integrity sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw== 238 | dependencies: 239 | "@babel/helper-builder-react-jsx" "^7.9.0" 240 | "@babel/helper-builder-react-jsx-experimental" "^7.9.0" 241 | "@babel/helper-plugin-utils" "^7.8.3" 242 | "@babel/plugin-syntax-jsx" "^7.8.3" 243 | 244 | "@babel/plugin-transform-typescript@^7.9.0": 245 | version "7.9.4" 246 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz#4bb4dde4f10bbf2d787fce9707fb09b483e33359" 247 | integrity sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w== 248 | dependencies: 249 | "@babel/helper-create-class-features-plugin" "^7.8.3" 250 | "@babel/helper-plugin-utils" "^7.8.3" 251 | "@babel/plugin-syntax-typescript" "^7.8.3" 252 | 253 | "@babel/preset-react@^7.9.4": 254 | version "7.9.4" 255 | resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.9.4.tgz#c6c97693ac65b6b9c0b4f25b948a8f665463014d" 256 | integrity sha512-AxylVB3FXeOTQXNXyiuAQJSvss62FEotbX2Pzx3K/7c+MKJMdSg6Ose6QYllkdCFA8EInCJVw7M/o5QbLuA4ZQ== 257 | dependencies: 258 | "@babel/helper-plugin-utils" "^7.8.3" 259 | "@babel/plugin-transform-react-display-name" "^7.8.3" 260 | "@babel/plugin-transform-react-jsx" "^7.9.4" 261 | "@babel/plugin-transform-react-jsx-development" "^7.9.0" 262 | "@babel/plugin-transform-react-jsx-self" "^7.9.0" 263 | "@babel/plugin-transform-react-jsx-source" "^7.9.0" 264 | 265 | "@babel/preset-typescript@^7.9.0": 266 | version "7.9.0" 267 | resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz#87705a72b1f0d59df21c179f7c3d2ef4b16ce192" 268 | integrity sha512-S4cueFnGrIbvYJgwsVFKdvOmpiL0XGw9MFW9D0vgRys5g36PBhZRL8NX8Gr2akz8XRtzq6HuDXPD/1nniagNUg== 269 | dependencies: 270 | "@babel/helper-plugin-utils" "^7.8.3" 271 | "@babel/plugin-transform-typescript" "^7.9.0" 272 | 273 | "@babel/template@^7.8.3", "@babel/template@^7.8.6": 274 | version "7.8.6" 275 | resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" 276 | integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== 277 | dependencies: 278 | "@babel/code-frame" "^7.8.3" 279 | "@babel/parser" "^7.8.6" 280 | "@babel/types" "^7.8.6" 281 | 282 | "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": 283 | version "7.9.0" 284 | resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" 285 | integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== 286 | dependencies: 287 | "@babel/code-frame" "^7.8.3" 288 | "@babel/generator" "^7.9.0" 289 | "@babel/helper-function-name" "^7.8.3" 290 | "@babel/helper-split-export-declaration" "^7.8.3" 291 | "@babel/parser" "^7.9.0" 292 | "@babel/types" "^7.9.0" 293 | debug "^4.1.0" 294 | globals "^11.1.0" 295 | lodash "^4.17.13" 296 | 297 | "@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": 298 | version "7.9.0" 299 | resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" 300 | integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== 301 | dependencies: 302 | "@babel/helper-validator-identifier" "^7.9.0" 303 | lodash "^4.17.13" 304 | to-fast-properties "^2.0.0" 305 | 306 | "@formatjs/intl-displaynames@^1.2.2": 307 | version "1.2.2" 308 | resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-1.2.2.tgz#d0f0edebad96660196d282f609a1169a88a27d4a" 309 | integrity sha512-qwYxEWJEIplshOMWyLGl2g0d9g/25oQm8GWWCRcagHhv4YIfSJM5+GCTYNJiQImm10pKfEhoV5ezDs0Pr/8CRA== 310 | dependencies: 311 | "@formatjs/intl-utils" "^2.2.0" 312 | 313 | "@formatjs/intl-listformat@^1.4.2": 314 | version "1.4.3" 315 | resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-1.4.3.tgz#3cb75b9a9da60ca54c52dd5a239a24cd448f7a60" 316 | integrity sha512-FZcc3FSYYimMEm03+1qJzmsm1Vn5qxxkrFe0kqNKujEq3MAK+uL31jpPBiD1EPl22uTD0MHZMuZF55jqd/7R/w== 317 | dependencies: 318 | "@formatjs/intl-utils" "^2.2.1" 319 | 320 | "@formatjs/intl-relativetimeformat@^4.5.10": 321 | version "4.5.11" 322 | resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.5.11.tgz#8161aba04b3dd488a00e2642e007bf5359f8ad34" 323 | integrity sha512-UdZtBISVHMB1n9dOldnNpEr90/qdHcOXe+EPBAy6pXsqKwL1Nh86PU5/2wJij1wl7lQDrCb2npcYnmScv4uGRg== 324 | dependencies: 325 | "@formatjs/intl-utils" "^2.2.1" 326 | 327 | "@formatjs/intl-unified-numberformat@^3.3.0": 328 | version "3.3.0" 329 | resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.3.0.tgz#0692346a9cd432abb2cd9b6879ddd6592585641a" 330 | integrity sha512-wLT3myYq6fUhJYUh53tt5fMok+sUqO3Jy1XeSqYTphP7MmQl38tHqAIL65Dxh7M6/QlDEQTOkMZNpQcnT0AzaQ== 331 | dependencies: 332 | "@formatjs/intl-utils" "^2.2.0" 333 | 334 | "@formatjs/intl-utils@^2.2.0", "@formatjs/intl-utils@^2.2.1": 335 | version "2.2.1" 336 | resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-2.2.1.tgz#0eeefe92d317acfcd179c14826e719b3b130d82a" 337 | integrity sha512-WF3oU6l2WqJjN4OWvnjF9AHyQjHpjcfpyuckM7euFeX6ZGRPpPj+ZCqzf41g81MSksf9aZI4fFCZXWTBusgcWA== 338 | 339 | "@types/babel__core@^7.1.3": 340 | version "7.1.7" 341 | resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89" 342 | integrity sha512-RL62NqSFPCDK2FM1pSDH0scHpJvsXtZNiYlMB73DgPBaG1E38ZYVL+ei5EkWRbr+KC4YNiAUNBnRj+bgwpgjMw== 343 | dependencies: 344 | "@babel/parser" "^7.1.0" 345 | "@babel/types" "^7.0.0" 346 | "@types/babel__generator" "*" 347 | "@types/babel__template" "*" 348 | "@types/babel__traverse" "*" 349 | 350 | "@types/babel__generator@*": 351 | version "7.6.1" 352 | resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" 353 | integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== 354 | dependencies: 355 | "@babel/types" "^7.0.0" 356 | 357 | "@types/babel__template@*": 358 | version "7.0.2" 359 | resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" 360 | integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== 361 | dependencies: 362 | "@babel/parser" "^7.1.0" 363 | "@babel/types" "^7.0.0" 364 | 365 | "@types/babel__traverse@*": 366 | version "7.0.9" 367 | resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.9.tgz#be82fab304b141c3eee81a4ce3b034d0eba1590a" 368 | integrity sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw== 369 | dependencies: 370 | "@babel/types" "^7.3.0" 371 | 372 | "@types/hoist-non-react-statics@^3.3.1": 373 | version "3.3.1" 374 | resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" 375 | integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== 376 | dependencies: 377 | "@types/react" "*" 378 | hoist-non-react-statics "^3.3.0" 379 | 380 | "@types/invariant@^2.2.31": 381 | version "2.2.31" 382 | resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.31.tgz#4444c03004f215289dbca3856538434317dd28b2" 383 | integrity sha512-jMlgg9pIURvy9jgBHCjQp/CyBjYHUwj91etVcDdXkFl2CwTFiQlB+8tcsMeXpXf2PFE5X2pjk4Gm43hQSMHAdA== 384 | 385 | "@types/minimist@^1.2.0": 386 | version "1.2.0" 387 | resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" 388 | integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= 389 | 390 | "@types/normalize-package-data@^2.4.0": 391 | version "2.4.0" 392 | resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" 393 | integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== 394 | 395 | "@types/prop-types@*": 396 | version "15.7.3" 397 | resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" 398 | integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== 399 | 400 | "@types/react@*": 401 | version "16.9.32" 402 | resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.32.tgz#f6368625b224604148d1ddf5920e4fefbd98d383" 403 | integrity sha512-fmejdp0CTH00mOJmxUPPbWCEBWPvRIL4m8r0qD+BSDUqmutPyGQCHifzMpMzdvZwROdEdL78IuZItntFWgPXHQ== 404 | dependencies: 405 | "@types/prop-types" "*" 406 | csstype "^2.2.0" 407 | 408 | "@types/schema-utils@^1.0.0": 409 | version "1.0.0" 410 | resolved "https://registry.yarnpkg.com/@types/schema-utils/-/schema-utils-1.0.0.tgz#295d36f01e2cb8bc3207ca1d9a68e210db6b40cb" 411 | integrity sha512-YesPanU1+WCigC/Aj1Mga8UCOjHIfMNHZ3zzDsUY7lI8GlKnh/Kv2QwJOQ+jNQ36Ru7IfzSedlG14hppYaN13A== 412 | 413 | ajv-keywords@^3.4.1: 414 | version "3.4.1" 415 | resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" 416 | integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== 417 | 418 | ajv@^6.12.0: 419 | version "6.12.0" 420 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" 421 | integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== 422 | dependencies: 423 | fast-deep-equal "^3.1.1" 424 | fast-json-stable-stringify "^2.0.0" 425 | json-schema-traverse "^0.4.1" 426 | uri-js "^4.2.2" 427 | 428 | ansi-styles@^3.2.1: 429 | version "3.2.1" 430 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 431 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 432 | dependencies: 433 | color-convert "^1.9.0" 434 | 435 | argparse@^1.0.7: 436 | version "1.0.10" 437 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 438 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 439 | dependencies: 440 | sprintf-js "~1.0.2" 441 | 442 | arrify@^1.0.1: 443 | version "1.0.1" 444 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 445 | integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= 446 | 447 | babel-plugin-react-intl@^7.0.0: 448 | version "7.1.0" 449 | resolved "https://registry.yarnpkg.com/babel-plugin-react-intl/-/babel-plugin-react-intl-7.1.0.tgz#a5d51f3402470175c2d0627f6c6e0f55aa881864" 450 | integrity sha512-5y/TOt/c5EU49eIQHbQnlGJHKrt1n116vynhpQ0gbhZPUSEF4nQ7mK02UKI7PbtKCxn1LUcuEW6mcH/0uA/U0A== 451 | dependencies: 452 | "@babel/core" "^7.7.2" 453 | "@babel/helper-plugin-utils" "^7.0.0" 454 | "@types/babel__core" "^7.1.3" 455 | "@types/schema-utils" "^1.0.0" 456 | fs-extra "^8.1.0" 457 | intl-messageformat-parser "^4.1.1" 458 | schema-utils "^2.2.0" 459 | 460 | balanced-match@^1.0.0: 461 | version "1.0.0" 462 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 463 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 464 | 465 | brace-expansion@^1.1.7: 466 | version "1.1.11" 467 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 468 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 469 | dependencies: 470 | balanced-match "^1.0.0" 471 | concat-map "0.0.1" 472 | 473 | camelcase-keys@^6.1.1: 474 | version "6.2.2" 475 | resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" 476 | integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== 477 | dependencies: 478 | camelcase "^5.3.1" 479 | map-obj "^4.0.0" 480 | quick-lru "^4.0.1" 481 | 482 | camelcase@^5.0.0, camelcase@^5.3.1: 483 | version "5.3.1" 484 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" 485 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== 486 | 487 | chalk@^2.0.0: 488 | version "2.4.2" 489 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 490 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 491 | dependencies: 492 | ansi-styles "^3.2.1" 493 | escape-string-regexp "^1.0.5" 494 | supports-color "^5.3.0" 495 | 496 | color-convert@^1.9.0: 497 | version "1.9.3" 498 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 499 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 500 | dependencies: 501 | color-name "1.1.3" 502 | 503 | color-name@1.1.3: 504 | version "1.1.3" 505 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 506 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 507 | 508 | concat-map@0.0.1: 509 | version "0.0.1" 510 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 511 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 512 | 513 | convert-source-map@^1.7.0: 514 | version "1.7.0" 515 | resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" 516 | integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== 517 | dependencies: 518 | safe-buffer "~5.1.1" 519 | 520 | csstype@^2.2.0: 521 | version "2.6.10" 522 | resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" 523 | integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== 524 | 525 | debug@^4.1.0: 526 | version "4.1.1" 527 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" 528 | integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== 529 | dependencies: 530 | ms "^2.1.1" 531 | 532 | decamelize-keys@^1.1.0: 533 | version "1.1.0" 534 | resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" 535 | integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= 536 | dependencies: 537 | decamelize "^1.1.0" 538 | map-obj "^1.0.0" 539 | 540 | decamelize@^1.1.0, decamelize@^1.2.0: 541 | version "1.2.0" 542 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 543 | integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= 544 | 545 | detect-indent@^6.0.0: 546 | version "6.0.0" 547 | resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" 548 | integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== 549 | 550 | error-ex@^1.3.1: 551 | version "1.3.2" 552 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 553 | integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== 554 | dependencies: 555 | is-arrayish "^0.2.1" 556 | 557 | escape-string-regexp@^1.0.5: 558 | version "1.0.5" 559 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 560 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 561 | 562 | esprima@^4.0.0: 563 | version "4.0.1" 564 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 565 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 566 | 567 | extract-react-intl-messages@^4.1.1: 568 | version "4.1.1" 569 | resolved "https://registry.yarnpkg.com/extract-react-intl-messages/-/extract-react-intl-messages-4.1.1.tgz#cd01d99053bb053ecc8410ccdccb9ac56daae91c" 570 | integrity sha512-dPogci5X7HVtV7VbUxajH/1YgfNRaW2VtEiVidZ/31Tq8314uzOtzVMNo0IrAPD2E+H1wHoPiu/j565TZsyIZg== 571 | dependencies: 572 | "@babel/core" "^7.9.0" 573 | babel-plugin-react-intl "^7.0.0" 574 | flat "^5.0.0" 575 | glob "^7.1.6" 576 | js-yaml "^3.13.1" 577 | load-json-file "^6.2.0" 578 | lodash.merge "^4.6.2" 579 | lodash.mergewith "^4.6.2" 580 | lodash.pick "^4.4.0" 581 | meow "^6.1.0" 582 | mkdirp "^1.0.3" 583 | pify "^5.0.0" 584 | read-babelrc-up "^1.1.0" 585 | sort-keys "^4.0.0" 586 | write-json-file "^4.3.0" 587 | 588 | fast-deep-equal@^3.1.1: 589 | version "3.1.1" 590 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" 591 | integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== 592 | 593 | fast-json-stable-stringify@^2.0.0: 594 | version "2.1.0" 595 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" 596 | integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== 597 | 598 | find-up@^4.1.0: 599 | version "4.1.0" 600 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" 601 | integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== 602 | dependencies: 603 | locate-path "^5.0.0" 604 | path-exists "^4.0.0" 605 | 606 | flat@^5.0.0: 607 | version "5.0.0" 608 | resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.0.tgz#dab7d71d60413becb0ac2de9bf4304495e3af6af" 609 | integrity sha512-6KSMM+cHHzXC/hpldXApL2S8Uz+QZv+tq5o/L0KQYleoG+GcwrnIJhTWC7tCOiKQp8D/fIvryINU1OZCCwevjA== 610 | dependencies: 611 | is-buffer "~2.0.4" 612 | 613 | fs-extra@^8.1.0: 614 | version "8.1.0" 615 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" 616 | integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== 617 | dependencies: 618 | graceful-fs "^4.2.0" 619 | jsonfile "^4.0.0" 620 | universalify "^0.1.0" 621 | 622 | fs.realpath@^1.0.0: 623 | version "1.0.0" 624 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 625 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 626 | 627 | gensync@^1.0.0-beta.1: 628 | version "1.0.0-beta.1" 629 | resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" 630 | integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== 631 | 632 | glob@^7.1.6: 633 | version "7.1.6" 634 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" 635 | integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== 636 | dependencies: 637 | fs.realpath "^1.0.0" 638 | inflight "^1.0.4" 639 | inherits "2" 640 | minimatch "^3.0.4" 641 | once "^1.3.0" 642 | path-is-absolute "^1.0.0" 643 | 644 | globals@^11.1.0: 645 | version "11.12.0" 646 | resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" 647 | integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== 648 | 649 | graceful-fs@^4.1.15, graceful-fs@^4.1.6, graceful-fs@^4.2.0: 650 | version "4.2.3" 651 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" 652 | integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== 653 | 654 | hard-rejection@^2.0.0: 655 | version "2.1.0" 656 | resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" 657 | integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== 658 | 659 | has-flag@^3.0.0: 660 | version "3.0.0" 661 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 662 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 663 | 664 | hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: 665 | version "3.3.2" 666 | resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" 667 | integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== 668 | dependencies: 669 | react-is "^16.7.0" 670 | 671 | hosted-git-info@^2.1.4: 672 | version "2.8.8" 673 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" 674 | integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== 675 | 676 | imurmurhash@^0.1.4: 677 | version "0.1.4" 678 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 679 | integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= 680 | 681 | indent-string@^4.0.0: 682 | version "4.0.0" 683 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" 684 | integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== 685 | 686 | inflight@^1.0.4: 687 | version "1.0.6" 688 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 689 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 690 | dependencies: 691 | once "^1.3.0" 692 | wrappy "1" 693 | 694 | inherits@2: 695 | version "2.0.4" 696 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 697 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 698 | 699 | intl-format-cache@^4.2.22: 700 | version "4.2.23" 701 | resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.2.23.tgz#2c508f64b3bb5862abc71392a4b1696e2b8572d2" 702 | integrity sha512-a1chSSjN323lnm3f4VWR/+6uyaXgTLII8PkiDeKkC3A+eauUswf/k09iBwDQGlkLg29mZ+zShWdm+YdH+sLY4w== 703 | 704 | intl-messageformat-parser@^4.1.1: 705 | version "4.1.1" 706 | resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-4.1.1.tgz#33a3ac1854a8b9adc18dfc73db018abf91be4c32" 707 | integrity sha512-RDmhjncV9VOKZ5nkoeeTxVy6G2kV5ZZNtewT89vj7vkr5NAPjw8/q6xYjUxdLnxNbQPcwno6zTD6j9VC0PW+Ag== 708 | dependencies: 709 | "@formatjs/intl-unified-numberformat" "^3.3.0" 710 | 711 | intl-messageformat@^8.3.2: 712 | version "8.3.2" 713 | resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-8.3.2.tgz#ad6b06982d749d39b6610ad26e88637d64688972" 714 | integrity sha512-CMcGPciQjt1nesTME7vekUgx+Igy2sa14g/BZE2ZrYwqkdnVDO5f0bt3X0ZjQJohgZth9RvlIMvVoRUjrDRubA== 715 | dependencies: 716 | intl-format-cache "^4.2.22" 717 | intl-messageformat-parser "^4.1.1" 718 | 719 | is-arrayish@^0.2.1: 720 | version "0.2.1" 721 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 722 | integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= 723 | 724 | is-buffer@~2.0.4: 725 | version "2.0.4" 726 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" 727 | integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== 728 | 729 | is-plain-obj@^1.1.0: 730 | version "1.1.0" 731 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" 732 | integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= 733 | 734 | is-plain-obj@^2.0.0: 735 | version "2.1.0" 736 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" 737 | integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== 738 | 739 | is-typedarray@^1.0.0: 740 | version "1.0.0" 741 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 742 | integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= 743 | 744 | "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: 745 | version "4.0.0" 746 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 747 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== 748 | 749 | js-yaml@^3.13.1: 750 | version "3.13.1" 751 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" 752 | integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== 753 | dependencies: 754 | argparse "^1.0.7" 755 | esprima "^4.0.0" 756 | 757 | jsesc@^2.5.1: 758 | version "2.5.2" 759 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" 760 | integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== 761 | 762 | json-parse-better-errors@^1.0.1: 763 | version "1.0.2" 764 | resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" 765 | integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== 766 | 767 | json-schema-traverse@^0.4.1: 768 | version "0.4.1" 769 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 770 | integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== 771 | 772 | json5@^2.1.2: 773 | version "2.1.3" 774 | resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" 775 | integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== 776 | dependencies: 777 | minimist "^1.2.5" 778 | 779 | jsonfile@^4.0.0: 780 | version "4.0.0" 781 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" 782 | integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= 783 | optionalDependencies: 784 | graceful-fs "^4.1.6" 785 | 786 | lines-and-columns@^1.1.6: 787 | version "1.1.6" 788 | resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" 789 | integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= 790 | 791 | load-json-file@^6.2.0: 792 | version "6.2.0" 793 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" 794 | integrity sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ== 795 | dependencies: 796 | graceful-fs "^4.1.15" 797 | parse-json "^5.0.0" 798 | strip-bom "^4.0.0" 799 | type-fest "^0.6.0" 800 | 801 | locate-path@^5.0.0: 802 | version "5.0.0" 803 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" 804 | integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== 805 | dependencies: 806 | p-locate "^4.1.0" 807 | 808 | lodash.merge@^4.6.2: 809 | version "4.6.2" 810 | resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" 811 | integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== 812 | 813 | lodash.mergewith@^4.6.2: 814 | version "4.6.2" 815 | resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" 816 | integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== 817 | 818 | lodash.pick@^4.4.0: 819 | version "4.4.0" 820 | resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" 821 | integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= 822 | 823 | lodash@^4.17.13: 824 | version "4.17.15" 825 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" 826 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 827 | 828 | loose-envify@^1.1.0, loose-envify@^1.4.0: 829 | version "1.4.0" 830 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" 831 | integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== 832 | dependencies: 833 | js-tokens "^3.0.0 || ^4.0.0" 834 | 835 | make-dir@^3.0.0: 836 | version "3.0.2" 837 | resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" 838 | integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== 839 | dependencies: 840 | semver "^6.0.0" 841 | 842 | map-obj@^1.0.0: 843 | version "1.0.1" 844 | resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" 845 | integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= 846 | 847 | map-obj@^4.0.0: 848 | version "4.1.0" 849 | resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" 850 | integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== 851 | 852 | meow@^6.1.0: 853 | version "6.1.0" 854 | resolved "https://registry.yarnpkg.com/meow/-/meow-6.1.0.tgz#4ff4641818d3502afcddc631f94cb6971a581cb3" 855 | integrity sha512-iIAoeI01v6pmSfObAAWFoITAA4GgiT45m4SmJgoxtZfvI0fyZwhV4d0lTwiUXvAKIPlma05Feb2Xngl52Mj5Cg== 856 | dependencies: 857 | "@types/minimist" "^1.2.0" 858 | camelcase-keys "^6.1.1" 859 | decamelize-keys "^1.1.0" 860 | hard-rejection "^2.0.0" 861 | minimist-options "^4.0.1" 862 | normalize-package-data "^2.5.0" 863 | read-pkg-up "^7.0.0" 864 | redent "^3.0.0" 865 | trim-newlines "^3.0.0" 866 | type-fest "^0.8.1" 867 | yargs-parser "^18.1.1" 868 | 869 | min-indent@^1.0.0: 870 | version "1.0.0" 871 | resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" 872 | integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY= 873 | 874 | minimatch@^3.0.4: 875 | version "3.0.4" 876 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 877 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 878 | dependencies: 879 | brace-expansion "^1.1.7" 880 | 881 | minimist-options@^4.0.1: 882 | version "4.0.2" 883 | resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.0.2.tgz#29c4021373ded40d546186725e57761e4b1984a7" 884 | integrity sha512-seq4hpWkYSUh1y7NXxzucwAN9yVlBc3Upgdjz8vLCP97jG8kaOmzYrVH/m7tQ1NYD1wdtZbSLfdy4zFmRWuc/w== 885 | dependencies: 886 | arrify "^1.0.1" 887 | is-plain-obj "^1.1.0" 888 | 889 | minimist@^1.2.5: 890 | version "1.2.5" 891 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" 892 | integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== 893 | 894 | mkdirp@^1.0.3: 895 | version "1.0.4" 896 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" 897 | integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== 898 | 899 | ms@^2.1.1: 900 | version "2.1.2" 901 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 902 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 903 | 904 | normalize-package-data@^2.5.0: 905 | version "2.5.0" 906 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" 907 | integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== 908 | dependencies: 909 | hosted-git-info "^2.1.4" 910 | resolve "^1.10.0" 911 | semver "2 || 3 || 4 || 5" 912 | validate-npm-package-license "^3.0.1" 913 | 914 | object-assign@^4.1.1: 915 | version "4.1.1" 916 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 917 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 918 | 919 | once@^1.3.0: 920 | version "1.4.0" 921 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 922 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 923 | dependencies: 924 | wrappy "1" 925 | 926 | p-limit@^2.2.0: 927 | version "2.2.2" 928 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" 929 | integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== 930 | dependencies: 931 | p-try "^2.0.0" 932 | 933 | p-locate@^4.1.0: 934 | version "4.1.0" 935 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" 936 | integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== 937 | dependencies: 938 | p-limit "^2.2.0" 939 | 940 | p-try@^2.0.0: 941 | version "2.2.0" 942 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" 943 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== 944 | 945 | parse-json@^5.0.0: 946 | version "5.0.0" 947 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" 948 | integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== 949 | dependencies: 950 | "@babel/code-frame" "^7.0.0" 951 | error-ex "^1.3.1" 952 | json-parse-better-errors "^1.0.1" 953 | lines-and-columns "^1.1.6" 954 | 955 | path-exists@^4.0.0: 956 | version "4.0.0" 957 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" 958 | integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== 959 | 960 | path-is-absolute@^1.0.0: 961 | version "1.0.1" 962 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 963 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 964 | 965 | path-parse@^1.0.6: 966 | version "1.0.6" 967 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 968 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 969 | 970 | pify@^5.0.0: 971 | version "5.0.0" 972 | resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" 973 | integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== 974 | 975 | prop-types@^15.6.2: 976 | version "15.7.2" 977 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" 978 | integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== 979 | dependencies: 980 | loose-envify "^1.4.0" 981 | object-assign "^4.1.1" 982 | react-is "^16.8.1" 983 | 984 | punycode@^2.1.0: 985 | version "2.1.1" 986 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 987 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 988 | 989 | quick-lru@^4.0.1: 990 | version "4.0.1" 991 | resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" 992 | integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== 993 | 994 | react-intl@^4.3.1: 995 | version "4.3.1" 996 | resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-4.3.1.tgz#a56ae90aa76bf8cac992606002dc8cbf1276ed7d" 997 | integrity sha512-WaF6h1H9b4//csBTZ9JGfrKrceOCIKBjJZMBB0P/E+mjjkR1BJjytH2SEBbPV2bnDDnN6vQQaFz5MhgPfUDMYw== 998 | dependencies: 999 | "@formatjs/intl-displaynames" "^1.2.2" 1000 | "@formatjs/intl-listformat" "^1.4.2" 1001 | "@formatjs/intl-relativetimeformat" "^4.5.10" 1002 | "@formatjs/intl-unified-numberformat" "^3.3.0" 1003 | "@formatjs/intl-utils" "^2.2.0" 1004 | "@types/hoist-non-react-statics" "^3.3.1" 1005 | "@types/invariant" "^2.2.31" 1006 | hoist-non-react-statics "^3.3.2" 1007 | intl-format-cache "^4.2.22" 1008 | intl-messageformat "^8.3.2" 1009 | intl-messageformat-parser "^4.1.1" 1010 | shallow-equal "^1.2.1" 1011 | 1012 | react-is@^16.7.0, react-is@^16.8.1: 1013 | version "16.13.1" 1014 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" 1015 | integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== 1016 | 1017 | react@^16.13.1: 1018 | version "16.13.1" 1019 | resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" 1020 | integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== 1021 | dependencies: 1022 | loose-envify "^1.1.0" 1023 | object-assign "^4.1.1" 1024 | prop-types "^15.6.2" 1025 | 1026 | read-babelrc-up@^1.1.0: 1027 | version "1.1.0" 1028 | resolved "https://registry.yarnpkg.com/read-babelrc-up/-/read-babelrc-up-1.1.0.tgz#10fd5baaf6ca03eaba6748fa65ddae25bca61e70" 1029 | integrity sha512-fcl0JeI85Ss3//kfC3z2rsG2VxSiHl1bJgpjQWrne2YuQEewZpAgAjb17A6q/Q3ozWeZsUSroiIBVsnjmOU8vw== 1030 | dependencies: 1031 | find-up "^4.1.0" 1032 | json5 "^2.1.2" 1033 | 1034 | read-pkg-up@^7.0.0: 1035 | version "7.0.1" 1036 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" 1037 | integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== 1038 | dependencies: 1039 | find-up "^4.1.0" 1040 | read-pkg "^5.2.0" 1041 | type-fest "^0.8.1" 1042 | 1043 | read-pkg@^5.2.0: 1044 | version "5.2.0" 1045 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" 1046 | integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== 1047 | dependencies: 1048 | "@types/normalize-package-data" "^2.4.0" 1049 | normalize-package-data "^2.5.0" 1050 | parse-json "^5.0.0" 1051 | type-fest "^0.6.0" 1052 | 1053 | redent@^3.0.0: 1054 | version "3.0.0" 1055 | resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" 1056 | integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== 1057 | dependencies: 1058 | indent-string "^4.0.0" 1059 | strip-indent "^3.0.0" 1060 | 1061 | resolve@^1.10.0, resolve@^1.3.2: 1062 | version "1.15.1" 1063 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" 1064 | integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== 1065 | dependencies: 1066 | path-parse "^1.0.6" 1067 | 1068 | safe-buffer@~5.1.1: 1069 | version "5.1.2" 1070 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 1071 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 1072 | 1073 | schema-utils@^2.2.0: 1074 | version "2.6.5" 1075 | resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" 1076 | integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== 1077 | dependencies: 1078 | ajv "^6.12.0" 1079 | ajv-keywords "^3.4.1" 1080 | 1081 | "semver@2 || 3 || 4 || 5", semver@^5.4.1: 1082 | version "5.7.1" 1083 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" 1084 | integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== 1085 | 1086 | semver@^6.0.0: 1087 | version "6.3.0" 1088 | resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" 1089 | integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== 1090 | 1091 | shallow-equal@^1.2.1: 1092 | version "1.2.1" 1093 | resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da" 1094 | integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA== 1095 | 1096 | signal-exit@^3.0.2: 1097 | version "3.0.3" 1098 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" 1099 | integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== 1100 | 1101 | sort-keys@^4.0.0: 1102 | version "4.0.0" 1103 | resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-4.0.0.tgz#56dc5e256637bfe3fec8db0dc57c08b1a2be22d6" 1104 | integrity sha512-hlJLzrn/VN49uyNkZ8+9b+0q9DjmmYcYOnbMQtpkLrYpPwRApDPZfmqbUfJnAA3sb/nRib+nDot7Zi/1ER1fuA== 1105 | dependencies: 1106 | is-plain-obj "^2.0.0" 1107 | 1108 | source-map@^0.5.0: 1109 | version "0.5.7" 1110 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" 1111 | integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= 1112 | 1113 | spdx-correct@^3.0.0: 1114 | version "3.1.0" 1115 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" 1116 | integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== 1117 | dependencies: 1118 | spdx-expression-parse "^3.0.0" 1119 | spdx-license-ids "^3.0.0" 1120 | 1121 | spdx-exceptions@^2.1.0: 1122 | version "2.2.0" 1123 | resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 1124 | integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== 1125 | 1126 | spdx-expression-parse@^3.0.0: 1127 | version "3.0.0" 1128 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 1129 | integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== 1130 | dependencies: 1131 | spdx-exceptions "^2.1.0" 1132 | spdx-license-ids "^3.0.0" 1133 | 1134 | spdx-license-ids@^3.0.0: 1135 | version "3.0.5" 1136 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" 1137 | integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== 1138 | 1139 | sprintf-js@~1.0.2: 1140 | version "1.0.3" 1141 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1142 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 1143 | 1144 | strip-bom@^4.0.0: 1145 | version "4.0.0" 1146 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" 1147 | integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== 1148 | 1149 | strip-indent@^3.0.0: 1150 | version "3.0.0" 1151 | resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" 1152 | integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== 1153 | dependencies: 1154 | min-indent "^1.0.0" 1155 | 1156 | supports-color@^5.3.0: 1157 | version "5.5.0" 1158 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 1159 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 1160 | dependencies: 1161 | has-flag "^3.0.0" 1162 | 1163 | to-fast-properties@^2.0.0: 1164 | version "2.0.0" 1165 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" 1166 | integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= 1167 | 1168 | trim-newlines@^3.0.0: 1169 | version "3.0.0" 1170 | resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" 1171 | integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA== 1172 | 1173 | type-fest@^0.6.0: 1174 | version "0.6.0" 1175 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" 1176 | integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== 1177 | 1178 | type-fest@^0.8.1: 1179 | version "0.8.1" 1180 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" 1181 | integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== 1182 | 1183 | typedarray-to-buffer@^3.1.5: 1184 | version "3.1.5" 1185 | resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" 1186 | integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== 1187 | dependencies: 1188 | is-typedarray "^1.0.0" 1189 | 1190 | typescript@^3.8.3: 1191 | version "3.8.3" 1192 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" 1193 | integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== 1194 | 1195 | universalify@^0.1.0: 1196 | version "0.1.2" 1197 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" 1198 | integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== 1199 | 1200 | uri-js@^4.2.2: 1201 | version "4.2.2" 1202 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" 1203 | integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== 1204 | dependencies: 1205 | punycode "^2.1.0" 1206 | 1207 | validate-npm-package-license@^3.0.1: 1208 | version "3.0.4" 1209 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 1210 | integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== 1211 | dependencies: 1212 | spdx-correct "^3.0.0" 1213 | spdx-expression-parse "^3.0.0" 1214 | 1215 | wrappy@1: 1216 | version "1.0.2" 1217 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1218 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 1219 | 1220 | write-file-atomic@^3.0.0: 1221 | version "3.0.3" 1222 | resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" 1223 | integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== 1224 | dependencies: 1225 | imurmurhash "^0.1.4" 1226 | is-typedarray "^1.0.0" 1227 | signal-exit "^3.0.2" 1228 | typedarray-to-buffer "^3.1.5" 1229 | 1230 | write-json-file@^4.3.0: 1231 | version "4.3.0" 1232 | resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-4.3.0.tgz#908493d6fd23225344af324016e4ca8f702dd12d" 1233 | integrity sha512-PxiShnxf0IlnQuMYOPPhPkhExoCQuTUNPOa/2JWCYTmBquU9njyyDuwRKN26IZBlp4yn1nt+Agh2HOOBl+55HQ== 1234 | dependencies: 1235 | detect-indent "^6.0.0" 1236 | graceful-fs "^4.1.15" 1237 | is-plain-obj "^2.0.0" 1238 | make-dir "^3.0.0" 1239 | sort-keys "^4.0.0" 1240 | write-file-atomic "^3.0.0" 1241 | 1242 | yargs-parser@^18.1.1: 1243 | version "18.1.2" 1244 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.2.tgz#2f482bea2136dbde0861683abea7756d30b504f1" 1245 | integrity sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ== 1246 | dependencies: 1247 | camelcase "^5.0.0" 1248 | decamelize "^1.2.0" 1249 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testPathIgnorePatterns: [ 3 | '[/\\\\](dist|compiled|node_modules)[/\\\\]' 4 | ], 5 | testEnvironment: 'node', 6 | preset: 'ts-jest', 7 | globals: { 8 | 'ts-jest': { 9 | // diagnostics: false 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) akameco (akameco.github.io) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extract-react-intl-messages", 3 | "version": "4.1.1", 4 | "description": "Extract react-intl messages", 5 | "license": "MIT", 6 | "repository": "akameco/extract-react-intl-messages", 7 | "author": { 8 | "name": "akameco", 9 | "email": "akameco.t@gmail.com", 10 | "url": "https://akameco.github.io" 11 | }, 12 | "engines": { 13 | "node": ">=10" 14 | }, 15 | "main": "dist/index.js", 16 | "scripts": { 17 | "fmt": "prettier --write .", 18 | "example": "./cli.js -l=en,ja -o example/i18n -d en 'example/**/*.{js,tsx}'", 19 | "example:yaml": "./cli.js -l=en,ja -f=yaml -o example/i18n -d en 'example/**/*.{js,tsx}'", 20 | "prepublish": "npm run build", 21 | "build": "tsc", 22 | "lint": "eslint src/**/*.ts --fix --cache", 23 | "test": "jest" 24 | }, 25 | "bin": { 26 | "extract-react-intl-messages": "dist/cli.js", 27 | "extract-messages": "dist/cli.js" 28 | }, 29 | "files": [ 30 | "dist" 31 | ], 32 | "keywords": [ 33 | "react", 34 | "i18n", 35 | "intl", 36 | "react-intl", 37 | "extract", 38 | "json", 39 | "messages" 40 | ], 41 | "dependencies": { 42 | "@babel/core": "^7.9.0", 43 | "babel-plugin-react-intl": "^7.0.0", 44 | "flat": "^5.0.0", 45 | "glob": "^7.1.6", 46 | "js-yaml": "^3.13.1", 47 | "load-json-file": "^6.2.0", 48 | "lodash.merge": "^4.6.2", 49 | "lodash.mergewith": "^4.6.2", 50 | "lodash.pick": "^4.4.0", 51 | "meow": "^6.1.0", 52 | "mkdirp": "^1.0.3", 53 | "pify": "^5.0.0", 54 | "read-babelrc-up": "^1.1.0", 55 | "sort-keys": "^4.0.0", 56 | "write-json-file": "^4.3.0" 57 | }, 58 | "devDependencies": { 59 | "@akameco/tsconfig": "^0.4.0", 60 | "@babel/plugin-proposal-class-properties": "^7.8.3", 61 | "@babel/preset-env": "^7.9.0", 62 | "@babel/preset-flow": "^7.9.0", 63 | "@babel/preset-react": "^7.9.1", 64 | "@types/flat": "^5.0.0", 65 | "@types/glob": "^7.1.1", 66 | "@types/jest": "^25.1.4", 67 | "@types/js-yaml": "^3.12.2", 68 | "@types/lodash.merge": "^4.6.6", 69 | "@types/lodash.mergewith": "^4.6.6", 70 | "@types/lodash.pick": "^4.4.6", 71 | "@types/mkdirp": "^1.0.0", 72 | "@types/pify": "^3.0.2", 73 | "@types/temp-write": "^4.0.0", 74 | "babel-core": "7.0.0-bridge.0", 75 | "babel-plugin-react-intl-auto": "^3.2.0", 76 | "eslint": "^6.8.0", 77 | "eslint-config-precure": "^5.3.1", 78 | "husky": "^4.2.3", 79 | "jest": "^25.1.0", 80 | "lint-staged": "^10.0.9", 81 | "prettier": "^2.0.2", 82 | "react": "^16.13.1", 83 | "react-intl": "^4.2.2", 84 | "temp-write": "^4.0.0", 85 | "tempy": "^0.5.0", 86 | "ts-jest": "^25.2.1", 87 | "typescript": "^3.8.3" 88 | }, 89 | "lint-staged": { 90 | "*.{ts}": [ 91 | "prettier --write", 92 | "eslint --fix" 93 | ], 94 | "*.{js,json,md}": [ 95 | "prettier --write" 96 | ] 97 | }, 98 | "husky": { 99 | "hooks": { 100 | "pre-commit": "lint-staged" 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # extract-react-intl-messages 2 | 3 | [![test](https://github.com/akameco/extract-react-intl-messages/workflows/test/badge.svg)](https://github.com/akameco/extract-react-intl-messages/actions?query=workflow%3Atest) 4 | [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) 5 | [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) 6 | [![MIT License](https://img.shields.io/npm/l/nps.svg?style=flat-square)](./license) 7 | [![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors-) 8 | 9 | This package will generate json or yaml files from a glob. It will generate one file per locale, with the ids of each message defined by the [`defineMessages`](https://github.com/yahoo/react-intl/wiki/API#definemessages) function of [react-intl](https://github.com/yahoo/react-intl). The value of each of these keys will be an empty string, except for your `defaultLocale` which will be populated with the [`defaultMessage`](https://github.com/yahoo/react-intl/wiki/API#message-descriptor). 10 | 11 | ## Dependencies 12 | 13 | ### Babel 14 | 15 | - 0.x works with Babel 6 16 | 17 | ## Install 18 | 19 | ``` 20 | $ npm install --save-dev extract-react-intl-messages 21 | ``` 22 | 23 | ## Usage 24 | 25 | app/components/App/messages.js 26 | 27 | ```js 28 | import { defineMessages, useIntl } from 'react-intl' 29 | 30 | export default defineMessages({ 31 | hello: { 32 | id: 'a.hello', 33 | defaultMessage: 'hello' 34 | }, 35 | world: { 36 | id: 'a.world', 37 | defaultMessage: 'world' 38 | } 39 | }) 40 | 41 | export const SubmitButton = () => { 42 | const intl = useIntl() 43 | const label = intl.formatMessage({ 44 | id: 'a.submit', 45 | defaultMessage: 'Submit Button' 46 | }) 47 | return 48 | } 49 | ``` 50 | 51 | ### Run Script 52 | 53 | ``` 54 | $ extract-messages -l=en,ja -o app/translations -d en --flat false './app/**/!(*.test).js' 55 | ``` 56 | 57 | ### Output 58 | 59 | app/translations/en.json 60 | 61 | ```json 62 | { 63 | "a": { 64 | "hello": "hello", 65 | "world": "world", 66 | "submit": "Submit Button" 67 | } 68 | } 69 | ``` 70 | 71 | app/translations/ja.json 72 | 73 | ```json 74 | { 75 | "a": { 76 | "hello": "", 77 | "world": "", 78 | "submit": "" 79 | } 80 | } 81 | ``` 82 | 83 | ## Recommend 84 | 85 | Use with [babel-plugin-react-intl-auto: i18n for the component age. Auto management react-intl ID.](https://github.com/akameco/babel-plugin-react-intl-auto) 86 | 87 | ## CLI 88 | 89 | ```console 90 | $ extract-messages --help 91 | 92 | Extract react-intl messages 93 | 94 | Usage 95 | $ extract-react-intl-messages 96 | $ extract-messages 97 | 98 | Options 99 | -o, --output Output directory [require: true] 100 | -l, --locales locales [require: true] 101 | -f, --format json | yaml [default: json] 102 | -d, --defaultLocale default locale 103 | --overwriteDefault default: false 104 | --flat json [default: true] | yaml [default: false] 105 | 106 | Example 107 | $ extract-messages --locales=ja,en --output app/translations 'app/**/*.js' 108 | $ extract-messages -l=ja,en -o i18n 'src/**/*.js' 109 | $ extract-messages -l=ja,en -o app/translations -f yaml 'app/**/messages.js' 110 | ``` 111 | 112 | ### create-react-app user 113 | 114 | create `.babelrc` like this. 115 | 116 | ```json 117 | { 118 | "presets": ["react-app"] 119 | } 120 | ``` 121 | 122 | Run with `NODE_ENV=development`. 123 | 124 | ``` 125 | $ NODE_ENV=development extract-messages ... 126 | ``` 127 | 128 | ### TypeScript 129 | 130 | babel required. 131 | 132 | See [example/with-typescript](example/with-typescript) 133 | 134 | ``` 135 | npm install --save-dev @babel/core @babel/preset-typescript @babel/preset-react 136 | ``` 137 | 138 | `babel.config.js` 139 | 140 | ```js 141 | module.exports = function (api) { 142 | api.cache(true) 143 | 144 | return { 145 | presets: ['@babel/preset-react', '@babel/preset-typescript'] 146 | } 147 | } 148 | ``` 149 | 150 | ## API 151 | 152 | ### extractReactIntlMessages(locales, input, buildDir, [options]) 153 | 154 | #### locales 155 | 156 | Type: `Array` 157 | 158 | Example: `['en', 'ja']` 159 | 160 | #### input 161 | 162 | Type: `Array` 163 | 164 | Target files. 165 | glob. 166 | 167 | #### buildDir 168 | 169 | Type: `string` 170 | 171 | Export directory. 172 | 173 | #### options 174 | 175 | ##### defaultLocale 176 | 177 | Type: `string`
178 | Default: `en` 179 | 180 | ##### format 181 | 182 | Type: `json` | `yaml`
183 | Default: `json` 184 | 185 | Set extension to output. 186 | 187 | ##### overwriteDefault 188 | 189 | Type: `boolean`
190 | Default: true 191 | 192 | If overwriteDefault is `false`, it will not overwrite messages in the default locale. 193 | 194 | ##### flat 195 | 196 | Type: `boolean`
197 | Default: `true` 198 | 199 | If format is `yaml`, set to `false`. 200 | 201 | Be careful if `false`. 202 | See [this issue](https://github.com/akameco/extract-react-intl-messages/issues/3). 203 | 204 | ##### babel-plugin-react-intl's Options 205 | 206 | See https://github.com/formatjs/formatjs/tree/master/packages/babel-plugin-react-intl#options 207 | 208 | ## Contributors 209 | 210 | Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 |

akameco

💻 ⚠️ 📖 🚇

Hoan Tran

💻 ⚠️

giantpinkwalrus

💻

enrique-ramirez

📖

Stefan Gojan

🐛 💻 ⚠️

Solomon English

💻

Filip "Filson" Pasternak

💻

nodaguti

💻 ⚠️

fix-fix

💻

bradbarrow

🐛 💻 ⚠️

Gregor MacLennan

💻

Dmitry Zarva

💻

Michael Pan

💡

Tom Erik Støwer

💻

Bart Lens

💻

Truong Hoang Dung

💡
239 | 240 | 241 | 242 | 243 | 244 | This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! 245 | 246 | ## License 247 | 248 | MIT © [akameco](http://akameco.github.io) 249 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@akameco"] 3 | } 4 | -------------------------------------------------------------------------------- /src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import meow from 'meow' 3 | import extractMessage from '.' 4 | 5 | const cli = meow( 6 | ` 7 | Usage 8 | $ extract-react-intl-messages 9 | $ extract-messages 10 | 11 | Options 12 | -o, --output Output directory [require: true] 13 | -l, --locales locales [require: true] 14 | -f, --format json | yaml [default: json] 15 | -d, --default-locale default locale 16 | --overwriteDefault [default: true] 17 | --flat json [default: true] | yaml [default: false] 18 | 19 | Example 20 | $ extract-messages --locales=ja,en --output app/translations 'app/**/*.js' 21 | $ extract-messages -l=ja,en -o app/translations -f yaml 'app/**/messages.js' 22 | `, 23 | { 24 | flags: { 25 | flat: { 26 | type: 'boolean' 27 | }, 28 | output: { 29 | type: 'string', 30 | alias: 'o' 31 | }, 32 | locales: { 33 | type: 'string', 34 | alias: 'l' 35 | }, 36 | format: { 37 | type: 'string', 38 | alias: 'f', 39 | default: 'json' 40 | }, 41 | defaultLocale: { 42 | type: 'string', 43 | alias: 'd' 44 | }, 45 | overwriteDefault: { 46 | type: 'boolean', 47 | default: true 48 | }, 49 | withDescriptions: { 50 | type: 'boolean', 51 | default: false 52 | }, 53 | // babel-plugin-react-intl boolean options 54 | extractSourceLocation: { 55 | type: 'boolean', 56 | default: false 57 | }, 58 | removeDefaultMessage: { 59 | type: 'boolean' 60 | }, 61 | extractFromFormatMessageCall: { 62 | type: 'boolean', 63 | default: true 64 | } 65 | } 66 | } 67 | ) 68 | 69 | const { output, locales } = cli.flags 70 | 71 | if (!output) { 72 | console.log('ERROR: required output') 73 | process.exit(1) 74 | } 75 | 76 | if (!locales || typeof locales !== 'string') { 77 | console.log('ERROR: required locales') 78 | process.exit(1) 79 | } 80 | 81 | const localesMap = locales.split(',') 82 | 83 | extractMessage(localesMap, cli.input[0], output, cli.flags) 84 | -------------------------------------------------------------------------------- /src/extract-react-intl/index.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import glob from 'glob' 3 | import pify from 'pify' 4 | import merge from 'lodash.merge' 5 | import mergeWith from 'lodash.mergewith' 6 | import { 7 | resolvePlugin, 8 | resolvePreset, 9 | transformFile, 10 | PluginItem 11 | } from '@babel/core' 12 | import readBabelrcUp from 'read-babelrc-up' 13 | import babelPluginReactIntl from 'babel-plugin-react-intl' 14 | 15 | type LocaleMap = Record> 16 | 17 | const localeMap = (arr: string[]): LocaleMap => 18 | arr.reduce((obj: Record, x: string) => { 19 | obj[x] = {} 20 | return obj 21 | }, {}) 22 | 23 | const concatArray = (obj: string[], src: string) => { 24 | if (Array.isArray(obj)) { 25 | return obj.concat(src) 26 | } 27 | return undefined 28 | } 29 | 30 | const createResolveList = ( 31 | fn: (name: string, dirname: string) => string | null 32 | ) => (list: PluginItem[], cwd: string) => 33 | list.map((x) => (typeof x === 'string' ? fn(x, cwd) : x)) 34 | 35 | const resolvePresets = createResolveList(resolvePreset) 36 | const resolvePlugins = createResolveList(resolvePlugin) 37 | 38 | const getBabelrc = (cwd: string) => { 39 | try { 40 | const babelrc = readBabelrcUp.sync({ cwd }).babel 41 | if (!babelrc.env) { 42 | return babelrc 43 | } 44 | 45 | const env = process.env.BABEL_ENV || process.env.NODE_ENV || 'development' 46 | 47 | return mergeWith(babelrc, babelrc.env[env], concatArray) 48 | } catch (error) { 49 | return { presets: [], plugins: [] } 50 | } 51 | } 52 | 53 | const getBabelrcDir = (cwd: string) => 54 | path.dirname(readBabelrcUp.sync({ cwd }).path) 55 | 56 | const babelPluginReactIntlOptions = [ 57 | 'moduleSourceName', 58 | 'extractSourceLocation', 59 | 'messagesDir', 60 | 'overrideIdFn', 61 | 'removeDefaultMessage', 62 | 'extractFromFormatMessageCall', 63 | 'additionalComponentNames' 64 | ] 65 | 66 | type Options = { 67 | [key: string]: unknown 68 | defaultLocale?: string 69 | cwd?: string 70 | withDescriptions?: boolean 71 | } 72 | 73 | type Message = { 74 | id: string 75 | defaultMessage: string 76 | description: string 77 | } 78 | 79 | // eslint-disable-next-line max-lines-per-function 80 | export default async ( 81 | locales: string[], 82 | pattern: string, 83 | { 84 | defaultLocale = 'en', 85 | withDescriptions = false, 86 | cwd = process.cwd(), 87 | ...pluginOptions 88 | }: Options = {} 89 | ) => { 90 | if (!Array.isArray(locales)) { 91 | throw new TypeError(`Expected a Array, got ${typeof locales}`) 92 | } 93 | 94 | if (typeof pattern !== 'string') { 95 | throw new TypeError(`Expected a string, got ${typeof pattern}`) 96 | } 97 | 98 | const babelrc = getBabelrc(cwd) || {} 99 | const babelrcDir = getBabelrcDir(cwd) 100 | 101 | const presets = babelrc.presets || [] 102 | const plugins = babelrc.plugins || [] 103 | 104 | if ( 105 | !plugins.find( 106 | (plugin) => (Array.isArray(plugin) ? plugin[0] : plugin) === 'react-intl' 107 | ) 108 | ) { 109 | // Append a the `react-intl` babel plugin only when it isn’t already included in the babel config 110 | presets.unshift({ 111 | plugins: [ 112 | [ 113 | babelPluginReactIntl, 114 | Object.entries(pluginOptions).reduce((acc, [key, value]) => { 115 | if (babelPluginReactIntlOptions.includes(key)) { 116 | return { ...acc, [key]: value } 117 | } 118 | return acc 119 | }, {}) 120 | ] 121 | ] 122 | }) 123 | } 124 | 125 | const extractFromFile = async (file: string) => { 126 | const babelOpts = { 127 | presets: resolvePresets(presets, babelrcDir), 128 | plugins: resolvePlugins(plugins, babelrcDir) 129 | } 130 | const { metadata } = await pify(transformFile)(file, babelOpts) 131 | const localeObj = localeMap(locales) 132 | const result = metadata['react-intl'].messages as Message[] 133 | for (const { id, defaultMessage, description } of result) { 134 | // eslint-disable-next-line no-unused-vars 135 | for (const locale of locales) { 136 | const message = defaultLocale === locale ? defaultMessage : '' 137 | localeObj[locale][id] = withDescriptions 138 | ? { message, description } 139 | : message 140 | } 141 | } 142 | return localeObj 143 | } 144 | 145 | const files: string[] = await pify(glob)(pattern) 146 | if (files.length === 0) { 147 | throw new Error(`File not found (${pattern})`) 148 | } 149 | const arr = await Promise.all(files.map(extractFromFile)) 150 | return arr.reduce((h, obj) => merge(h, obj), localeMap(locales)) 151 | } 152 | -------------------------------------------------------------------------------- /src/extract-react-intl/readme.md: -------------------------------------------------------------------------------- 1 | # extract-react-intl 2 | 3 | ## API 4 | 5 | ### extractReactIntl(locales, pattern, [options]) 6 | 7 | Return a `Promise` wrapped extracted messages. 8 | 9 | #### locales 10 | 11 | Type: `Array` 12 | 13 | Example: `['en', 'ja']` 14 | 15 | #### pattern 16 | 17 | Type: `string` 18 | 19 | File path with glob. 20 | 21 | #### options 22 | 23 | Additional options. 24 | 25 | #### defaultLocale 26 | 27 | Type: `string`
Default: `en` 28 | 29 | Set default locale for your app. 30 | 31 | ##### cwd 32 | 33 | Type: `string`
Default: `.` 34 | 35 | **You most likely don't need this.** 36 | 37 | Change run path. 38 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/__snapshots__/test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`babel plugin execution order 1`] = ` 4 | Object { 5 | "en": Object { 6 | "src.extract-react-intl.test.pluginOrdering.test": "auto", 7 | }, 8 | } 9 | `; 10 | 11 | exports[`extract from file 1`] = ` 12 | Object { 13 | "en": Object { 14 | "components.App.1248161314": "Submit button", 15 | "components.App.hello": "hello", 16 | "components.App.world": "world", 17 | "components/Greeting/welcome": " 18 | Welcome {name}, you have received {unreadCount, plural, 19 | =0 {no new messages} 20 | one {{formattedUnreadCount} new message} 21 | other {{formattedUnreadCount} new messages} 22 | } since {formattedLastLoginTime}. 23 | ", 24 | }, 25 | "ja": Object { 26 | "components.App.1248161314": "", 27 | "components.App.hello": "", 28 | "components.App.world": "", 29 | "components/Greeting/welcome": "", 30 | }, 31 | } 32 | `; 33 | 34 | exports[`extract from file with descriptions 1`] = ` 35 | Object { 36 | "en": Object { 37 | "components.App.hello": Object { 38 | "description": "hello message description", 39 | "message": "hello", 40 | }, 41 | "components.App.world": Object { 42 | "description": "world message description", 43 | "message": "world", 44 | }, 45 | "components/Greeting/welcome": Object { 46 | "description": "Welcome message description", 47 | "message": " 48 | Welcome {name}, you have received {unreadCount, plural, 49 | =0 {no new messages} 50 | one {{formattedUnreadCount} new message} 51 | other {{formattedUnreadCount} new messages} 52 | } since {formattedLastLoginTime}. 53 | ", 54 | }, 55 | }, 56 | "ja": Object { 57 | "components.App.hello": Object { 58 | "description": "hello message description", 59 | "message": "", 60 | }, 61 | "components.App.world": Object { 62 | "description": "world message description", 63 | "message": "", 64 | }, 65 | "components/Greeting/welcome": Object { 66 | "description": "Welcome message description", 67 | "message": "", 68 | }, 69 | }, 70 | } 71 | `; 72 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "browsers": [ 8 | "last 2 versions", 9 | "safari >= 7" 10 | ] 11 | } 12 | } 13 | ], 14 | "@babel/preset-react", 15 | "@babel/preset-flow" 16 | ], 17 | "plugins": [ 18 | "@babel/plugin-proposal-class-properties" 19 | ], 20 | "env": { 21 | "react-intl": { 22 | "plugins": [ 23 | [ 24 | "react-intl-auto", 25 | { 26 | "removePrefix": "src.extract-react-intl.test.fixtures" 27 | } 28 | ] 29 | ] 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/components/App/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react' 3 | import { FormattedMessage, injectIntl } from 'react-intl' 4 | import Greeting from '../Greeting' 5 | import messages from './messages' 6 | 7 | injectIntl(({ intl }) => { 8 | const label = intl.formatMessage({ defaultMessage: "Submit button" }) 9 | 10 | return 11 | }); 12 | 13 | 14 | export default class App extends Component { 15 | render() { 16 | const user = { 17 | name: 'Eric', 18 | unreadCount: 4, 19 | lastLoginTime: Date.now() - 1000 * 60 * 60 * 24 20 | } 21 | 22 | return ( 23 |
24 | 25 | 26 |
27 | ) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/components/App/messages.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { defineMessages } from 'react-intl' 3 | 4 | export default defineMessages({ 5 | // hello message description 6 | hello: 'hello', 7 | // world message description 8 | world: 'world' 9 | }) 10 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/components/Greeting/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react' 3 | import { 4 | FormattedMessage, 5 | FormattedNumber, 6 | FormattedRelative 7 | } from 'react-intl' 8 | import messages from './messages' 9 | 10 | type Props = { 11 | user: { 12 | name: string, 13 | unreadCount: number, 14 | lastLoginTime: number 15 | } 16 | } 17 | 18 | export default class Greeting extends Component { 19 | props: Props 20 | 21 | render() { 22 | const { user } = this.props 23 | 24 | return ( 25 |

26 | {user.name}, 30 | unreadCount: user.unreadCount, 31 | formattedUnreadCount: ( 32 | 33 | 34 | 35 | ), 36 | formattedLastLoginTime: ( 37 | 38 | ) 39 | }} 40 | /> 41 |

42 | ) 43 | } 44 | } 45 | 46 | function defaultMessage() { 47 | return 'hello' 48 | } 49 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/components/Greeting/messages.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { defineMessages } from 'react-intl' 3 | 4 | export default defineMessages({ 5 | // Welcome message description 6 | welcome: { 7 | id: 'components/Greeting/welcome', 8 | defaultMessage: ` 9 | Welcome {name}, you have received {unreadCount, plural, 10 | =0 {no new messages} 11 | one {{formattedUnreadCount} new message} 12 | other {{formattedUnreadCount} new messages} 13 | } since {formattedLastLoginTime}. 14 | ` 15 | } 16 | }) 17 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/components/LanguageProvider/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react' 3 | import { addLocaleData, IntlProvider } from 'react-intl' 4 | import enLocaleData from 'react-intl/locale-data/en' 5 | import jaLocaleData from 'react-intl/locale-data/ja' 6 | 7 | import enMessages from '../../translations/en.json' 8 | import jaMessages from '../../translations/ja.json' 9 | 10 | addLocaleData(enLocaleData) 11 | addLocaleData(jaLocaleData) 12 | 13 | const messages = { 14 | en: enMessages, 15 | ja: jaMessages 16 | } 17 | 18 | export default class LanguageProvider extends Component { 19 | props: { children?: React$Element<*> } 20 | state: { locale: string } = { locale: 'en' } 21 | 22 | render() { 23 | const { locale } = this.state 24 | return ( 25 |
26 | 27 | {this.props.children} 28 | 29 | this.setState({ locale: 'en' })}>English 30 | / 31 | this.setState({ locale: 'ja' })}>日本語 32 |
33 | ) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/fixtures/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import ReactDOM from 'react-dom' 4 | import App from './components/App' 5 | import LanguageProvider from './components/LanguageProvider' 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ) 13 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/pluginOrdering/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-flow"], 3 | "plugins": ["react-intl-auto"] 4 | } 5 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/pluginOrdering/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | test: 'auto' 5 | }) 6 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/resolution/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-flow"], 3 | "plugins": ["react-intl"] 4 | } 5 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/resolution/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | test: { 5 | id: 'test', 6 | defaultMessage: 'test' 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/extract-react-intl/test/test.ts: -------------------------------------------------------------------------------- 1 | import m from '..' 2 | 3 | const pattern = 'src/extract-react-intl/test/fixtures/**/*.js' 4 | const locales = ['en', 'ja'] 5 | 6 | test('extract from file', async () => { 7 | process.env.BABEL_ENV = 'react-intl' 8 | const x = await m(locales, pattern, { 9 | defaultLocale: 'en', 10 | cwd: `${__dirname}/fixtures`, 11 | extractFromFormatMessageCall: true 12 | }) 13 | expect(x).toMatchSnapshot() 14 | }) 15 | 16 | // TODO: fix 17 | test.skip('babelrc path resolution', async () => { 18 | const x = await m(['en'], './extract-react-intl/test/resolution/**/*.js', { 19 | defaultLocale: 'en', 20 | cwd: `${__dirname}/resolution` 21 | }) 22 | expect(x).toMatchSnapshot() 23 | }) 24 | 25 | test('babel plugin execution order', async () => { 26 | const x = await m( 27 | ['en'], 28 | 'src/extract-react-intl/test/pluginOrdering/**/*.js', 29 | { defaultLocale: 'en', cwd: `${__dirname}/pluginOrdering` } 30 | ) 31 | expect(x).toMatchSnapshot() 32 | }) 33 | 34 | test('error', async () => { 35 | expect.assertions(1) 36 | await m(locales, 'notfound', { 37 | defaultLocale: 'en', 38 | cwd: `${__dirname}/fixtures` 39 | }).catch((error) => { 40 | expect(error.message).toMatch('File not found') 41 | }) 42 | }) 43 | 44 | test('extract from file with descriptions', async () => { 45 | process.env.BABEL_ENV = 'react-intl' 46 | const x = await m(locales, pattern, { 47 | defaultLocale: 'en', 48 | cwd: './test/fixtures', 49 | withDescriptions: true 50 | }) 51 | expect(x).toMatchSnapshot() 52 | }) 53 | -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'read-babelrc-up' { 2 | function sync(opts: { 3 | cwd: string 4 | }): { path: string; babel: import('@babel/core').TransformOptions } 5 | } 6 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import fs from 'fs' 3 | import mkdirp from 'mkdirp' 4 | import pick from 'lodash.pick' 5 | import yaml from 'js-yaml' 6 | import pify from 'pify' 7 | import { flatten, unflatten } from 'flat' 8 | import loadJsonFile from 'load-json-file' 9 | import writeJsonFile from 'write-json-file' 10 | import sortKeys from 'sort-keys' 11 | import _extractReactIntl from './extract-react-intl' 12 | 13 | const writeJson = (outputPath: string, obj: object) => { 14 | return writeJsonFile(`${outputPath}.json`, obj, { indent: 2 }) 15 | } 16 | 17 | const writeYaml = (outputPath: string, obj: object) => { 18 | return pify(fs.writeFile)(`${outputPath}.yml`, yaml.safeDump(obj), 'utf8') 19 | } 20 | 21 | const isJson = (ext: string) => ext === 'json' 22 | 23 | function loadLocaleFiles(locales: string[], buildDir: string, ext: string) { 24 | const oldLocaleMaps: Record> = {} 25 | 26 | try { 27 | mkdirp.sync(buildDir) 28 | } catch (error) {} 29 | 30 | for (const locale of locales) { 31 | const file = path.resolve(buildDir, `${locale}.${ext}`) 32 | // Initialize json file 33 | try { 34 | const output = isJson(ext) ? JSON.stringify({}) : yaml.safeDump({}) 35 | fs.writeFileSync(file, output, { flag: 'wx' }) 36 | } catch (error) { 37 | if (error.code !== 'EEXIST') { 38 | throw error 39 | } 40 | } 41 | 42 | let messages = isJson(ext) 43 | ? loadJsonFile.sync(file) 44 | : yaml.safeLoad(fs.readFileSync(file, 'utf8'), { json: true }) 45 | 46 | messages = flatten(messages) 47 | 48 | oldLocaleMaps[locale] = {} 49 | for (const messageKey of Object.keys(messages)) { 50 | const message = messages[messageKey] 51 | if (message && typeof message === 'string' && message !== '') { 52 | oldLocaleMaps[locale][messageKey] = messages[messageKey] 53 | } 54 | } 55 | } 56 | 57 | return oldLocaleMaps 58 | } 59 | 60 | type Opts = { 61 | [key: string]: unknown 62 | defaultLocale: string 63 | format?: string 64 | flat?: boolean 65 | overwriteDefault?: boolean 66 | } 67 | 68 | // eslint-disable-next-line max-lines-per-function 69 | const extractMessage = async ( 70 | locales: string[], 71 | pattern: string, 72 | buildDir: string, 73 | { 74 | format = 'json', 75 | flat = isJson(format), 76 | defaultLocale = 'en', 77 | overwriteDefault = true, 78 | ...opts 79 | }: Opts = { 80 | defaultLocale: 'en' 81 | } 82 | ) => { 83 | if (!Array.isArray(locales)) { 84 | throw new TypeError(`Expected a Array, got ${typeof locales}`) 85 | } 86 | 87 | if (typeof pattern !== 'string') { 88 | throw new TypeError(`Expected a string, got ${typeof pattern}`) 89 | } 90 | 91 | if (typeof buildDir !== 'string') { 92 | throw new TypeError(`Expected a string, got ${typeof buildDir}`) 93 | } 94 | 95 | const ext = isJson(format) ? 'json' : 'yml' 96 | 97 | const oldLocaleMaps = loadLocaleFiles(locales, buildDir, ext) 98 | 99 | const extractorOptions = { 100 | defaultLocale, 101 | withDescriptions: false, 102 | cwd: process.cwd(), 103 | extractFromFormatMessageCall: true, 104 | ...opts 105 | } 106 | 107 | const newLocaleMaps = await _extractReactIntl( 108 | locales, 109 | pattern, 110 | extractorOptions 111 | ) 112 | 113 | return Promise.all( 114 | locales.map((locale) => { 115 | // If the default locale, overwrite the origin file 116 | let localeMap = 117 | locale === defaultLocale && overwriteDefault 118 | ? // Create a clone so we can use only current valid messages below 119 | { ...oldLocaleMaps[locale], ...newLocaleMaps[locale] } 120 | : { ...newLocaleMaps[locale], ...oldLocaleMaps[locale] } 121 | // Only keep existing keys 122 | localeMap = pick(localeMap, Object.keys(newLocaleMaps[locale])) 123 | 124 | const fomattedLocaleMap: object = flat 125 | ? sortKeys(localeMap, { deep: true }) 126 | : sortKeys(unflatten(localeMap, { object: true }), { deep: true }) 127 | 128 | const fn = isJson(format) ? writeJson : writeYaml 129 | 130 | return fn(path.resolve(buildDir, locale), fomattedLocaleMap) 131 | }) 132 | ) 133 | } 134 | 135 | extractMessage.extractReactIntl = _extractReactIntl 136 | 137 | export default extractMessage 138 | 139 | // For CommonJS default export support 140 | module.exports = extractMessage 141 | module.exports.default = extractMessage 142 | -------------------------------------------------------------------------------- /src/test/fixtures/custom/a/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from '../i18n' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'a.custom.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | world: { 9 | id: 'a.custom.world', 10 | defaultMessage: 'world' 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /src/test/fixtures/custom/b/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from '../i18n' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'b.custom.message', 6 | defaultMessage: 'Message' 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/test/fixtures/custom/i18n.js: -------------------------------------------------------------------------------- 1 | export { defineMessages } from 'react-intl' 2 | -------------------------------------------------------------------------------- /src/test/fixtures/default/a/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useIntl } from 'react-intl' 3 | 4 | export const SubmitButton = () => { 5 | const intl = useIntl() 6 | const label = intl.formatMessage({ 7 | id: 'a.submit', 8 | defaultMessage: 'Submit Button' 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /src/test/fixtures/default/a/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'a.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | world: { 9 | id: 'a.world', 10 | defaultMessage: 'world' 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /src/test/fixtures/default/b/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'b.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | world: { 9 | id: 'b.world', 10 | defaultMessage: 'world' 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /src/test/fixtures/removed/a/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'a.hello', 6 | defaultMessage: 'hello' 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /src/test/fixtures/removed/b/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'b.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | world: { 9 | id: 'b.world', 10 | defaultMessage: 'world' 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /src/test/fixtures/unsorted/a/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'a.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | helloZ: { 9 | id: 'z.hello', 10 | defaultMessage: 'hello' 11 | }, 12 | helloC: { 13 | id: 'c.hello', 14 | defaultMessage: 'hello' 15 | }, 16 | world: { 17 | id: 'a.world', 18 | defaultMessage: 'world' 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /src/test/fixtures/unsorted/b/messages.js: -------------------------------------------------------------------------------- 1 | import { defineMessages } from 'react-intl' 2 | 3 | export default defineMessages({ 4 | hello: { 5 | id: 'b.hello', 6 | defaultMessage: 'hello' 7 | }, 8 | helloY: { 9 | id: 'y.hello', 10 | defaultMessage: 'hello' 11 | }, 12 | world: { 13 | id: 'b.world', 14 | defaultMessage: 'world' 15 | } 16 | }) 17 | -------------------------------------------------------------------------------- /src/test/json/__snapshots__/test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`export json - nest 1`] = ` 4 | Object { 5 | "a": Object { 6 | "hello": "hello", 7 | "submit": "Submit Button", 8 | "world": "world", 9 | }, 10 | "b": Object { 11 | "hello": "hello", 12 | "world": "world", 13 | }, 14 | } 15 | `; 16 | 17 | exports[`export json - nest 2`] = ` 18 | Object { 19 | "a": Object { 20 | "hello": "", 21 | "submit": "", 22 | "world": "", 23 | }, 24 | "b": Object { 25 | "hello": "", 26 | "world": "", 27 | }, 28 | } 29 | `; 30 | 31 | exports[`export json 1`] = ` 32 | Object { 33 | "a.hello": "hello", 34 | "a.submit": "Submit Button", 35 | "a.world": "world", 36 | "b.hello": "hello", 37 | "b.world": "world", 38 | } 39 | `; 40 | 41 | exports[`export json 2`] = ` 42 | Object { 43 | "a.hello": "", 44 | "a.submit": "", 45 | "a.world": "", 46 | "b.hello": "", 47 | "b.world": "", 48 | } 49 | `; 50 | 51 | exports[`export json with removed messages 1`] = ` 52 | Object { 53 | "a.hello": "hello", 54 | "a.submit": "Submit Button", 55 | "a.world": "world", 56 | "b.hello": "hello", 57 | "b.world": "world", 58 | } 59 | `; 60 | 61 | exports[`export json with removed messages 2`] = ` 62 | Object { 63 | "a.hello": "", 64 | "a.submit": "", 65 | "a.world": "", 66 | "b.hello": "", 67 | "b.world": "", 68 | } 69 | `; 70 | 71 | exports[`export json with removed messages 3`] = ` 72 | Object { 73 | "a.hello": "hello", 74 | "b.hello": "hello", 75 | "b.world": "world", 76 | } 77 | `; 78 | 79 | exports[`export json with removed messages 4`] = ` 80 | Object { 81 | "a.hello": "", 82 | "b.hello": "", 83 | "b.world": "", 84 | } 85 | `; 86 | 87 | exports[`export using custom module 1`] = ` 88 | Object { 89 | "a.custom.hello": "hello", 90 | "a.custom.world": "world", 91 | "b.custom.message": "Message", 92 | } 93 | `; 94 | 95 | exports[`export using custom module 2`] = ` 96 | Object { 97 | "a.custom.hello": "", 98 | "a.custom.world": "", 99 | "b.custom.message": "", 100 | } 101 | `; 102 | 103 | exports[`sort keys 1`] = ` 104 | Array [ 105 | "a.hello", 106 | "a.world", 107 | "b.hello", 108 | "b.world", 109 | "c.hello", 110 | "y.hello", 111 | "z.hello", 112 | ] 113 | `; 114 | 115 | exports[`sort keys 2`] = ` 116 | Array [ 117 | "a.hello", 118 | "a.world", 119 | "b.hello", 120 | "b.world", 121 | "c.hello", 122 | "y.hello", 123 | "z.hello", 124 | ] 125 | `; 126 | 127 | exports[`with overwriteDefault 1`] = ` 128 | Object { 129 | "a.custom.hello": "hello", 130 | "a.custom.world": "world", 131 | "b.custom.message": "Default Message", 132 | } 133 | `; 134 | 135 | exports[`with overwriteDefault 2`] = ` 136 | Object { 137 | "a.custom.hello": "", 138 | "a.custom.world": "", 139 | "b.custom.message": "", 140 | } 141 | `; 142 | -------------------------------------------------------------------------------- /src/test/json/test.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import path from 'path' 3 | import tempy from 'tempy' 4 | import m from '../..' 5 | 6 | test('export json', async () => { 7 | const tmp = tempy.directory() 8 | await m(['en', 'ja'], 'src/test/fixtures/default/**/*.js', tmp) 9 | const en = JSON.parse(fs.readFileSync(path.resolve(tmp, 'en.json'), 'utf8')) 10 | const ja = JSON.parse(fs.readFileSync(path.resolve(tmp, 'ja.json'), 'utf8')) 11 | expect(en).toMatchSnapshot() 12 | expect(ja).toMatchSnapshot() 13 | }) 14 | 15 | test('export json with removed messages', async () => { 16 | const tmp = tempy.directory() 17 | await m(['en', 'ja'], 'src/test/fixtures/default/**/*.js', tmp) 18 | const enBefore = JSON.parse( 19 | fs.readFileSync(path.resolve(tmp, 'en.json'), 'utf8') 20 | ) 21 | const jaBefore = JSON.parse( 22 | fs.readFileSync(path.resolve(tmp, 'ja.json'), 'utf8') 23 | ) 24 | expect(enBefore).toMatchSnapshot() 25 | expect(jaBefore).toMatchSnapshot() 26 | await m(['en', 'ja'], 'src/test/fixtures/removed/**/*.js', tmp) 27 | const en = JSON.parse(fs.readFileSync(path.resolve(tmp, 'en.json'), 'utf8')) 28 | const ja = JSON.parse(fs.readFileSync(path.resolve(tmp, 'ja.json'), 'utf8')) 29 | expect(en).toMatchSnapshot() 30 | expect(ja).toMatchSnapshot() 31 | }) 32 | 33 | test('export json - nest', async () => { 34 | const tmp = tempy.directory() 35 | await m(['en', 'ja'], 'src/test/fixtures/default/**/*.js', tmp, { 36 | defaultLocale: 'en', 37 | flat: false 38 | }) 39 | const en = JSON.parse(fs.readFileSync(path.resolve(tmp, 'en.json'), 'utf8')) 40 | const ja = JSON.parse(fs.readFileSync(path.resolve(tmp, 'ja.json'), 'utf8')) 41 | expect(en).toMatchSnapshot() 42 | expect(ja).toMatchSnapshot() 43 | }) 44 | 45 | test('sort keys', async () => { 46 | const tmp = tempy.directory() 47 | const enPath = path.resolve(tmp, 'en.json') 48 | const jaPath = path.resolve(tmp, 'ja.json') 49 | 50 | await m(['en', 'ja'], 'src/test/fixtures/unsorted/**/*.js', tmp) 51 | const en = JSON.parse(fs.readFileSync(enPath, 'utf8')) 52 | const ja = JSON.parse(fs.readFileSync(jaPath, 'utf8')) 53 | 54 | expect(Object.keys(en)).toMatchSnapshot() 55 | expect(Object.keys(ja)).toMatchSnapshot() 56 | }) 57 | 58 | test('export using custom module', async () => { 59 | const tmp = tempy.directory() 60 | await m(['en', 'ja'], 'src/test/fixtures/custom/**/*.js', tmp, { 61 | defaultLocale: 'en', 62 | moduleSourceName: '../i18n' 63 | }) 64 | const en = JSON.parse(fs.readFileSync(path.resolve(tmp, 'en.json'), 'utf8')) 65 | const ja = JSON.parse(fs.readFileSync(path.resolve(tmp, 'ja.json'), 'utf8')) 66 | expect(en).toMatchSnapshot() 67 | expect(ja).toMatchSnapshot() 68 | }) 69 | 70 | test('with overwriteDefault', async () => { 71 | const tmp = tempy.directory() 72 | fs.writeFileSync( 73 | path.resolve(tmp, 'en.json'), 74 | JSON.stringify( 75 | { 76 | 'a.custom.hello': 'hello', 77 | 'a.custom.world': 'world', 78 | 'b.custom.message': 'Default Message' 79 | }, 80 | null, 81 | 2 82 | ), 83 | 'utf8' 84 | ) 85 | await m(['en', 'ja'], 'src/test/fixtures/custom/**/*.js', tmp, { 86 | defaultLocale: 'en', 87 | moduleSourceName: '../i18n', 88 | overwriteDefault: false 89 | }) 90 | const en = JSON.parse(fs.readFileSync(path.resolve(tmp, 'en.json'), 'utf8')) 91 | const ja = JSON.parse(fs.readFileSync(path.resolve(tmp, 'ja.json'), 'utf8')) 92 | expect(en).toMatchSnapshot() 93 | expect(ja).toMatchSnapshot() 94 | }) 95 | -------------------------------------------------------------------------------- /src/test/test.ts: -------------------------------------------------------------------------------- 1 | import m from '..' 2 | 3 | test('errors', async () => { 4 | // @ts-ignore 5 | await expect(m('hello')).rejects.toThrow('Expected a Array') 6 | // @ts-ignore 7 | await expect(m(['en', 'ja'], 2)).rejects.toThrow('Expected a string') 8 | // @ts-ignore 9 | await expect(m(['en', 'ja'], 'app/', 2)).rejects.toThrow('Expected a string') 10 | }) 11 | -------------------------------------------------------------------------------- /src/test/yaml/__snapshots__/test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`export yaml - flat 1`] = ` 4 | Object { 5 | "a.hello": "hello", 6 | "a.submit": "Submit Button", 7 | "a.world": "world", 8 | "b.hello": "hello", 9 | "b.world": "world", 10 | } 11 | `; 12 | 13 | exports[`export yaml - flat 2`] = ` 14 | Object { 15 | "a.hello": "", 16 | "a.submit": "", 17 | "a.world": "", 18 | "b.hello": "", 19 | "b.world": "", 20 | } 21 | `; 22 | 23 | exports[`export yaml 1`] = ` 24 | Object { 25 | "a": Object { 26 | "hello": "hello", 27 | "submit": "Submit Button", 28 | "world": "world", 29 | }, 30 | "b": Object { 31 | "hello": "hello", 32 | "world": "world", 33 | }, 34 | } 35 | `; 36 | 37 | exports[`export yaml 2`] = ` 38 | Object { 39 | "a": Object { 40 | "hello": "", 41 | "submit": "", 42 | "world": "", 43 | }, 44 | "b": Object { 45 | "hello": "", 46 | "world": "", 47 | }, 48 | } 49 | `; 50 | 51 | exports[`exsit yaml 1`] = ` 52 | Object { 53 | "a": Object { 54 | "hello": "hello", 55 | "submit": "Submit Button", 56 | "world": "world", 57 | }, 58 | "b": Object { 59 | "hello": "hello", 60 | "world": "world", 61 | }, 62 | } 63 | `; 64 | 65 | exports[`exsit yaml 2`] = ` 66 | Object { 67 | "a": Object { 68 | "hello": "hello2", 69 | "submit": "", 70 | "world": "", 71 | }, 72 | "b": Object { 73 | "hello": "", 74 | "world": "", 75 | }, 76 | } 77 | `; 78 | -------------------------------------------------------------------------------- /src/test/yaml/test.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import path from 'path' 3 | // eslint-disable-next-line import/no-extraneous-dependencies 4 | import tempy from 'tempy' 5 | // eslint-disable-next-line import/no-extraneous-dependencies 6 | import tempWrite from 'temp-write' 7 | import yaml from 'js-yaml' 8 | import m from '../..' 9 | 10 | const fixturesPath = 'src/test/fixtures/default/**/*.js' 11 | 12 | const yamlLoad = (tmp: string, file = '') => 13 | yaml.safeLoad(fs.readFileSync(path.resolve(tmp, file), 'utf8')) 14 | 15 | const defaultLocale = 'en' 16 | 17 | test('export yaml', async () => { 18 | const tmp = tempy.directory() 19 | await m(['en', 'ja'], fixturesPath, tmp, { defaultLocale, format: 'yaml' }) 20 | 21 | expect(yamlLoad(tmp, 'en.yml')).toMatchSnapshot() 22 | expect(yamlLoad(tmp, 'ja.yml')).toMatchSnapshot() 23 | }) 24 | 25 | test('export yaml - flat', async () => { 26 | const tmp = tempy.directory() 27 | await m(['en', 'ja'], fixturesPath, tmp, { 28 | defaultLocale, 29 | format: 'yaml', 30 | flat: true 31 | }) 32 | 33 | expect(yamlLoad(tmp, 'en.yml')).toMatchSnapshot() 34 | expect(yamlLoad(tmp, 'ja.yml')).toMatchSnapshot() 35 | }) 36 | 37 | test('exsit yaml', async () => { 38 | const x = { a: { hello: 'hello2' } } 39 | 40 | const tmpEn = tempWrite.sync(yaml.safeDump(x), 'en.yml') 41 | await m(['en'], fixturesPath, path.dirname(tmpEn), { 42 | defaultLocale, 43 | format: 'yaml' 44 | }) 45 | expect(yaml.safeLoad(fs.readFileSync(tmpEn, 'utf8'))).toMatchSnapshot() 46 | 47 | const tmpJa = tempWrite.sync(yaml.safeDump(x), 'ja.yml') 48 | await m(['ja'], fixturesPath, path.dirname(tmpJa), { 49 | defaultLocale, 50 | format: 'yaml' 51 | }) 52 | 53 | expect(yaml.safeLoad(fs.readFileSync(tmpJa, 'utf8'))).toMatchSnapshot() 54 | }) 55 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@akameco/tsconfig", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src"] 7 | } 8 | --------------------------------------------------------------------------------