diff --git a/.lib.babelrc b/.lib.babelrc index 2be21a52d..0e67ee71f 100644 --- a/.lib.babelrc +++ b/.lib.babelrc @@ -1,17 +1,11 @@ { - "presets": [ - ["@babel/env", { - "targets": { - "node": "6.4.0", - "browsers": [ "> 1%", "last 2 versions", "ie 9" ] - } - }] - ], - "plugins": [ - ["@babel/transform-runtime"] - ], - "parserOpts": { - "allowReturnOutsideFunction": true - }, - "sourceMaps": "inline" -} + "presets": [ + ["@babel/env", { + "targets": { + "node": "6.4.0", + "browsers": [ "> 1%", "last 2 versions", "ie 9" ] + } + }] + ], + "sourceMaps": "inline" + } \ No newline at end of file diff --git a/.test.babelrc b/.test.babelrc new file mode 100644 index 000000000..2be21a52d --- /dev/null +++ b/.test.babelrc @@ -0,0 +1,17 @@ +{ + "presets": [ + ["@babel/env", { + "targets": { + "node": "6.4.0", + "browsers": [ "> 1%", "last 2 versions", "ie 9" ] + } + }] + ], + "plugins": [ + ["@babel/transform-runtime"] + ], + "parserOpts": { + "allowReturnOutsideFunction": true + }, + "sourceMaps": "inline" +} diff --git a/package.json b/package.json index 60e7b7957..2a3f352b0 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "@babel/core": "^7.17.9", "@babel/plugin-transform-runtime": "^7.17.0", "@babel/preset-env": "^7.16.11", + "@babel/runtime": "^7.17.9", "Base64": "^1.1.0", "babelify": "^10.0.0", "basic-auth-connect": "^1.0.0", @@ -70,9 +71,9 @@ "eslint-config-xo-lass": "^1.0.6", "eslint-plugin-compat": "^4.0.2", "eslint-plugin-node": "^11.1.0", - "husky": "^7.0.4", + "husky": "^7.0.4", "lint-staged": "^12.4.1", - "remark-cli": "^10.0.1", + "remark-cli": "^10.0.1", "remark-preset-github": "^4.0.1", "xo": "^0.48.0" }, @@ -156,7 +157,7 @@ "build:clean": "rimraf lib dist", "build:dist": "npm run browserify && npm run minify", "build:lib": "babel --config-file ./.lib.babelrc src --out-dir lib", - "build:test": "babel --config-file ./.lib.babelrc test --out-dir lib/node/test", + "build:test": "babel --config-file ./.test.babelrc test --out-dir lib/node/test", "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", "lint": "eslint -c .eslintrc src test && remark . -qfo && eslint -c .lib.eslintrc lib/**/*.js && eslint -c .dist.eslintrc dist/**/*.js", "minify": "cross-env NODE_ENV=production browserify src/node/index.js -o dist/superagent.min.js -s superagent -g [ babelify --configFile ./.dist.babelrc ] -p tinyify", diff --git a/yarn.lock b/yarn.lock index 126eb2671..9a674be6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -876,7 +876,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/runtime@^7.8.4": +"@babel/runtime@^7.17.9", "@babel/runtime@^7.8.4": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== @@ -1330,7 +1330,7 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== -"@typescript-eslint/eslint-plugin@*": +"@typescript-eslint/eslint-plugin@^5.11.0": version "5.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.22.0.tgz#7b52a0de2e664044f28b36419210aea4ab619e2a" integrity sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg== @@ -1345,7 +1345,7 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/parser@*": +"@typescript-eslint/parser@^5.11.0": version "5.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.22.0.tgz#7bedf8784ef0d5d60567c5ba4ce162460e70c178" integrity sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ== @@ -3939,7 +3939,7 @@ eslint-config-xo-lass@^1.0.6: resolved "https://registry.yarnpkg.com/eslint-config-xo-lass/-/eslint-config-xo-lass-1.0.6.tgz#6c27c2b694aea2e3ebc49ab50b4699ce747a5a5b" integrity sha512-C/oftF0mIBWuuj9tiy41qS1EmpXryEu9oVmoujNOnC31Ouyhvj8rQ4RgRn7QMBGs0vSbShq9TAZyLb3rPh2Ozw== -eslint-config-xo-typescript@*: +eslint-config-xo-typescript@^0.50.0: version "0.50.0" resolved "https://registry.yarnpkg.com/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.50.0.tgz#59a0a704fbd667592ca3ddcc599b9f8c855e4ebe" integrity sha512-Ru2tXB8y2w9fFHLm4v2AVfY6P81UbfEuDZuxEpeXlfV65Ezlk0xO4nBaT899ojIFkWfr60rP9Ye4CdVUUT1UYg==