| @ -1 +0,0 @@ | |||||
| ../acorn/bin/acorn | |||||
| @ -1 +0,0 @@ | |||||
| ../ansi-html/bin/ansi-html | |||||
| @ -1 +0,0 @@ | |||||
| ../atob/bin/atob.js | |||||
| @ -1 +0,0 @@ | |||||
| ../autoprefixer/bin/autoprefixer | |||||
| @ -1 +0,0 @@ | |||||
| ../browserslist/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../cross-env/dist/bin/cross-env.js | |||||
| @ -1 +0,0 @@ | |||||
| ../cross-env/dist/bin/cross-env-shell.js | |||||
| @ -1 +0,0 @@ | |||||
| ../cssesc/bin/cssesc | |||||
| @ -1 +0,0 @@ | |||||
| ../errno/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../esprima/bin/esparse.js | |||||
| @ -1 +0,0 @@ | |||||
| ../esprima/bin/esvalidate.js | |||||
| @ -1 +0,0 @@ | |||||
| ../he/bin/he | |||||
| @ -1 +0,0 @@ | |||||
| ../html-minifier/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../import-local/fixtures/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../js-yaml/bin/js-yaml.js | |||||
| @ -1 +0,0 @@ | |||||
| ../jsesc/bin/jsesc | |||||
| @ -1 +0,0 @@ | |||||
| ../json5/lib/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../loose-envify/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../miller-rabin/bin/miller-rabin | |||||
| @ -1 +0,0 @@ | |||||
| ../mime/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../mkdirp/bin/cmd.js | |||||
| @ -1 +0,0 @@ | |||||
| ../multicast-dns/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../@babel/parser/bin/babel-parser.js | |||||
| @ -1 +0,0 @@ | |||||
| ../prettier/bin-prettier.js | |||||
| @ -1 +0,0 @@ | |||||
| ../regjsparser/bin/parser | |||||
| @ -1 +0,0 @@ | |||||
| ../rimraf/bin.js | |||||
| @ -1 +0,0 @@ | |||||
| ../sass/sass.js | |||||
| @ -1 +0,0 @@ | |||||
| ../semver/bin/semver | |||||
| @ -1 +0,0 @@ | |||||
| ../sha.js/bin.js | |||||
| @ -1 +0,0 @@ | |||||
| ../svgo/bin/svgo | |||||
| @ -1 +0,0 @@ | |||||
| ../terser/bin/uglifyjs | |||||
| @ -1 +0,0 @@ | |||||
| ../uglify-js/bin/uglifyjs | |||||
| @ -1 +0,0 @@ | |||||
| ../uuid/bin/uuid | |||||
| @ -1 +0,0 @@ | |||||
| ../webpack/bin/webpack.js | |||||
| @ -1 +0,0 @@ | |||||
| ../webpack-cli/bin/cli.js | |||||
| @ -1 +0,0 @@ | |||||
| ../webpack-dev-server/bin/webpack-dev-server.js | |||||
| @ -1 +0,0 @@ | |||||
| ../which/bin/which | |||||
| @ -1,2 +0,0 @@ | |||||
| 280c71ac69fac0abf5640b8862a04c4cad8e729f {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"da0b4d61c6394ce766e844f9ec36f0d5\"}","integrity":"sha512-yyNHQYsHRWG8Z+5eaQ9qn7ONhkga6EzE497O7T1uE6FN9O4cQADQyBABudomZHa1mlBeDLxuwPYQaPbyMlN2Zw==","time":1578664478094,"size":54091} | |||||
| @ -1,2 +0,0 @@ | |||||
| a16c53de3b6e4877e1a3a3470759af44e82dcebe {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"6f6d9ca9f9fb8bcf0a9df4f8500bcefc\"}","integrity":"sha512-OAPkj6q/Yx9LxFcuHQbr9Z3kopASQUrAkeTKHAUe3YkGC5leZVdsqX72TfkvazYh7sdTOdhs+7lgBgKiSXzzEQ==","time":1578664318163,"size":53795} | |||||
| @ -1,2 +0,0 @@ | |||||
| 05c993d5b97af7eeefa10a08c7bbb5e2e275ee9d {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"dc0d163932c3d68c23d530ff63103ba1\"}","integrity":"sha512-l5rxHlridyYCKAHFZo6wBDUjRXV96YoyXYTt1inqIsvNw242KBNpdS7uguAmZmR+Wlzx62YEjhXf3TQ9usKaBg==","time":1578668489277,"size":61753} | |||||
| @ -1,2 +0,0 @@ | |||||
| 36ce042627813dfad6ca70b56a851323d3ce48aa {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"34a25921a05b0a610921cefeb12bb832\"}","integrity":"sha512-4FGWQm/avJ2hsrXE12/YuVhdopAEH9VJW1AvjQRq2SbiYONwLfWrtB33ZXNfIkLpZM6z/EX8Hw8IblxHzhyuew==","time":1578663980862,"size":53732} | |||||
| @ -1,2 +0,0 @@ | |||||
| c66d73e63d00b90f037d9faade8cce5e8d445918 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"f0a48a086a54d30e70bab80df301011a\"}","integrity":"sha512-ektfjyAQMqN3s8mM2X8aoyWQ+a0L/LQ5uwlIY9TRLmKS1LHIvoBd9iEU8lL3bnQjNvEvr/6ArM6wZZweC9dAvQ==","time":1578666581489,"size":58951} | |||||
| @ -1,2 +0,0 @@ | |||||
| 49bc17f7b48ea257880d13891f534022512cffda {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"c01d57e2829797e71506cdebecaf7993\"}","integrity":"sha512-EjCxj0/bR/4cDWtWGB57Jp/3rJUt+BbmbN1CNox1vxWa2KB7ZEHBgp5gsnhmfqdEHDloyvr9LQkMOUGh6/3RHQ==","time":1578664442545,"size":54083} | |||||
| @ -1,2 +0,0 @@ | |||||
| 1ccaa6d5e535e1d8742f59a7034be98311cdeda3 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"8f9f03c395c2183799236ecef195db52\"}","integrity":"sha512-30RqKj7Wn8+e3qZjukwHr0/mx2eAcHQiONhEuWf65nCAdCbfgowLtP2O6hyFt7oro/0ofDIvsKl143da41glJw==","time":1578669253449,"size":62142} | |||||
| @ -1,2 +0,0 @@ | |||||
| 51ccb19c9787a3d462532046cbdf8aec520d57b4 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"4ef8f2851966692a861c3ebc06d9fd19\"}","integrity":"sha512-2pCIXKRq/nxuxW8hgP5yyONxw1VyDtE5RJltklm7gLoneEo0WAS7CshT6JEOv7KGWb/J9fMiMuH3MZpiw3yE8g==","time":1578663962252,"size":52675} | |||||
| @ -1,2 +0,0 @@ | |||||
| d35198850d78dff6e82cc5b5a1e1d6dcf6bbbf9e {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"be176bec3cee98dd4feee4bae073dc75\"}","integrity":"sha512-DMXE/R77XqQUhVnxhysgFk4w+0muSlB4rCk7OOkFX2GT9x86UQtzVd5uUqbtvgiWU8DPHbkv46e0u+jMQu0xXg==","time":1578666601282,"size":59044} | |||||
| @ -1,2 +0,0 @@ | |||||
| 579fd59082aaf54f91605a3cf995fcfed622c7b3 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"27833e4ca3cde3f15110ad1361a32fcc\"}","integrity":"sha512-032H8NGM8HMQzXI5DORgOy0xwiMhxhs8sCVohv1gfWor087lHYLky6CpMgIl1DWFreHpSBOlpLn6kZFsAB6n0A==","time":1578666029044,"size":54231} | |||||
| @ -1,2 +0,0 @@ | |||||
| c253b7ed6e7d61740f333d95ad72b00e068bb14f {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"0a7c72186708f0fc5f9e55c47eb9c549\"}","integrity":"sha512-iQWFlF1RMLmzghjgbgJEgcxHOL54Q4+sLuHruS1yc3JjxYPjGKTCe7pari8cHawoCszsOP+0yQJInjlRefLUfw==","time":1578668594186,"size":61852} | |||||
| @ -1,2 +0,0 @@ | |||||
| 7f63b7aa1cb683ed9d25814c5f70ae88593c86e0 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"95030c1d654b5a52508ece5269eac823\"}","integrity":"sha512-t9lu0+Tj2QIP+/ykKaJLmfLAzGnd0Gn+pTbQe27jiPleF3dKy/wJsSjD6b72bkDgU4Kh626AfU7MyodPywbzhw==","time":1578664422337,"size":54071} | |||||
| @ -1,2 +0,0 @@ | |||||
| 9d73f6661f04439d7f1945da1ac8117e4d6f1eec {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"70acdcf9d5da6d9d1da800c071ca997a\"}","integrity":"sha512-PlHnfynxmOqqCKOgt5MbXCRSf8EoUv3KH4G6l3vMHakrCTh7cQRsryPq6j4wZlD8qV+gWIjx9Bd43d7vKu+YmA==","time":1578669227609,"size":62115} | |||||
| @ -1,2 +0,0 @@ | |||||
| 0d1543eda8dc5f37d0c766348850bb668eeba85e {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"71230ce24baf47e612eaa5460f5854e4\"}","integrity":"sha512-CMfcxEX4ddhPI8xOEIXbbKnsk9NxWSudYV7HLWnjzjrld0ryrmqgqUUcNRoDV3tHb8T8ysXFD/FbXU5DlD0i6w==","time":1578667606990,"size":61720} | |||||
| @ -1,2 +0,0 @@ | |||||
| 45190e37f983291166c5e7ffd7022ba5da9504ae {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"5c87b4f6d16e4548339ada7d5bb63ea4\"}","integrity":"sha512-OzWyObzmFJ9NG7J5m7jAXXFyR03vgmmiijz40wSvCc8buGOghI8YUM27W4B1Gh2KNL+/71n3dX0HYaC87uxxhQ==","time":1578667639204,"size":61710} | |||||
| @ -1,2 +0,0 @@ | |||||
| d9ff2701f0b61bd862be034374eb591256f257ed {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"e057e9ef7eac8e050bf8a0bfc9b82264\"}","integrity":"sha512-A6lknE23oOrlaqZatG0l+lcgR5MA44A+j86qqtwk+XEGSY2ZuGqaQ6Ug3FdTRllaBj/n/papJ5HriQq1ip69xw==","time":1578666065423,"size":58266} | |||||
| @ -1,2 +0,0 @@ | |||||
| a55ca953010205d4e1505f821e1eb2a3ba35bbca {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"67a060710249db15cc2d5dc15f393d25\"}","integrity":"sha512-necWSbSDGA5mKzLpqz/f3bkpYaVUiU8Y98ZZZjGHIOH6hnuRfsOysScQOsCeHFn8ohy0TMtctvUZU4Vh3Dx94Q==","time":1578664364921,"size":54032} | |||||
| @ -1,2 +0,0 @@ | |||||
| 7b01b57c91a37064026d5e48b15c2901d27b3671 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"29a9d2e39cad732550e7437cd51b0325\"}","integrity":"sha512-5mVHFZOaoxCXI+8h8xHKxmxQZgCMqGvk0pR1V8LZyWHKXrh0xkV+uImoSZMQ+l4g1d/1FYmZFgeXhI4QuPczYw==","time":1578664325951,"size":54019} | |||||
| @ -1,2 +0,0 @@ | |||||
| c776243eef26f27905bbd9a461d18b8f43bd36a5 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"2500b3494acd12ce20d613d8ed178884\"}","integrity":"sha512-CVQcxNMsx2EmJvDmQ6xrEehDxK7skCcDSF1HAIPXMRmspPT8W8n3ugKVd0onkQJootFSwHWVWj0fEgOydao9og==","time":1578669184267,"size":62139} | |||||
| @ -1,2 +0,0 @@ | |||||
| 6b9aae398db1c136aaa19dba6344bdbaebcd444a {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"f36ed7809872a1b92e9a3f4618c3dfe9\"}","integrity":"sha512-8S6UamvdQlhrtIIfzb0NxWIz5MTb2Hu+H+G+ySXAUPFQRKLs6LhJKYc3a4ZvxzP98VkrVFurCtDVK3lMhoYU4Q==","time":1578663913431,"size":54711} | |||||
| @ -1,22 +0,0 @@ | |||||
| MIT License | |||||
| Copyright (c) 2014-present Sebastian McKenzie and other contributors | |||||
| Permission is hereby granted, free of charge, to any person obtaining | |||||
| a copy of this software and associated documentation files (the | |||||
| "Software"), to deal in the Software without restriction, including | |||||
| without limitation the rights to use, copy, modify, merge, publish, | |||||
| distribute, sublicense, and/or sell copies of the Software, and to | |||||
| permit persons to whom the Software is furnished to do so, subject to | |||||
| the following conditions: | |||||
| The above copyright notice and this permission notice shall be | |||||
| included in all copies or substantial portions of the Software. | |||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
| @ -1,19 +0,0 @@ | |||||
| # @babel/code-frame | |||||
| > Generate errors that contain a code frame that point to source locations. | |||||
| See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information. | |||||
| ## Install | |||||
| Using npm: | |||||
| ```sh | |||||
| npm install --save-dev @babel/code-frame | |||||
| ``` | |||||
| or using yarn: | |||||
| ```sh | |||||
| yarn add @babel/code-frame --dev | |||||
| ``` | |||||
| @ -1,173 +0,0 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.codeFrameColumns = codeFrameColumns; | |||||
| exports.default = _default; | |||||
| function _highlight() { | |||||
| const data = _interopRequireWildcard(require("@babel/highlight")); | |||||
| _highlight = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | |||||
| let deprecationWarningShown = false; | |||||
| function getDefs(chalk) { | |||||
| return { | |||||
| gutter: chalk.grey, | |||||
| marker: chalk.red.bold, | |||||
| message: chalk.red.bold | |||||
| }; | |||||
| } | |||||
| const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; | |||||
| function getMarkerLines(loc, source, opts) { | |||||
| const startLoc = Object.assign({ | |||||
| column: 0, | |||||
| line: -1 | |||||
| }, loc.start); | |||||
| const endLoc = Object.assign({}, startLoc, loc.end); | |||||
| const { | |||||
| linesAbove = 2, | |||||
| linesBelow = 3 | |||||
| } = opts || {}; | |||||
| const startLine = startLoc.line; | |||||
| const startColumn = startLoc.column; | |||||
| const endLine = endLoc.line; | |||||
| const endColumn = endLoc.column; | |||||
| let start = Math.max(startLine - (linesAbove + 1), 0); | |||||
| let end = Math.min(source.length, endLine + linesBelow); | |||||
| if (startLine === -1) { | |||||
| start = 0; | |||||
| } | |||||
| if (endLine === -1) { | |||||
| end = source.length; | |||||
| } | |||||
| const lineDiff = endLine - startLine; | |||||
| const markerLines = {}; | |||||
| if (lineDiff) { | |||||
| for (let i = 0; i <= lineDiff; i++) { | |||||
| const lineNumber = i + startLine; | |||||
| if (!startColumn) { | |||||
| markerLines[lineNumber] = true; | |||||
| } else if (i === 0) { | |||||
| const sourceLength = source[lineNumber - 1].length; | |||||
| markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; | |||||
| } else if (i === lineDiff) { | |||||
| markerLines[lineNumber] = [0, endColumn]; | |||||
| } else { | |||||
| const sourceLength = source[lineNumber - i].length; | |||||
| markerLines[lineNumber] = [0, sourceLength]; | |||||
| } | |||||
| } | |||||
| } else { | |||||
| if (startColumn === endColumn) { | |||||
| if (startColumn) { | |||||
| markerLines[startLine] = [startColumn, 0]; | |||||
| } else { | |||||
| markerLines[startLine] = true; | |||||
| } | |||||
| } else { | |||||
| markerLines[startLine] = [startColumn, endColumn - startColumn]; | |||||
| } | |||||
| } | |||||
| return { | |||||
| start, | |||||
| end, | |||||
| markerLines | |||||
| }; | |||||
| } | |||||
| function codeFrameColumns(rawLines, loc, opts = {}) { | |||||
| const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); | |||||
| const chalk = (0, _highlight().getChalk)(opts); | |||||
| const defs = getDefs(chalk); | |||||
| const maybeHighlight = (chalkFn, string) => { | |||||
| return highlighted ? chalkFn(string) : string; | |||||
| }; | |||||
| const lines = rawLines.split(NEWLINE); | |||||
| const { | |||||
| start, | |||||
| end, | |||||
| markerLines | |||||
| } = getMarkerLines(loc, lines, opts); | |||||
| const hasColumns = loc.start && typeof loc.start.column === "number"; | |||||
| const numberMaxWidth = String(end).length; | |||||
| const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; | |||||
| let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { | |||||
| const number = start + 1 + index; | |||||
| const paddedNumber = ` ${number}`.slice(-numberMaxWidth); | |||||
| const gutter = ` ${paddedNumber} | `; | |||||
| const hasMarker = markerLines[number]; | |||||
| const lastMarkerLine = !markerLines[number + 1]; | |||||
| if (hasMarker) { | |||||
| let markerLine = ""; | |||||
| if (Array.isArray(hasMarker)) { | |||||
| const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); | |||||
| const numberOfMarkers = hasMarker[1] || 1; | |||||
| markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); | |||||
| if (lastMarkerLine && opts.message) { | |||||
| markerLine += " " + maybeHighlight(defs.message, opts.message); | |||||
| } | |||||
| } | |||||
| return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); | |||||
| } else { | |||||
| return ` ${maybeHighlight(defs.gutter, gutter)}${line}`; | |||||
| } | |||||
| }).join("\n"); | |||||
| if (opts.message && !hasColumns) { | |||||
| frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; | |||||
| } | |||||
| if (highlighted) { | |||||
| return chalk.reset(frame); | |||||
| } else { | |||||
| return frame; | |||||
| } | |||||
| } | |||||
| function _default(rawLines, lineNumber, colNumber, opts = {}) { | |||||
| if (!deprecationWarningShown) { | |||||
| deprecationWarningShown = true; | |||||
| const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; | |||||
| if (process.emitWarning) { | |||||
| process.emitWarning(message, "DeprecationWarning"); | |||||
| } else { | |||||
| const deprecationError = new Error(message); | |||||
| deprecationError.name = "DeprecationWarning"; | |||||
| console.warn(new Error(message)); | |||||
| } | |||||
| } | |||||
| colNumber = Math.max(colNumber, 0); | |||||
| const location = { | |||||
| start: { | |||||
| column: colNumber, | |||||
| line: lineNumber | |||||
| } | |||||
| }; | |||||
| return codeFrameColumns(rawLines, location, opts); | |||||
| } | |||||
| @ -1,101 +0,0 @@ | |||||
| { | |||||
| "_args": [ | |||||
| [ | |||||
| "@babel/code-frame@^7.5.5", | |||||
| "/home/herrhase/Workspace/tentakelfabrik/tiny-components/tiny-consent/node_modules/@babel/core" | |||||
| ] | |||||
| ], | |||||
| "_from": "@babel/code-frame@>=7.5.5 <8.0.0", | |||||
| "_hasShrinkwrap": false, | |||||
| "_id": "@babel/code-frame@7.5.5", | |||||
| "_inCache": true, | |||||
| "_installable": true, | |||||
| "_location": "/@babel/code-frame", | |||||
| "_nodeVersion": "11.14.0", | |||||
| "_npmOperationalInternal": { | |||||
| "host": "s3://npm-registry-packages", | |||||
| "tmp": "tmp/code-frame_7.5.5_1563398486466_0.4030239254922583" | |||||
| }, | |||||
| "_npmUser": { | |||||
| "email": "nicolo.ribaudo@gmail.com", | |||||
| "name": "nicolo-ribaudo" | |||||
| }, | |||||
| "_npmVersion": "lerna/3.15.0/node@v11.14.0+x64 (linux)", | |||||
| "_phantomChildren": {}, | |||||
| "_requested": { | |||||
| "name": "@babel/code-frame", | |||||
| "raw": "@babel/code-frame@^7.5.5", | |||||
| "rawSpec": "^7.5.5", | |||||
| "scope": "@babel", | |||||
| "spec": ">=7.5.5 <8.0.0", | |||||
| "type": "range" | |||||
| }, | |||||
| "_requiredBy": [ | |||||
| "/@babel/core", | |||||
| "/@babel/template", | |||||
| "/@babel/traverse" | |||||
| ], | |||||
| "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | |||||
| "_shasum": "bc0782f6d69f7b7d49531219699b988f669a8f9d", | |||||
| "_shrinkwrap": null, | |||||
| "_spec": "@babel/code-frame@^7.5.5", | |||||
| "_where": "/home/herrhase/Workspace/tentakelfabrik/tiny-components/tiny-consent/node_modules/@babel/core", | |||||
| "author": { | |||||
| "email": "sebmck@gmail.com", | |||||
| "name": "Sebastian McKenzie" | |||||
| }, | |||||
| "dependencies": { | |||||
| "@babel/highlight": "^7.0.0" | |||||
| }, | |||||
| "description": "Generate errors that contain a code frame that point to source locations.", | |||||
| "devDependencies": { | |||||
| "chalk": "^2.0.0", | |||||
| "strip-ansi": "^4.0.0" | |||||
| }, | |||||
| "directories": {}, | |||||
| "dist": { | |||||
| "fileCount": 4, | |||||
| "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", | |||||
| "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL5FXCRA9TVsSAnZWagAAF7wP/RXhso8+0gUvcJZhZ6vt\nSrXimIBf82u7nbBEU6DhWqhVDcSGUext1Jy+U2g1eVEiCbJTb2VGcPNa5gKm\nagXXrbRJiTCZaUEQaIURGHA7+Z78UkJ2G0EA2WqSlO7ttX4pMpNYNKDZsrNz\n47kROLsb40fLtpeolfEJe82XxfmCvDej1Y4xVQ+vKaadDZ4JRnGLry4pPDkS\nWTW1StiOksrggTDiZo90LwbA5jOWm+FBgT7vohSDUhlf7aOaIirQ3EljOOYM\nr7RT7HDkVhpKAEtigJYwYZnOl4eJjWjTiFQ12w90itRC5xR6rFSpxVkQhowu\nZmu9Z2vWJiDv9gPpsrUtfMMnv96C/pWKlj+tZDXGqr44QPP+VPA+iuq1BR1V\n4DLN9jKrAEJkig6R1xqtWxyN6tkUARrk/0jZA2Ep26oy+DDa0ybTfWt5wMcq\nU6wGq8qJZe0buZbiGQokRufxkybMCgrg7F7dR79Hmq7PFpqbJyneGJ+26qna\nZI2G/aYNDudT2eJNcUTkAjUsBz+howa4C01tFsukNfM9DKH6DPfrYLe4VKnn\n30qBEvM1/8Gj9b4LaP+f6rLP1rSogivq+IH8ALQpzOfg41PHxczqik8veMl4\nB8MeIfrErTluUSJxMiTaPj34fvfaOyGgmSoHrGTURIYF7+Yw6lGpkWrKaHsN\n4o/B\r\n=BBzr\r\n-----END PGP SIGNATURE-----\r\n", | |||||
| "shasum": "bc0782f6d69f7b7d49531219699b988f669a8f9d", | |||||
| "tarball": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | |||||
| "unpackedSize": 7312 | |||||
| }, | |||||
| "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", | |||||
| "homepage": "https://babeljs.io/", | |||||
| "license": "MIT", | |||||
| "main": "lib/index.js", | |||||
| "maintainers": [ | |||||
| { | |||||
| "name": "danez", | |||||
| "email": "daniel@tschinder.de" | |||||
| }, | |||||
| { | |||||
| "name": "existentialism", | |||||
| "email": "bng412@gmail.com" | |||||
| }, | |||||
| { | |||||
| "name": "hzoo", | |||||
| "email": "hi@henryzoo.com" | |||||
| }, | |||||
| { | |||||
| "name": "loganfsmyth", | |||||
| "email": "loganfsmyth@gmail.com" | |||||
| }, | |||||
| { | |||||
| "name": "nicolo-ribaudo", | |||||
| "email": "nicolo.ribaudo@gmail.com" | |||||
| } | |||||
| ], | |||||
| "name": "@babel/code-frame", | |||||
| "optionalDependencies": {}, | |||||
| "publishConfig": { | |||||
| "access": "public" | |||||
| }, | |||||
| "readme": "ERROR: No README data found!", | |||||
| "repository": { | |||||
| "type": "git", | |||||
| "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" | |||||
| }, | |||||
| "version": "7.5.5" | |||||
| } | |||||
| @ -1,22 +0,0 @@ | |||||
| MIT License | |||||
| Copyright (c) 2014-present Sebastian McKenzie and other contributors | |||||
| Permission is hereby granted, free of charge, to any person obtaining | |||||
| a copy of this software and associated documentation files (the | |||||
| "Software"), to deal in the Software without restriction, including | |||||
| without limitation the rights to use, copy, modify, merge, publish, | |||||
| distribute, sublicense, and/or sell copies of the Software, and to | |||||
| permit persons to whom the Software is furnished to do so, subject to | |||||
| the following conditions: | |||||
| The above copyright notice and this permission notice shall be | |||||
| included in all copies or substantial portions of the Software. | |||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
| @ -1,19 +0,0 @@ | |||||
| # @babel/core | |||||
| > Babel compiler core. | |||||
| See our website [@babel/core](https://babeljs.io/docs/en/next/babel-core.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. | |||||
| ## Install | |||||
| Using npm: | |||||
| ```sh | |||||
| npm install --save-dev @babel/core | |||||
| ``` | |||||
| or using yarn: | |||||
| ```sh | |||||
| yarn add @babel/core --dev | |||||
| ``` | |||||
| @ -1,198 +0,0 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.makeStrongCache = makeStrongCache; | |||||
| exports.makeWeakCache = makeWeakCache; | |||||
| exports.assertSimpleType = assertSimpleType; | |||||
| function makeStrongCache(handler) { | |||||
| return makeCachedFunction(new Map(), handler); | |||||
| } | |||||
| function makeWeakCache(handler) { | |||||
| return makeCachedFunction(new WeakMap(), handler); | |||||
| } | |||||
| function makeCachedFunction(callCache, handler) { | |||||
| return function cachedFunction(arg, data) { | |||||
| let cachedValue = callCache.get(arg); | |||||
| if (cachedValue) { | |||||
| for (const { | |||||
| value, | |||||
| valid | |||||
| } of cachedValue) { | |||||
| if (valid(data)) return value; | |||||
| } | |||||
| } | |||||
| const cache = new CacheConfigurator(data); | |||||
| const value = handler(arg, cache); | |||||
| if (!cache.configured()) cache.forever(); | |||||
| cache.deactivate(); | |||||
| switch (cache.mode()) { | |||||
| case "forever": | |||||
| cachedValue = [{ | |||||
| value, | |||||
| valid: () => true | |||||
| }]; | |||||
| callCache.set(arg, cachedValue); | |||||
| break; | |||||
| case "invalidate": | |||||
| cachedValue = [{ | |||||
| value, | |||||
| valid: cache.validator() | |||||
| }]; | |||||
| callCache.set(arg, cachedValue); | |||||
| break; | |||||
| case "valid": | |||||
| if (cachedValue) { | |||||
| cachedValue.push({ | |||||
| value, | |||||
| valid: cache.validator() | |||||
| }); | |||||
| } else { | |||||
| cachedValue = [{ | |||||
| value, | |||||
| valid: cache.validator() | |||||
| }]; | |||||
| callCache.set(arg, cachedValue); | |||||
| } | |||||
| } | |||||
| return value; | |||||
| }; | |||||
| } | |||||
| class CacheConfigurator { | |||||
| constructor(data) { | |||||
| this._active = true; | |||||
| this._never = false; | |||||
| this._forever = false; | |||||
| this._invalidate = false; | |||||
| this._configured = false; | |||||
| this._pairs = []; | |||||
| this._data = data; | |||||
| } | |||||
| simple() { | |||||
| return makeSimpleConfigurator(this); | |||||
| } | |||||
| mode() { | |||||
| if (this._never) return "never"; | |||||
| if (this._forever) return "forever"; | |||||
| if (this._invalidate) return "invalidate"; | |||||
| return "valid"; | |||||
| } | |||||
| forever() { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._never) { | |||||
| throw new Error("Caching has already been configured with .never()"); | |||||
| } | |||||
| this._forever = true; | |||||
| this._configured = true; | |||||
| } | |||||
| never() { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._forever) { | |||||
| throw new Error("Caching has already been configured with .forever()"); | |||||
| } | |||||
| this._never = true; | |||||
| this._configured = true; | |||||
| } | |||||
| using(handler) { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._never || this._forever) { | |||||
| throw new Error("Caching has already been configured with .never or .forever()"); | |||||
| } | |||||
| this._configured = true; | |||||
| const key = handler(this._data); | |||||
| this._pairs.push([key, handler]); | |||||
| return key; | |||||
| } | |||||
| invalidate(handler) { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._never || this._forever) { | |||||
| throw new Error("Caching has already been configured with .never or .forever()"); | |||||
| } | |||||
| this._invalidate = true; | |||||
| this._configured = true; | |||||
| const key = handler(this._data); | |||||
| this._pairs.push([key, handler]); | |||||
| return key; | |||||
| } | |||||
| validator() { | |||||
| const pairs = this._pairs; | |||||
| return data => pairs.every(([key, fn]) => key === fn(data)); | |||||
| } | |||||
| deactivate() { | |||||
| this._active = false; | |||||
| } | |||||
| configured() { | |||||
| return this._configured; | |||||
| } | |||||
| } | |||||
| function makeSimpleConfigurator(cache) { | |||||
| function cacheFn(val) { | |||||
| if (typeof val === "boolean") { | |||||
| if (val) cache.forever();else cache.never(); | |||||
| return; | |||||
| } | |||||
| return cache.using(() => assertSimpleType(val())); | |||||
| } | |||||
| cacheFn.forever = () => cache.forever(); | |||||
| cacheFn.never = () => cache.never(); | |||||
| cacheFn.using = cb => cache.using(() => assertSimpleType(cb())); | |||||
| cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb())); | |||||
| return cacheFn; | |||||
| } | |||||
| function assertSimpleType(value) { | |||||
| if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { | |||||
| throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); | |||||
| } | |||||
| return value; | |||||
| } | |||||
| @ -1,439 +0,0 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.buildPresetChain = buildPresetChain; | |||||
| exports.buildRootChain = buildRootChain; | |||||
| exports.buildPresetChainWalker = void 0; | |||||
| function _path() { | |||||
| const data = _interopRequireDefault(require("path")); | |||||
| _path = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _debug() { | |||||
| const data = _interopRequireDefault(require("debug")); | |||||
| _debug = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| var _options = require("./validation/options"); | |||||
| var _patternToRegex = _interopRequireDefault(require("./pattern-to-regex")); | |||||
| var _files = require("./files"); | |||||
| var _caching = require("./caching"); | |||||
| var _configDescriptors = require("./config-descriptors"); | |||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |||||
| const debug = (0, _debug().default)("babel:config:config-chain"); | |||||
| function buildPresetChain(arg, context) { | |||||
| const chain = buildPresetChainWalker(arg, context); | |||||
| if (!chain) return null; | |||||
| return { | |||||
| plugins: dedupDescriptors(chain.plugins), | |||||
| presets: dedupDescriptors(chain.presets), | |||||
| options: chain.options.map(o => normalizeOptions(o)) | |||||
| }; | |||||
| } | |||||
| const buildPresetChainWalker = makeChainWalker({ | |||||
| init: arg => arg, | |||||
| root: preset => loadPresetDescriptors(preset), | |||||
| env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), | |||||
| overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index), | |||||
| overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName) | |||||
| }); | |||||
| exports.buildPresetChainWalker = buildPresetChainWalker; | |||||
| const loadPresetDescriptors = (0, _caching.makeWeakCache)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); | |||||
| const loadPresetEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); | |||||
| const loadPresetOverridesDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); | |||||
| const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); | |||||
| function buildRootChain(opts, context) { | |||||
| const programmaticChain = loadProgrammaticChain({ | |||||
| options: opts, | |||||
| dirname: context.cwd | |||||
| }, context); | |||||
| if (!programmaticChain) return null; | |||||
| let configFile; | |||||
| if (typeof opts.configFile === "string") { | |||||
| configFile = (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); | |||||
| } else if (opts.configFile !== false) { | |||||
| configFile = (0, _files.findRootConfig)(context.root, context.envName, context.caller); | |||||
| } | |||||
| let { | |||||
| babelrc, | |||||
| babelrcRoots | |||||
| } = opts; | |||||
| let babelrcRootsDirectory = context.cwd; | |||||
| const configFileChain = emptyChain(); | |||||
| if (configFile) { | |||||
| const validatedFile = validateConfigFile(configFile); | |||||
| const result = loadFileChain(validatedFile, context); | |||||
| if (!result) return null; | |||||
| if (babelrc === undefined) { | |||||
| babelrc = validatedFile.options.babelrc; | |||||
| } | |||||
| if (babelrcRoots === undefined) { | |||||
| babelrcRootsDirectory = validatedFile.dirname; | |||||
| babelrcRoots = validatedFile.options.babelrcRoots; | |||||
| } | |||||
| mergeChain(configFileChain, result); | |||||
| } | |||||
| const pkgData = typeof context.filename === "string" ? (0, _files.findPackageData)(context.filename) : null; | |||||
| let ignoreFile, babelrcFile; | |||||
| const fileChain = emptyChain(); | |||||
| if ((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { | |||||
| ({ | |||||
| ignore: ignoreFile, | |||||
| config: babelrcFile | |||||
| } = (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller)); | |||||
| if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { | |||||
| return null; | |||||
| } | |||||
| if (babelrcFile) { | |||||
| const result = loadFileChain(validateBabelrcFile(babelrcFile), context); | |||||
| if (!result) return null; | |||||
| mergeChain(fileChain, result); | |||||
| } | |||||
| } | |||||
| const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); | |||||
| return { | |||||
| plugins: dedupDescriptors(chain.plugins), | |||||
| presets: dedupDescriptors(chain.presets), | |||||
| options: chain.options.map(o => normalizeOptions(o)), | |||||
| ignore: ignoreFile || undefined, | |||||
| babelrc: babelrcFile || undefined, | |||||
| config: configFile || undefined | |||||
| }; | |||||
| } | |||||
| function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) { | |||||
| if (typeof babelrcRoots === "boolean") return babelrcRoots; | |||||
| const absoluteRoot = context.root; | |||||
| if (babelrcRoots === undefined) { | |||||
| return pkgData.directories.indexOf(absoluteRoot) !== -1; | |||||
| } | |||||
| let babelrcPatterns = babelrcRoots; | |||||
| if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns]; | |||||
| babelrcPatterns = babelrcPatterns.map(pat => { | |||||
| return typeof pat === "string" ? _path().default.resolve(babelrcRootsDirectory, pat) : pat; | |||||
| }); | |||||
| if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) { | |||||
| return pkgData.directories.indexOf(absoluteRoot) !== -1; | |||||
| } | |||||
| return babelrcPatterns.some(pat => { | |||||
| if (typeof pat === "string") { | |||||
| pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory); | |||||
| } | |||||
| return pkgData.directories.some(directory => { | |||||
| return matchPattern(pat, babelrcRootsDirectory, directory, context); | |||||
| }); | |||||
| }); | |||||
| } | |||||
| const validateConfigFile = (0, _caching.makeWeakCache)(file => ({ | |||||
| filepath: file.filepath, | |||||
| dirname: file.dirname, | |||||
| options: (0, _options.validate)("configfile", file.options) | |||||
| })); | |||||
| const validateBabelrcFile = (0, _caching.makeWeakCache)(file => ({ | |||||
| filepath: file.filepath, | |||||
| dirname: file.dirname, | |||||
| options: (0, _options.validate)("babelrcfile", file.options) | |||||
| })); | |||||
| const validateExtendFile = (0, _caching.makeWeakCache)(file => ({ | |||||
| filepath: file.filepath, | |||||
| dirname: file.dirname, | |||||
| options: (0, _options.validate)("extendsfile", file.options) | |||||
| })); | |||||
| const loadProgrammaticChain = makeChainWalker({ | |||||
| root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors), | |||||
| env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName), | |||||
| overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index), | |||||
| overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName) | |||||
| }); | |||||
| const loadFileChain = makeChainWalker({ | |||||
| root: file => loadFileDescriptors(file), | |||||
| env: (file, envName) => loadFileEnvDescriptors(file)(envName), | |||||
| overrides: (file, index) => loadFileOverridesDescriptors(file)(index), | |||||
| overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName) | |||||
| }); | |||||
| const loadFileDescriptors = (0, _caching.makeWeakCache)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); | |||||
| const loadFileEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); | |||||
| const loadFileOverridesDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); | |||||
| const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); | |||||
| function buildRootDescriptors({ | |||||
| dirname, | |||||
| options | |||||
| }, alias, descriptors) { | |||||
| return descriptors(dirname, options, alias); | |||||
| } | |||||
| function buildEnvDescriptors({ | |||||
| dirname, | |||||
| options | |||||
| }, alias, descriptors, envName) { | |||||
| const opts = options.env && options.env[envName]; | |||||
| return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null; | |||||
| } | |||||
| function buildOverrideDescriptors({ | |||||
| dirname, | |||||
| options | |||||
| }, alias, descriptors, index) { | |||||
| const opts = options.overrides && options.overrides[index]; | |||||
| if (!opts) throw new Error("Assertion failure - missing override"); | |||||
| return descriptors(dirname, opts, `${alias}.overrides[${index}]`); | |||||
| } | |||||
| function buildOverrideEnvDescriptors({ | |||||
| dirname, | |||||
| options | |||||
| }, alias, descriptors, index, envName) { | |||||
| const override = options.overrides && options.overrides[index]; | |||||
| if (!override) throw new Error("Assertion failure - missing override"); | |||||
| const opts = override.env && override.env[envName]; | |||||
| return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null; | |||||
| } | |||||
| function makeChainWalker({ | |||||
| root, | |||||
| env, | |||||
| overrides, | |||||
| overridesEnv | |||||
| }) { | |||||
| return (input, context, files = new Set()) => { | |||||
| const { | |||||
| dirname | |||||
| } = input; | |||||
| const flattenedConfigs = []; | |||||
| const rootOpts = root(input); | |||||
| if (configIsApplicable(rootOpts, dirname, context)) { | |||||
| flattenedConfigs.push(rootOpts); | |||||
| const envOpts = env(input, context.envName); | |||||
| if (envOpts && configIsApplicable(envOpts, dirname, context)) { | |||||
| flattenedConfigs.push(envOpts); | |||||
| } | |||||
| (rootOpts.options.overrides || []).forEach((_, index) => { | |||||
| const overrideOps = overrides(input, index); | |||||
| if (configIsApplicable(overrideOps, dirname, context)) { | |||||
| flattenedConfigs.push(overrideOps); | |||||
| const overrideEnvOpts = overridesEnv(input, index, context.envName); | |||||
| if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) { | |||||
| flattenedConfigs.push(overrideEnvOpts); | |||||
| } | |||||
| } | |||||
| }); | |||||
| } | |||||
| if (flattenedConfigs.some(({ | |||||
| options: { | |||||
| ignore, | |||||
| only | |||||
| } | |||||
| }) => shouldIgnore(context, ignore, only, dirname))) { | |||||
| return null; | |||||
| } | |||||
| const chain = emptyChain(); | |||||
| for (const op of flattenedConfigs) { | |||||
| if (!mergeExtendsChain(chain, op.options, dirname, context, files)) { | |||||
| return null; | |||||
| } | |||||
| mergeChainOpts(chain, op); | |||||
| } | |||||
| return chain; | |||||
| }; | |||||
| } | |||||
| function mergeExtendsChain(chain, opts, dirname, context, files) { | |||||
| if (opts.extends === undefined) return true; | |||||
| const file = (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller); | |||||
| if (files.has(file)) { | |||||
| throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n")); | |||||
| } | |||||
| files.add(file); | |||||
| const fileChain = loadFileChain(validateExtendFile(file), context, files); | |||||
| files.delete(file); | |||||
| if (!fileChain) return false; | |||||
| mergeChain(chain, fileChain); | |||||
| return true; | |||||
| } | |||||
| function mergeChain(target, source) { | |||||
| target.options.push(...source.options); | |||||
| target.plugins.push(...source.plugins); | |||||
| target.presets.push(...source.presets); | |||||
| return target; | |||||
| } | |||||
| function mergeChainOpts(target, { | |||||
| options, | |||||
| plugins, | |||||
| presets | |||||
| }) { | |||||
| target.options.push(options); | |||||
| target.plugins.push(...plugins()); | |||||
| target.presets.push(...presets()); | |||||
| return target; | |||||
| } | |||||
| function emptyChain() { | |||||
| return { | |||||
| options: [], | |||||
| presets: [], | |||||
| plugins: [] | |||||
| }; | |||||
| } | |||||
| function normalizeOptions(opts) { | |||||
| const options = Object.assign({}, opts); | |||||
| delete options.extends; | |||||
| delete options.env; | |||||
| delete options.overrides; | |||||
| delete options.plugins; | |||||
| delete options.presets; | |||||
| delete options.passPerPreset; | |||||
| delete options.ignore; | |||||
| delete options.only; | |||||
| delete options.test; | |||||
| delete options.include; | |||||
| delete options.exclude; | |||||
| if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) { | |||||
| options.sourceMaps = options.sourceMap; | |||||
| delete options.sourceMap; | |||||
| } | |||||
| return options; | |||||
| } | |||||
| function dedupDescriptors(items) { | |||||
| const map = new Map(); | |||||
| const descriptors = []; | |||||
| for (const item of items) { | |||||
| if (typeof item.value === "function") { | |||||
| const fnKey = item.value; | |||||
| let nameMap = map.get(fnKey); | |||||
| if (!nameMap) { | |||||
| nameMap = new Map(); | |||||
| map.set(fnKey, nameMap); | |||||
| } | |||||
| let desc = nameMap.get(item.name); | |||||
| if (!desc) { | |||||
| desc = { | |||||
| value: item | |||||
| }; | |||||
| descriptors.push(desc); | |||||
| if (!item.ownPass) nameMap.set(item.name, desc); | |||||
| } else { | |||||
| desc.value = item; | |||||
| } | |||||
| } else { | |||||
| descriptors.push({ | |||||
| value: item | |||||
| }); | |||||
| } | |||||
| } | |||||
| return descriptors.reduce((acc, desc) => { | |||||
| acc.push(desc.value); | |||||
| return acc; | |||||
| }, []); | |||||
| } | |||||
| function configIsApplicable({ | |||||
| options | |||||
| }, dirname, context) { | |||||
| return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname)); | |||||
| } | |||||
| function configFieldIsApplicable(context, test, dirname) { | |||||
| const patterns = Array.isArray(test) ? test : [test]; | |||||
| return matchesPatterns(context, patterns, dirname); | |||||
| } | |||||
| function shouldIgnore(context, ignore, only, dirname) { | |||||
| if (ignore && matchesPatterns(context, ignore, dirname)) { | |||||
| debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname); | |||||
| return true; | |||||
| } | |||||
| if (only && !matchesPatterns(context, only, dirname)) { | |||||
| debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname); | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| } | |||||
| function matchesPatterns(context, patterns, dirname) { | |||||
| return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context)); | |||||
| } | |||||
| function matchPattern(pattern, dirname, pathToTest, context) { | |||||
| if (typeof pattern === "function") { | |||||
| return !!pattern(pathToTest, { | |||||
| dirname, | |||||
| envName: context.envName, | |||||
| caller: context.caller | |||||
| }); | |||||
| } | |||||
| if (typeof pathToTest !== "string") { | |||||
| throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`); | |||||
| } | |||||
| if (typeof pattern === "string") { | |||||
| pattern = (0, _patternToRegex.default)(pattern, dirname); | |||||
| } | |||||
| return pattern.test(pathToTest); | |||||
| } | |||||
| @ -1,211 +0,0 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.createCachedDescriptors = createCachedDescriptors; | |||||
| exports.createUncachedDescriptors = createUncachedDescriptors; | |||||
| exports.createDescriptor = createDescriptor; | |||||
| var _files = require("./files"); | |||||
| var _item = require("./item"); | |||||
| var _caching = require("./caching"); | |||||
| function isEqualDescriptor(a, b) { | |||||
| return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved); | |||||
| } | |||||
| function createCachedDescriptors(dirname, options, alias) { | |||||
| const { | |||||
| plugins, | |||||
| presets, | |||||
| passPerPreset | |||||
| } = options; | |||||
| return { | |||||
| options, | |||||
| plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => [], | |||||
| presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => [] | |||||
| }; | |||||
| } | |||||
| function createUncachedDescriptors(dirname, options, alias) { | |||||
| let plugins; | |||||
| let presets; | |||||
| return { | |||||
| options, | |||||
| plugins: () => { | |||||
| if (!plugins) { | |||||
| plugins = createPluginDescriptors(options.plugins || [], dirname, alias); | |||||
| } | |||||
| return plugins; | |||||
| }, | |||||
| presets: () => { | |||||
| if (!presets) { | |||||
| presets = createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset); | |||||
| } | |||||
| return presets; | |||||
| } | |||||
| }; | |||||
| } | |||||
| const PRESET_DESCRIPTOR_CACHE = new WeakMap(); | |||||
| const createCachedPresetDescriptors = (0, _caching.makeWeakCache)((items, cache) => { | |||||
| const dirname = cache.using(dir => dir); | |||||
| return (0, _caching.makeStrongCache)(alias => (0, _caching.makeStrongCache)(passPerPreset => createPresetDescriptors(items, dirname, alias, passPerPreset).map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc)))); | |||||
| }); | |||||
| const PLUGIN_DESCRIPTOR_CACHE = new WeakMap(); | |||||
| const createCachedPluginDescriptors = (0, _caching.makeWeakCache)((items, cache) => { | |||||
| const dirname = cache.using(dir => dir); | |||||
| return (0, _caching.makeStrongCache)(alias => createPluginDescriptors(items, dirname, alias).map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc))); | |||||
| }); | |||||
| const DEFAULT_OPTIONS = {}; | |||||
| function loadCachedDescriptor(cache, desc) { | |||||
| const { | |||||
| value, | |||||
| options = DEFAULT_OPTIONS | |||||
| } = desc; | |||||
| if (options === false) return desc; | |||||
| let cacheByOptions = cache.get(value); | |||||
| if (!cacheByOptions) { | |||||
| cacheByOptions = new WeakMap(); | |||||
| cache.set(value, cacheByOptions); | |||||
| } | |||||
| let possibilities = cacheByOptions.get(options); | |||||
| if (!possibilities) { | |||||
| possibilities = []; | |||||
| cacheByOptions.set(options, possibilities); | |||||
| } | |||||
| if (possibilities.indexOf(desc) === -1) { | |||||
| const matches = possibilities.filter(possibility => isEqualDescriptor(possibility, desc)); | |||||
| if (matches.length > 0) { | |||||
| return matches[0]; | |||||
| } | |||||
| possibilities.push(desc); | |||||
| } | |||||
| return desc; | |||||
| } | |||||
| function createPresetDescriptors(items, dirname, alias, passPerPreset) { | |||||
| return createDescriptors("preset", items, dirname, alias, passPerPreset); | |||||
| } | |||||
| function createPluginDescriptors(items, dirname, alias) { | |||||
| return createDescriptors("plugin", items, dirname, alias); | |||||
| } | |||||
| function createDescriptors(type, items, dirname, alias, ownPass) { | |||||
| const descriptors = items.map((item, index) => createDescriptor(item, dirname, { | |||||
| type, | |||||
| alias: `${alias}$${index}`, | |||||
| ownPass: !!ownPass | |||||
| })); | |||||
| assertNoDuplicates(descriptors); | |||||
| return descriptors; | |||||
| } | |||||
| function createDescriptor(pair, dirname, { | |||||
| type, | |||||
| alias, | |||||
| ownPass | |||||
| }) { | |||||
| const desc = (0, _item.getItemDescriptor)(pair); | |||||
| if (desc) { | |||||
| return desc; | |||||
| } | |||||
| let name; | |||||
| let options; | |||||
| let value = pair; | |||||
| if (Array.isArray(value)) { | |||||
| if (value.length === 3) { | |||||
| [value, options, name] = value; | |||||
| } else { | |||||
| [value, options] = value; | |||||
| } | |||||
| } | |||||
| let file = undefined; | |||||
| let filepath = null; | |||||
| if (typeof value === "string") { | |||||
| if (typeof type !== "string") { | |||||
| throw new Error("To resolve a string-based item, the type of item must be given"); | |||||
| } | |||||
| const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset; | |||||
| const request = value; | |||||
| ({ | |||||
| filepath, | |||||
| value | |||||
| } = resolver(value, dirname)); | |||||
| file = { | |||||
| request, | |||||
| resolved: filepath | |||||
| }; | |||||
| } | |||||
| if (!value) { | |||||
| throw new Error(`Unexpected falsy value: ${String(value)}`); | |||||
| } | |||||
| if (typeof value === "object" && value.__esModule) { | |||||
| if (value.default) { | |||||
| value = value.default; | |||||
| } else { | |||||
| throw new Error("Must export a default export when using ES6 modules."); | |||||
| } | |||||
| } | |||||
| if (typeof value !== "object" && typeof value !== "function") { | |||||
| throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`); | |||||
| } | |||||
| if (filepath !== null && typeof value === "object" && value) { | |||||
| throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`); | |||||
| } | |||||
| return { | |||||
| name, | |||||
| alias: filepath || alias, | |||||
| value, | |||||
| options, | |||||
| dirname, | |||||
| ownPass, | |||||
| file | |||||
| }; | |||||
| } | |||||
| function assertNoDuplicates(items) { | |||||
| const map = new Map(); | |||||
| for (const item of items) { | |||||
| if (typeof item.value !== "function") continue; | |||||
| let nameMap = map.get(item.value); | |||||
| if (!nameMap) { | |||||
| nameMap = new Set(); | |||||
| map.set(item.value, nameMap); | |||||
| } | |||||
| if (nameMap.has(item.name)) { | |||||
| const conflicts = items.filter(i => i.value === item.value); | |||||
| throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n")); | |||||
| } | |||||
| nameMap.add(item.name); | |||||
| } | |||||
| } | |||||
| @ -1,312 +0,0 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.findConfigUpwards = findConfigUpwards; | |||||
| exports.findRelativeConfig = findRelativeConfig; | |||||
| exports.findRootConfig = findRootConfig; | |||||
| exports.loadConfig = loadConfig; | |||||
| function _debug() { | |||||
| const data = _interopRequireDefault(require("debug")); | |||||
| _debug = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _path() { | |||||
| const data = _interopRequireDefault(require("path")); | |||||
| _path = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _fs() { | |||||
| const data = _interopRequireDefault(require("fs")); | |||||
| _fs = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _json() { | |||||
| const data = _interopRequireDefault(require("json5")); | |||||
| _json = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _resolve() { | |||||
| const data = _interopRequireDefault(require("resolve")); | |||||
| _resolve = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| var _caching = require("../caching"); | |||||
| var _configApi = _interopRequireDefault(require("../helpers/config-api")); | |||||
| var _utils = require("./utils"); | |||||
| var _patternToRegex = _interopRequireDefault(require("../pattern-to-regex")); | |||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |||||
| const debug = (0, _debug().default)("babel:config:loading:files:configuration"); | |||||
| const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.json"]; | |||||
| const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs"]; | |||||
| const BABELIGNORE_FILENAME = ".babelignore"; | |||||
| function findConfigUpwards(rootDir) { | |||||
| let dirname = rootDir; | |||||
| while (true) { | |||||
| const configFileFound = ROOT_CONFIG_FILENAMES.some(filename => _fs().default.existsSync(_path().default.join(dirname, filename))); | |||||
| if (configFileFound) return dirname; | |||||
| const nextDir = _path().default.dirname(dirname); | |||||
| if (dirname === nextDir) break; | |||||
| dirname = nextDir; | |||||
| } | |||||
| return null; | |||||
| } | |||||
| function findRelativeConfig(packageData, envName, caller) { | |||||
| let config = null; | |||||
| let ignore = null; | |||||
| const dirname = _path().default.dirname(packageData.filepath); | |||||
| for (const loc of packageData.directories) { | |||||
| if (!config) { | |||||
| config = loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, packageData.pkg && packageData.pkg.dirname === loc ? packageToBabelConfig(packageData.pkg) : null); | |||||
| } | |||||
| if (!ignore) { | |||||
| const ignoreLoc = _path().default.join(loc, BABELIGNORE_FILENAME); | |||||
| ignore = readIgnoreConfig(ignoreLoc); | |||||
| if (ignore) { | |||||
| debug("Found ignore %o from %o.", ignore.filepath, dirname); | |||||
| } | |||||
| } | |||||
| } | |||||
| return { | |||||
| config, | |||||
| ignore | |||||
| }; | |||||
| } | |||||
| function findRootConfig(dirname, envName, caller) { | |||||
| return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller); | |||||
| } | |||||
| function loadOneConfig(names, dirname, envName, caller, previousConfig = null) { | |||||
| const config = names.reduce((previousConfig, name) => { | |||||
| const filepath = _path().default.resolve(dirname, name); | |||||
| const config = readConfig(filepath, envName, caller); | |||||
| if (config && previousConfig) { | |||||
| throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(previousConfig.filepath)}\n` + ` - ${name}\n` + `from ${dirname}`); | |||||
| } | |||||
| return config || previousConfig; | |||||
| }, previousConfig); | |||||
| if (config) { | |||||
| debug("Found configuration %o from %o.", config.filepath, dirname); | |||||
| } | |||||
| return config; | |||||
| } | |||||
| function loadConfig(name, dirname, envName, caller) { | |||||
| const filepath = _resolve().default.sync(name, { | |||||
| basedir: dirname | |||||
| }); | |||||
| const conf = readConfig(filepath, envName, caller); | |||||
| if (!conf) { | |||||
| throw new Error(`Config file ${filepath} contains no configuration data`); | |||||
| } | |||||
| debug("Loaded config %o from %o.", name, dirname); | |||||
| return conf; | |||||
| } | |||||
| function readConfig(filepath, envName, caller) { | |||||
| const ext = _path().default.extname(filepath); | |||||
| return ext === ".js" || ext === ".cjs" ? readConfigJS(filepath, { | |||||
| envName, | |||||
| caller | |||||
| }) : readConfigJSON5(filepath); | |||||
| } | |||||
| const LOADING_CONFIGS = new Set(); | |||||
| const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { | |||||
| if (!_fs().default.existsSync(filepath)) { | |||||
| cache.forever(); | |||||
| return null; | |||||
| } | |||||
| if (LOADING_CONFIGS.has(filepath)) { | |||||
| cache.never(); | |||||
| debug("Auto-ignoring usage of config %o.", filepath); | |||||
| return { | |||||
| filepath, | |||||
| dirname: _path().default.dirname(filepath), | |||||
| options: {} | |||||
| }; | |||||
| } | |||||
| let options; | |||||
| try { | |||||
| LOADING_CONFIGS.add(filepath); | |||||
| const configModule = require(filepath); | |||||
| options = configModule && configModule.__esModule ? configModule.default || undefined : configModule; | |||||
| } catch (err) { | |||||
| err.message = `${filepath}: Error while loading config - ${err.message}`; | |||||
| throw err; | |||||
| } finally { | |||||
| LOADING_CONFIGS.delete(filepath); | |||||
| } | |||||
| if (typeof options === "function") { | |||||
| options = options((0, _configApi.default)(cache)); | |||||
| if (!cache.configured()) throwConfigError(); | |||||
| } | |||||
| if (!options || typeof options !== "object" || Array.isArray(options)) { | |||||
| throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`); | |||||
| } | |||||
| if (typeof options.then === "function") { | |||||
| throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`); | |||||
| } | |||||
| return { | |||||
| filepath, | |||||
| dirname: _path().default.dirname(filepath), | |||||
| options | |||||
| }; | |||||
| }); | |||||
| const packageToBabelConfig = (0, _caching.makeWeakCache)(file => { | |||||
| const babel = file.options["babel"]; | |||||
| if (typeof babel === "undefined") return null; | |||||
| if (typeof babel !== "object" || Array.isArray(babel) || babel === null) { | |||||
| throw new Error(`${file.filepath}: .babel property must be an object`); | |||||
| } | |||||
| return { | |||||
| filepath: file.filepath, | |||||
| dirname: file.dirname, | |||||
| options: babel | |||||
| }; | |||||
| }); | |||||
| const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => { | |||||
| let options; | |||||
| try { | |||||
| options = _json().default.parse(content); | |||||
| } catch (err) { | |||||
| err.message = `${filepath}: Error while parsing config - ${err.message}`; | |||||
| throw err; | |||||
| } | |||||
| if (!options) throw new Error(`${filepath}: No config detected`); | |||||
| if (typeof options !== "object") { | |||||
| throw new Error(`${filepath}: Config returned typeof ${typeof options}`); | |||||
| } | |||||
| if (Array.isArray(options)) { | |||||
| throw new Error(`${filepath}: Expected config object but found array`); | |||||
| } | |||||
| return { | |||||
| filepath, | |||||
| dirname: _path().default.dirname(filepath), | |||||
| options | |||||
| }; | |||||
| }); | |||||
| const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => { | |||||
| const ignoreDir = _path().default.dirname(filepath); | |||||
| const ignorePatterns = content.split("\n").map(line => line.replace(/#(.*?)$/, "").trim()).filter(line => !!line); | |||||
| for (const pattern of ignorePatterns) { | |||||
| if (pattern[0] === "!") { | |||||
| throw new Error(`Negation of file paths is not supported.`); | |||||
| } | |||||
| } | |||||
| return { | |||||
| filepath, | |||||
| dirname: _path().default.dirname(filepath), | |||||
| ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir)) | |||||
| }; | |||||
| }); | |||||
| function throwConfigError() { | |||||
| throw new Error(`\ | |||||
| Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured | |||||
| for various types of caching, using the first param of their handler functions: | |||||
| module.exports = function(api) { | |||||
| // The API exposes the following: | |||||
| // Cache the returned value forever and don't call this function again. | |||||
| api.cache(true); | |||||
| // Don't cache at all. Not recommended because it will be very slow. | |||||
| api.cache(false); | |||||
| // Cached based on the value of some function. If this function returns a value different from | |||||
| // a previously-encountered value, the plugins will re-evaluate. | |||||
| var env = api.cache(() => process.env.NODE_ENV); | |||||
| // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for | |||||
| // any possible NODE_ENV value that might come up during plugin execution. | |||||
| var isProd = api.cache(() => process.env.NODE_ENV === "production"); | |||||
| // .cache(fn) will perform a linear search though instances to find the matching plugin based | |||||
| // based on previous instantiated plugins. If you want to recreate the plugin and discard the | |||||
| // previous instance whenever something changes, you may use: | |||||
| var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production"); | |||||
| // Note, we also expose the following more-verbose versions of the above examples: | |||||
| api.cache.forever(); // api.cache(true) | |||||
| api.cache.never(); // api.cache(false) | |||||
| api.cache.using(fn); // api.cache(fn) | |||||
| // Return the value that will be cached. | |||||
| return { }; | |||||
| };`); | |||||
| } | |||||