Skip to content

Commit

Permalink
chore: #128 remove redundant and restructure dependencies (#451)
Browse files Browse the repository at this point in the history
* chore: #128 remove redundant and restructure dependencies

* chore: resolve all warning on build console

* chore: resolve warning peer dependencies for install by yarn

* fix: resolve package cognito-auth in cognito package

* chore: remove query-string dependency
  • Loading branch information
duong-se authored Feb 27, 2020
1 parent dc1a1e4 commit c6a4c53
Show file tree
Hide file tree
Showing 24 changed files with 428 additions and 519 deletions.
105 changes: 20 additions & 85 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,101 +38,54 @@
"git add"
]
},
"resolutions": {
"**/**/lodash": "^4.17.15",
"**/**/decompress": "^4.2.0",
"**/**/mem": "^6.0.1",
"**/**/apollo-client": "2.6.8",
"**/**/apollo-link": "1.2.13",
"**/**/apollo-utilities": "1.3.3",
"**/**/apollo-cache-inmemory": "1.6.5",
"**/**/react-is": "16.12.0",
"**/**/@storybook/source-loader": "5.3.13",
"**/**/prop-types":"^15.7.2",
"**/**/rollup": "1.31.1",
"**/**/styled-components": "4.4.1",
"**/**/eslint-plugin-react-hooks": "2.4.0",
"**/**/react-test-renderer": "16.12.0"
},
"dependencies": {
"@apollo/react-hooks": "^3.1.3",
"@sentry/browser": "^5.11.1",
"amazon-cognito-identity-js": "^3.0.13",
"apollo-boost": "^0.4.7",
"apollo-server": "^2.9.16",
"aws-sdk": "^2.582.0",
"bulma": "^0.7.5",
"chart.js": "^2.9.3",
"cors": "^2.8.5",
"dataloader": "^2.0.0",
"@types/webpack": "^4.41.6",
"dayjs": "^1.8.19",
"diff": "^4.0.1",
"error-polyfill": "^0.1.2",
"express": "^4.17.1",
"formik": "^2.0.4",
"graphql": "^14.5.8",
"graphql-depth-limit": "^1.1.0",
"graphql-type-json": "^0.3.1",
"hardtack": "^4.1.2",
"himalaya": "^1.1.0",
"jsonwebtoken": "^8.5.1",
"little-loader": "^0.2.0",
"localforage": "^1.7.3",
"lodash.merge": "^4.6.2",
"lodash.orderby": "^4.6.0",
"papaparse": "^5.1.1",
"pell": "^1.0.6",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-chartjs-2": "^2.8.0",
"react-datasheet": "^1.4.0",
"react-datepicker": "^2.9.6",
"react-dom": "^16.12.0",
"react-ga": "^2.7.0",
"react-google-map": "^3.1.1",
"react-google-maps-loader": "^4.2.5",
"react-icons": "^3.7.0",
"react-redux": "^7.1.3",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-slick": "^0.24.0",
"react-table": "7.0.0-alpha.35",
"react-to-print": "^2.4.0",
"redux": "^4.0.4",
"redux-persist": "^5.10.0",
"redux-saga": "^1.1.3",
"styled-components": "^4.4.1",
"swagger-ui-react": "^3.24.3",
"uuid": "^3.3.3",
"winston": "^3.2.1"
"redux-saga": "^1.1.3"
},
"devDependencies": {
"@apollo/react-testing": "^3.1.3",
"@babel/core": "^7.7.2",
"@babel/polyfill": "^7.7.0",
"@babel/preset-env": "^7.7.1",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@cypress/webpack-preprocessor": "^4.1.1",
"@octokit/rest": "^16.38.1",
"@redux-saga/testing-utils": "^1.0.5",
"@sentry/webpack-plugin": "^1.10.0",
"@storybook/addon-actions": "^5.2.6",
"@storybook/addon-docs": "^5.2.6",
"@storybook/addon-info": "^5.2.6",
"@storybook/addon-links": "^5.2.6",
"@storybook/addon-storysource": "^5.2.6",
"@storybook/addon-viewport": "^5.2.6",
"@storybook/addons": "^5.2.6",
"@storybook/cli": "^5.2.6",
"@storybook/preset-typescript": "^1.1.0",
"@storybook/react": "^5.2.6",
"@storybook/storybook-deployer": "^2.8.1",
"@storybook/theming": "^5.2.8",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/react-hooks": "^2.0.3",
"@testing-library/user-event": "^7.1.2",
"@types/aws-lambda": "^8.10.39",
"@types/diff": "^4.0.2",
"@types/ejs": "^2.7.0",
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/googlemaps": "^3.37.5",
"@types/graphql-depth-limit": "^1.1.2",
"@types/graphql-type-json": "^0.3.2",
"@types/jest": "^24.0.23",
"@types/jsonwebtoken": "^8.3.5",
"@types/little-loader": "^0.2.0",
"@types/lodash.merge": "^4.6.6",
"@types/nanoid": "^2.1.0",
"@types/node": "10.17.13",
"@types/node-fetch": "^2.5.4",
"@types/papaparse": "^5.0.3",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-redux": "^7.0.9",
Expand All @@ -141,28 +94,20 @@
"@types/react-slick": "^0.23.4",
"@types/storybook__react": "^4.0.2",
"@types/styled-components": "^4.1.19",
"@types/uuid": "^3.4.6",
"@types/yaml": "^1.2.0",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.0.6",
"babel-plugin-import": "^1.13.0",
"babel-plugin-styled-components": "^1.10.6",
"babel-plugin-tailwind-components": "^0.5.10",
"babel-polyfill": "^6.26.0",
"cache-loader": "^4.1.0",
"chromedriver": "^2.43.1",
"compare-versions": "^3.5.1",
"concurrently": "^5.1.0",
"core-js": "^3.4.1",
"cross-env": "^6.0.3",
"css-loader": "^3.0.0",
"cypress": "^3.8.0",
"cypress-file-upload": "^3.5.1",
"cypress-plugin-retries": "^1.5.2",
"dotenv": "^8.2.0",
"dotenv-webpack": "^1.7.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"enzyme-to-json": "^3.4.3",
Expand All @@ -175,7 +120,6 @@
"file-loader": "^3.0.1",
"fork-ts-checker-notifier-webpack-plugin": "^1.0.0",
"fork-ts-checker-webpack-plugin": "^1.3.4",
"graphql-import": "^0.7.1",
"graphql-tag": "^2.10.1",
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "^3.2.0",
Expand All @@ -193,39 +137,30 @@
"mockdate": "^2.0.5",
"ncp": "^2.0.0",
"node-sass": "^4.12.0",
"nodemon": "^2.0.2",
"prettier": "^1.19.1",
"prettier-plugin-packagejson": "^2.0.1",
"purgecss": "^1.3.0",
"purgecss-whitelister": "^2.4.0",
"purify-css": "^1.2.5",
"raw-loader": "^3.1.0",
"purify-css": "^1.2.6",
"react-docgen-typescript-loader": "^3.3.0",
"react-test-renderer": "^16.12.0",
"rimraf": "^3.0.0",
"rollup": "1.27.13",
"rollup-plugin-scss": "^1.0.2",
"sass-loader": "^7.1.0",
"semver": "^7.1.1",
"serve": "^11.2.0",
"source-map-loader": "^0.2.4",
"style-loader": "^0.23.1",
"sw2dts": "^2.6.2",
"thread-loader": "^2.1.3",
"ts-jest": "^25.2.0",
"ts-loader": "^6.2.1",
"ts-node": "^8.3.0",
"ts-paths-to-webpack-alias": "^0.3.1",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"tsdx": "^0.11.0",
"tsdx": "^0.12.3",
"tslib": "^1.10.0",
"typescript": "~3.7.2",
"typescript-eslint": "^0.0.1-alpha.0",
"wait-on": "^3.3.0",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "^3.4.1",
"whatwg-fetch": "^3.0.0",
"workbox-webpack-plugin": "^4.3.1"
}
}
3 changes: 3 additions & 0 deletions packages/aml-checklist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"test:update-badges": "yarn test:ci && jest-coverage-badges --input src/tests/coverage/coverage-summary.json --output src/tests/badges",
"lint": "concurrently \"tsc --noEmit\" \"eslint --cache --ext=ts,tsx,js src\""
},
"dependencies": {
"react-to-print": "^2.4.0"
},
"devDependencies": {
"@reapit/foundations-ts-definitions": "2020-02-13"
}
Expand Down
7 changes: 6 additions & 1 deletion packages/cognito-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@
"hardtack": "^4.1.2",
"jsonwebtoken": "^8.5.1"
},
"devDependencies": {}
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@types/jsonwebtoken": "^8.3.5",
"compare-versions": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/cognito-auth/src/utils/cognito.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { mockCognitoUserSession, mockLoginSession } from '../__mocks__/cognito-session'
import hardtack from 'hardtack'
import { LoginIdentity } from '../core/types'
import { redirectToLogout } from '@reapit/cognito-auth'
import { redirectToLogout } from './cognito'

