This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kbn-test] upgrade to babel7, add ts support (elastic#32168) (elastic…
…#32224) * [babel] add babel7 compatible node preset * [kbn-test] upgrade to babel7 preset
- Loading branch information
Spencer
authored
Feb 28, 2019
1 parent
5b2dcbe
commit dae372c
Showing
7 changed files
with
166 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
module.exports = { | ||
presets: [ | ||
require.resolve('@babel/preset-react'), | ||
require.resolve('@babel/preset-typescript'), | ||
], | ||
plugins: [ | ||
require.resolve('babel7-plugin-add-module-exports'), | ||
// stage 3 | ||
require.resolve('@babel/plugin-proposal-async-generator-functions'), | ||
require.resolve('@babel/plugin-proposal-object-rest-spread'), | ||
|
||
// the class properties proposal was merged with the private fields proposal | ||
// into the "class fields" proposal. Babel doesn't support this combined | ||
// proposal yet, which includes private field, so this transform is | ||
// TECHNICALLY stage 2, but for all intents and purposes it's stage 3 | ||
// | ||
// See https://github.com/babel/proposals/issues/12 for progress | ||
require.resolve('@babel/plugin-proposal-class-properties'), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
module.exports = () => ({ | ||
presets: [ | ||
[ | ||
require.resolve('@babel/preset-env'), | ||
{ | ||
targets: { | ||
// only applies the necessary transformations based on the | ||
// current node.js processes version. For example: running | ||
// `nvm install 8 && node ./src/cli` will run kibana in node | ||
// version 8 and babel will stop transpiling async/await | ||
// because they are supported in the "current" version of node | ||
node: 'current', | ||
}, | ||
|
||
// replaces `import "babel-polyfill"` with a list of require statements | ||
// for just the polyfills that the target versions don't already supply | ||
// on their own | ||
useBuiltIns: 'entry', | ||
}, | ||
], | ||
require('./common_preset_7'), | ||
], | ||
plugins: [ | ||
[ | ||
require.resolve('babel-plugin-transform-define'), | ||
{ | ||
'global.__BUILT_WITH_BABEL__': 'true' | ||
} | ||
] | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
module.exports = { | ||
presets: ['@kbn/babel-preset/node_preset_7'], | ||
ignore: ['**/*.test.js'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3084,7 +3084,7 @@ astral-regex@^1.0.0: | |
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" | ||
integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== | ||
|
||
async-each@^1.0.0: | ||
async-each@^1.0.0, async-each@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" | ||
integrity sha1-GdOGodntxufByF04iu28xW0zYC0= | ||
|
@@ -3673,12 +3673,12 @@ babel-plugin-transform-class-properties@^6.24.1: | |
babel-runtime "^6.22.0" | ||
babel-template "^6.24.1" | ||
|
||
babel-plugin-transform-define@^1.3.0: | ||
version "1.3.0" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-1.3.0.tgz#94c5f9459c810c738cc7c50cbd44a31829d6f319" | ||
integrity sha1-lMX5RZyBDHOMx8UMvUSjGCnW8xk= | ||
babel-plugin-transform-define@^1.3.1: | ||
version "1.3.1" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-1.3.1.tgz#b21b7bad3b84cf8e3f07cdc8c660b99cbbc01213" | ||
integrity sha512-JXZ1xE9jIbKCGYZ4wbSMPSI5mdS4DRLi5+SkTHgZqWn5YIf/EucykkzUsPmzJlpkX8fsMVdLnA5vt/LvT97Zbg== | ||
dependencies: | ||
lodash "4.17.4" | ||
lodash "^4.17.11" | ||
traverse "0.6.6" | ||
|
||
babel-plugin-transform-es2015-arrow-functions@^6.22.0: | ||
|
@@ -4151,6 +4151,13 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26 | |
lodash "^4.17.4" | ||
to-fast-properties "^1.0.3" | ||
|
||
"babel7-plugin-add-module-exports@npm:babel-plugin-add-module-exports@^1.0.0": | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.0.tgz#72b5424d941a336c6a35357f373d8b8366263031" | ||
integrity sha512-m0sMxPL4FaN2K69GQgaRJa4Ny15qKSdoknIcpN+gz+NaJlAW9pge/povs13tPYsKDboflrEQC+/3kfIsONBTaw== | ||
optionalDependencies: | ||
chokidar "^2.0.4" | ||
|
||
[email protected]: | ||
version "7.0.0-beta.47" | ||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.47.tgz#6d1fa44f0abec41ab7c780481e62fd9aafbdea80" | ||
|
@@ -4520,35 +4527,16 @@ braces@^1.8.2: | |
preserve "^0.2.0" | ||
repeat-element "^1.1.2" | ||
|
||
braces@^2.3.0: | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.0.tgz#a46941cb5fb492156b3d6a656e06c35364e3e66e" | ||
integrity sha512-P4O8UQRdGiMLWSizsApmXVQDBS6KCt7dSexgLKBmH5Hr1CZq7vsnscFh8oR1sP1ab1Zj0uCHCEzZeV6SfUf3rA== | ||
dependencies: | ||
arr-flatten "^1.1.0" | ||
array-unique "^0.3.2" | ||
define-property "^1.0.0" | ||
extend-shallow "^2.0.1" | ||
fill-range "^4.0.0" | ||
isobject "^3.0.1" | ||
repeat-element "^1.1.2" | ||
snapdragon "^0.8.1" | ||
snapdragon-node "^2.0.1" | ||
split-string "^3.0.2" | ||
to-regex "^3.0.1" | ||
|
||
braces@^2.3.1: | ||
version "2.3.1" | ||
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" | ||
integrity sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ== | ||
braces@^2.3.0, braces@^2.3.1, braces@^2.3.2: | ||
version "2.3.2" | ||
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" | ||
integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== | ||
dependencies: | ||
arr-flatten "^1.1.0" | ||
array-unique "^0.3.2" | ||
define-property "^1.0.0" | ||
extend-shallow "^2.0.1" | ||
fill-range "^4.0.0" | ||
isobject "^3.0.1" | ||
kind-of "^6.0.2" | ||
repeat-element "^1.1.2" | ||
snapdragon "^0.8.1" | ||
snapdragon-node "^2.0.1" | ||
|
@@ -5320,44 +5308,24 @@ chokidar@^1.6.1: | |
optionalDependencies: | ||
fsevents "^1.0.0" | ||
|
||
chokidar@^2.0.0, chokidar@^2.0.3: | ||
version "2.0.4" | ||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" | ||
integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== | ||
dependencies: | ||
anymatch "^2.0.0" | ||
async-each "^1.0.0" | ||
braces "^2.3.0" | ||
glob-parent "^3.1.0" | ||
inherits "^2.0.1" | ||
is-binary-path "^1.0.0" | ||
is-glob "^4.0.0" | ||
lodash.debounce "^4.0.8" | ||
normalize-path "^2.1.1" | ||
path-is-absolute "^1.0.0" | ||
readdirp "^2.0.0" | ||
upath "^1.0.5" | ||
optionalDependencies: | ||
fsevents "^1.2.2" | ||
|
||
chokidar@^2.0.2: | ||
version "2.0.2" | ||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.2.tgz#4dc65139eeb2714977735b6a35d06e97b494dfd7" | ||
integrity sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw== | ||
chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.0.4: | ||
version "2.1.2" | ||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.2.tgz#9c23ea40b01638439e0513864d362aeacc5ad058" | ||
integrity sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg== | ||
dependencies: | ||
anymatch "^2.0.0" | ||
async-each "^1.0.0" | ||
braces "^2.3.0" | ||
async-each "^1.0.1" | ||
braces "^2.3.2" | ||
glob-parent "^3.1.0" | ||
inherits "^2.0.1" | ||
inherits "^2.0.3" | ||
is-binary-path "^1.0.0" | ||
is-glob "^4.0.0" | ||
normalize-path "^2.1.1" | ||
normalize-path "^3.0.0" | ||
path-is-absolute "^1.0.0" | ||
readdirp "^2.0.0" | ||
upath "^1.0.0" | ||
readdirp "^2.2.1" | ||
upath "^1.1.0" | ||
optionalDependencies: | ||
fsevents "^1.0.0" | ||
fsevents "^1.2.7" | ||
|
||
chownr@^1.0.1: | ||
version "1.0.1" | ||
|
@@ -9577,10 +9545,10 @@ fs.realpath@^1.0.0: | |
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" | ||
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= | ||
|
||
fsevents@^1.0.0, fsevents@^1.2.2, fsevents@^1.2.3: | ||
version "1.2.4" | ||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" | ||
integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== | ||
fsevents@^1.0.0, fsevents@^1.2.3, fsevents@^1.2.7: | ||
version "1.2.7" | ||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" | ||
integrity sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw== | ||
dependencies: | ||
nan "^2.9.2" | ||
node-pre-gyp "^0.10.0" | ||
|
@@ -14235,27 +14203,12 @@ lodash.uniqby@^4.7.0: | |
resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" | ||
integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= | ||
|
||
[email protected], lodash@^4.0.1, lodash@^4.13.1, lodash@^4.14.0: | ||
version "4.17.4" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" | ||
integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4= | ||
|
||
lodash@^3.10.0, lodash@^3.10.1, lodash@^3.3.1, lodash@^3.8.0, lodash@~3.10.1: | ||
version "3.10.1" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" | ||
integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= | ||
|
||
lodash@^4.0.0, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@~4.17.10: | ||
version "4.17.10" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" | ||
integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== | ||
|
||
lodash@^4.11.1, lodash@^4.17.2, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.1, lodash@^4.8.2, lodash@~4.17.5: | ||
version "4.17.5" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" | ||
integrity sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw== | ||
|
||
lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4: | ||
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.1, lodash@^4.8.2, lodash@~4.17.10, lodash@~4.17.5: | ||
version "4.17.11" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" | ||
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== | ||
|
@@ -18203,15 +18156,14 @@ readdir-scoped-modules@^1.0.0: | |
graceful-fs "^4.1.2" | ||
once "^1.3.0" | ||
|
||
readdirp@^2.0.0: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" | ||
integrity sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg= | ||
readdirp@^2.0.0, readdirp@^2.2.1: | ||
version "2.2.1" | ||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" | ||
integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== | ||
dependencies: | ||
graceful-fs "^4.1.2" | ||
minimatch "^3.0.2" | ||
graceful-fs "^4.1.11" | ||
micromatch "^3.1.10" | ||
readable-stream "^2.0.2" | ||
set-immediate-shim "^1.0.1" | ||
|
||
readline2@^1.0.1: | ||
version "1.0.1" | ||
|
@@ -19452,7 +19404,7 @@ set-getter@^0.1.0: | |
dependencies: | ||
to-object-path "^0.3.0" | ||
|
||
set-immediate-shim@^1.0.0, set-immediate-shim@^1.0.1: | ||
set-immediate-shim@^1.0.0: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" | ||
integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= | ||
|
@@ -22200,7 +22152,7 @@ unzip-response@^2.0.1: | |
resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" | ||
integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= | ||
|
||
upath@^1.0.0, upath@^1.0.5: | ||
upath@^1.1.0: | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" | ||
integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== | ||
|