Skip to content

Commit

Permalink
refactor(i18n): convert to TS (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Jun 22, 2019
1 parent ae0a843 commit 82774d0
Show file tree
Hide file tree
Showing 25 changed files with 317 additions and 286 deletions.
1 change: 1 addition & 0 deletions jest.d.ts
@@ -1,5 +1,6 @@
declare namespace jest {
interface Matchers<R> {
toHaveTextContent(selector: string): R;
// The following matchers are part of https://www.npmjs.com/package/@commercetools/jest-enzyme-matchers
toHaveProp(selector: string, expected?: unknown): R;
toRender(selector: string): R;
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -110,6 +110,7 @@
"prettier": "1.18.2",
"puppeteer": "1.17.0",
"rcfile": "1.0.3",
"react-testing-library": "7.0.1",
"read-pkg-up": "6.0.0",
"replace": "1.1.0",
"rollup": "1.15.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/actions-global/package.json
Expand Up @@ -18,8 +18,8 @@
"publishConfig": {
"access": "public"
},
"main": "dist/actions-global.cjs.js",
"module": "dist/actions-global.es.js",
"main": "./dist/actions-global.cjs.js",
"module": "./dist/actions-global.es.js",
"files": [
"dist",
"package.json",
Expand Down
10 changes: 4 additions & 6 deletions packages/application-components/package.json
Expand Up @@ -18,8 +18,8 @@
"publishConfig": {
"access": "public"
},
"main": "dist/application-components.cjs.js",
"module": "dist/application-components.es.js",
"main": "./dist/application-components.cjs.js",
"module": "./dist/application-components.es.js",
"files": [
"dist",
"materials/media-queries.css",
Expand Down Expand Up @@ -50,14 +50,12 @@
"@commercetools-frontend/ui-kit": "9.9.0",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-intl": "2.9.0",
"react-testing-library": "7.0.1"
"react-intl": "2.9.0"
},
"peerDependencies": {
"@commercetools-frontend/ui-kit": "^9.2",
"react": "16.x",
"react-dom": "16.x",
"react-intl": "2.x",
"react-testing-library": "6.x || 7.x"
"react-intl": "2.x"
}
}
4 changes: 2 additions & 2 deletions packages/application-shell-connectors/package.json
Expand Up @@ -18,8 +18,8 @@
"publishConfig": {
"access": "public"
},
"main": "dist/application-shell-connectors.cjs.js",
"module": "dist/application-shell-connectors.es.js",
"main": "./dist/application-shell-connectors.cjs.js",
"module": "./dist/application-shell-connectors.es.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/application-shell/package.json
Expand Up @@ -18,8 +18,8 @@
"publishConfig": {
"access": "public"
},
"main": "dist/application-shell-index.cjs.js",
"module": "dist/application-shell-index.es.js",
"main": "./dist/application-shell-index.cjs.js",
"module": "./dist/application-shell-index.es.js",
"files": [
"dist",
"test-utils",
Expand Down
4 changes: 2 additions & 2 deletions packages/browser-history/package.json
Expand Up @@ -18,8 +18,8 @@
"publishConfig": {
"access": "public"
},
"main": "dist/browser-history.cjs.js",
"module": "dist/browser-history.es.js",
"main": "./dist/browser-history.cjs.js",
"module": "./dist/browser-history.es.js",
"files": [
"dist",
"package.json",
Expand Down
4 changes: 2 additions & 2 deletions packages/constants/package.json
Expand Up @@ -18,8 +18,8 @@
"publishConfig": {
"access": "public"
},
"main": "dist/constants.cjs.js",
"module": "dist/constants.es.js",
"main": "./dist/constants.cjs.js",
"module": "./dist/constants.es.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": [
Expand Down
File renamed without changes.
15 changes: 9 additions & 6 deletions packages/i18n/package.json
Expand Up @@ -18,8 +18,10 @@
"publishConfig": {
"access": "public"
},
"main": "dist/i18n-index.cjs.js",
"module": "dist/i18n-index.es.js",
"main": "./dist/i18n-index.cjs.js",
"module": "./dist/i18n-index.es.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": [
"dist",
"package.json",
Expand All @@ -29,10 +31,11 @@
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/**",
"build": "yarn build:es && yarn build:cjs",
"build:cjs": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -f cjs ./src/index.js --dir ./dist --chunkFileNames i18n-[name]-[hash].cjs.js --entryFileNames i18n-[name].cjs.js",
"build:es": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -f es ./src/index.js --dir ./dist --chunkFileNames i18n-[name]-[hash].es.js --entryFileNames i18n-[name].es.js",
"build:es:watch": "yarn build:es -w"
"build": "yarn build:es && yarn build:cjs && yarn build:typings",
"build:cjs": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -f cjs ./src/index.ts --dir ./dist --chunkFileNames i18n-[name]-[hash].cjs.js --entryFileNames i18n-[name].cjs.js",
"build:es": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -f es ./src/index.ts --dir ./dist --chunkFileNames i18n-[name]-[hash].es.js --entryFileNames i18n-[name].es.js",
"build:es:watch": "yarn build:es -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings"
},
"dependencies": {
"@babel/runtime-corejs3": "7.4.5",
Expand Down
87 changes: 0 additions & 87 deletions packages/i18n/src/async-locale-data/async-locale-data.js

This file was deleted.

160 changes: 0 additions & 160 deletions packages/i18n/src/async-locale-data/async-locale-data.spec.js

This file was deleted.

0 comments on commit 82774d0

Please sign in to comment.