Skip to content

Commit

Permalink
🔧 Update babel config
Browse files Browse the repository at this point in the history
  • Loading branch information
cermakjiri committed May 12, 2021
1 parent d77daf0 commit b1adb32
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 35 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
es
lib
node_modules
5 changes: 2 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const config = {
'@babel/env',
{
useBuiltIns: 'usage',
corejs: '3.11',
corejs: '3.x',
loose: true,
modules: false,
modules: process.env.BABEL_ENV === 'es' ? false : 'auto',
bugfixes: true,
browserslistEnv: 'production',
},
Expand Down Expand Up @@ -40,7 +40,6 @@ const config = {
},
},
],
'@babel/plugin-transform-runtime',
],
ignore: ['**/__tests__/', '**/*.test.js'],
};
Expand Down
19 changes: 6 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
"packages/@ackee/*"
],
"scripts": {
"bootstrap": "lerna bootstrap --use-workspaces",
"postinstall": "yarn bootstrap",
"build:lib": "lerna exec --scope={@ackee/antonio-core,@ackee/antonio-utils,@ackee/antonio-auth} -- babel src --out-dir lib --extensions \".ts\" --config-file=./babel.config.js --source-maps inline",
"build:es": "lerna exec --scope={@ackee/antonio-core,@ackee/antonio-utils,@ackee/antonio-auth} -- babel src --out-dir es --extensions \".ts\" --config-file=./babel.config.js --source-maps inline",
"postinstall": "lerna bootstrap --use-workspaces",
"build:lib": "lerna exec -- BABEL_ENV=lib babel src --out-dir lib --extensions \".ts\" --config-file=./babel.config.js --source-maps inline",
"build:es": "lerna exec -- BABEL_ENV=es babel src --out-dir es --extensions \".ts\" --config-file=./babel.config.js --source-maps inline",
"build:test": "babel ./packages/test/src --out-dir lib --extensions \".ts\" --config-file=./babel.config.js",
"build:types": "lerna exec --scope={@ackee/antonio-core,@ackee/antonio-utils,@ackee/antonio-auth} -- tsc --project ./tsconfig.types.json --emitDeclarationOnly",
"build:types": "lerna exec -- tsc --project ./tsconfig.types.json --emitDeclarationOnly",
"build:js": "yarn build:es & yarn build:lib",
"build": "yarn clean && yarn build:js && yarn build:types",
"clean": "lerna exec -- rm -rf lib es",
"lint": "lerna exec --scope={@ackee/antonio-core,@ackee/antonio-utils,@ackee/antonio-auth} -- eslint 'src/**/*.ts'",
"lint": "lerna exec -- eslint 'src/**/*.ts'",
"type-check": "tsc --noEmit",
"type-check:watch": "yarn type-check -- --watch",
"test": "jest",
"push": "yarn build && yalc push",
"rebuild": "yarn build && yalc push",
"start": "yarn build && onchange 'packages/@ackee/*/src/**/*.ts' -- yarn rebuild",
"changelog": "gitmoji-changelog",
Expand Down Expand Up @@ -46,7 +44,7 @@
"babel-eslint": "^10.1.0",
"babel-plugin-custom-import-path-transform": "1.x",
"babel-plugin-transform-imports": "^2.0.0",
"core-js": "^3.11.2",
"core-js": "^3.12.1",
"eslint": "^7.5.0",
"eslint-plugin-compat": "3.9.0",
"eslint-plugin-flowtype": "^5.2.0",
Expand All @@ -60,18 +58,13 @@
"lerna": "4.x",
"lint-staged": "^10.2.2",
"onchange": "7.x",
"package-size": "2.x",
"prettier": "2.x",
"prettier-config-ackee": "0.x",
"redux-saga": "1.x",
"reselect": "4.x",
"ts-jest": "25.x",
"typescript": "4.x"
},
"dependencies": {
"@babel/runtime": "7.x",
"loglevel": "1.x"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
Expand Down
7 changes: 2 additions & 5 deletions packages/@ackee/antonio-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@
"url": "git+https://github.com/AckeeCZ/antonio.git",
"directory": "packages/@ackee/antonio-auth"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1",
"size": "package-size es --no-cache"
},
"engines": {
"node": ">=12"
},
"dependencies": {
"@ackee/antonio-utils": "^4.0.0-beta.7"
"@ackee/antonio-utils": "^4.0.0-beta.7",
"@babel/runtime": "7.14.0"
},
"devDependencies": {
"@ackee/petrus": "5.2.1"
Expand Down
6 changes: 2 additions & 4 deletions packages/@ackee/antonio-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
"url": "git+https://github.com/AckeeCZ/antonio.git",
"directory": "packages/@ackee/antonio-core"
},
"scripts": {
"size": "package-size es --no-cache"
},
"dependencies": {
"fetch-headers": "^2.0.0",
"loglevel": "^1.7.1"
"loglevel": "^1.7.1",
"@babel/runtime": "7.14.0"
},
"devDependencies": {
"@types/fetch-headers": "^2.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import loglevel from 'loglevel';
import { GeneralConfig } from '../../../types';
import type { GeneralConfig } from '../../../types';

export const defaultGeneralConfig: GeneralConfig = {
logger: loglevel,
Expand Down
7 changes: 2 additions & 5 deletions packages/@ackee/antonio-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@
"url": "git+https://github.com/AckeeCZ/antonio.git",
"directory": "packages/@ackee/antonio-utils"
},
"homepage": "",
"scripts": {
"size": "package-size es --no-cache"
},
"dependencies": {
"abortcontroller-polyfill": "1.7.1"
"abortcontroller-polyfill": "1.7.1",
"@babel/runtime": "7.14.0"
},
"peerDependencies": {
"redux-saga": "1.x"
Expand Down
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@7.x", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
"@babel/runtime@7.14.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
version "7.14.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.0.tgz#46794bc20b612c5f75e62dd071e24dfd95f1cbe6"
integrity sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==
Expand Down Expand Up @@ -4253,7 +4253,12 @@ core-js@^2.4.0:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==

core-js@^3.11.2, core-js@^3.6.5:
core-js@^3.12.1:
version "3.12.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.12.1.tgz#6b5af4ff55616c08a44d386f1f510917ff204112"
integrity sha512-Ne9DKPHTObRuB09Dru5AjwKjY4cJHVGu+y5f7coGn1E9Grkc3p2iBwE9AI/nJzsE29mQF7oq+mhYYRqOMFN1Bw==

core-js@^3.6.5:
version "3.11.2"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.11.2.tgz#af087a43373fc6e72942917c4a4c3de43ed574d6"
integrity sha512-3tfrrO1JpJSYGKnd9LKTBPqgUES/UYiCzMKeqwR1+jF16q4kD1BY2NvqkfuzXwQ6+CIWm55V9cjD7PQd+hijdw==
Expand Down Expand Up @@ -7999,7 +8004,7 @@ log-update@^4.0.0:
slice-ansi "^4.0.0"
wrap-ansi "^6.2.0"

loglevel@1.x, loglevel@^1.7.1:
loglevel@^1.7.1:
version "1.7.1"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197"
integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==
Expand Down Expand Up @@ -9382,7 +9387,7 @@ package-json@^4.0.0:
registry-url "^3.0.3"
semver "^5.1.0"

package-size@2.x:
package-size@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/package-size/-/package-size-2.3.0.tgz#b27374ba96d27bf64e7aeeb0929db4f71162047b"
integrity sha512-CXCUccwUQli9Vt2tVu+bIWW+IiPgjXVJMODUCdmzVXkPLis2QHZgMf6xy3EePUiG1QAaRf96S98EP51PSLhYUA==
Expand Down

0 comments on commit b1adb32

Please sign in to comment.