jest.mock('amazon-cognito-identity-js', () => require('../__mocks__/cognito-session').mockCognito)

Expand Down
1 change: 0 additions & 1 deletion packages/cognito-auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"sourceRoot": "/",
"paths": {
"@/*": ["src/*"],
"@reapit/cognito-auth": ["../cognito-auth/src"],
"@reapit/elements": ["../elements/src"]
},
"declaration": true,
Expand Down
19 changes: 19 additions & 0 deletions packages/cognito-auth/tsdx.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
rollup(config) {
const newConfig = {
...config,
output: {
...config.output,
globals: {
...config.output.globals,
'amazon-cognito-identity-js': 'amazon-cognito-identity-js',
hardtack: 'hardtack',
jsonwebtoken: 'jsonwebtoken',
formik: 'formik',
'@reapit/elements': '../elements',
},
},
}
return newConfig
},
}
8 changes: 6 additions & 2 deletions packages/cognito-custom-mail-lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
"homepage": "https://github.com/reapit/foundations#readme",
"dependencies": {
"aws-lambda": "^1.0.5",
"ejs": "^3.0.1"
"ejs": "^3.0.1",
"serverless": "^1.64.1"
},
"devDependencies": {}
"devDependencies": {
"@types/aws-lambda": "^8.10.39",
"@types/ejs": "^2.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/elements/.storybook/presets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = [
{
name: '@storybook/addon-docs/react/preset',
name: '@storybook/addon-docs/preset',
options: {
configureJSX: true,
babelOptions: {},
Expand Down
20 changes: 18 additions & 2 deletions packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
],
"dependencies": {
"@storybook/theming": "^5.2.8",
"@types/papaparse": "^5.0.3",
"bulma": "^0.7.5",
"formik": "^2.0.4",
"gh-pages": "^2.2.0",
Expand All @@ -55,7 +54,24 @@
"styled-components": "^4.4.1"
},
"devDependencies": {
"@reapit/foundations-ts-definitions": "2020-02-13"
"@reapit/foundations-ts-definitions": "2020-02-13",
"@storybook/addon-actions": "^5.2.6",
"@storybook/addon-docs": "^5.2.6",
"@storybook/addon-info": "^5.2.6",
"@storybook/addon-links": "^5.2.6",
"@storybook/addon-storysource": "^5.2.6",
"@storybook/addon-viewport": "^5.2.6",
"@storybook/addons": "^5.2.6",
"@storybook/cli": "^5.2.6",
"@storybook/preset-typescript": "^1.1.0",
"@storybook/react": "^5.2.6",
"@storybook/storybook-deployer": "^2.8.1",
"@storybook/theming": "^5.2.8",
"@types/googlemaps": "^3.37.5",
"@types/jsonwebtoken": "^8.3.5",
"@types/papaparse": "^5.0.3",
"rollup": "1.27.13",
"rollup-plugin-scss": "^1.0.2"
},
"peerDependencies": {
"react": "^16.11.0",
Expand Down
30 changes: 30 additions & 0 deletions packages/elements/tsdx.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
rollup(config) {
const newConfig = {
...config,
output: {
...config.output,
globals: {
...config.output.globals,
'styled-components': 'styled-components',
'react-dom': 'react-dom',
formik: 'formik',
'react-router-dom': 'react-router-dom',
'react-google-map': 'react-google-map',
'react-google-maps-loader': 'react-google-maps-loader',
'react-datepicker': 'react-datepicker',
dayjs: 'dayjs',
'dayjs/plugin/customParseFormat': 'dayjs/plugin/customParseFormat',
'react-table': 'react-table',
'react-icons/md': 'react-icons/md',
pell: 'pell',
himalaya: 'himalaya',
'react-datasheet': 'react-datasheet',
papaparse: 'papaparse',
'dayjs/plugin/utc': 'dayjs/plugin/utc',
},
},
}
return newConfig
},
}
5 changes: 4 additions & 1 deletion packages/geo-diary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"test:update-badges": "yarn test:ci && jest-coverage-badges --input src/tests/coverage/coverage-summary.json --output src/tests/badges",
"lint": "concurrently \"tsc --noEmit\" \"eslint --cache --ext=ts,tsx,js src\""
},
"dependencies": {},
"dependencies": {
"localforage": "^1.7.3",
"redux-persist": "^5.10.0"
},
"devDependencies": {
"@reapit/foundations-ts-definitions": "2020-02-13"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/geo-diary/src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ declare module '*.scss?mod'
declare module '*.sass'
declare module '*.jpg'
declare module '*.png'

declare module 'swagger-ui-react'
9 changes: 4 additions & 5 deletions packages/graphql-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
"is-stream": "^2.0.0",
"ms": "^2.1.2",
"readable-stream": "^3.6.0",
"serverless": "^1.64.0",
"serverless": "^1.64.1",
"stack-trace": "^0.0.10",
"uuid": "^3.3.3"
"uuid": "^3.3.3",
"winston": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.8.4",
Expand All @@ -46,19 +47,17 @@
"@types/graphql-type-json": "^0.3.2",
"@types/jest": "^25.1.2",
"@types/node": "^13.7.2",
"@types/node-fetch": "^2.5.4",
"@types/uuid": "^3.4.6",
"babel-loader": "^8.0.6",
"babel-runtime": "^6.26.0",
"bufferutil": "^4.0.1",
"concurrently": "^5.0.1",
"copy-webpack-plugin": "^5.1.1",
"jest": "^25.1.0",
"json-loader": "^0.5.7",
"nodemon": "^2.0.2",
"serverless-webpack": "^5.3.1",
"ts-node": "^8.5.4",
"tsdx": "^0.11.0",
"tsdx": "^0.12.3",
"utf-8-validate": "^5.0.2",
"webpack-node-externals": "^1.7.2"
}
Expand Down
Loading

0 comments on commit c6a4c53

Please sign in to comment.