Skip to content

Commit

Permalink
chore(NA): apply fs.realpathSync into the calculated REPO_ROOT paths …
Browse files Browse the repository at this point in the history
…on babel_register_for_test_plugins
  • Loading branch information
mistic committed Oct 15, 2021
1 parent 3e4ba6d commit 9f6aa9f
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
* Side Public License, v 1.
*/

const Fs = require('path');
const Path = require('path');

const { REPO_ROOT } = require('@kbn/dev-utils');

const KIBANA_ROOT = Path.resolve(__dirname, '../../../../../');
// const KIBANA_ROOT = Path.resolve(__dirname, '../../../../../');

console.log(Path.resolve(REPO_ROOT, 'test'));
console.log(require('fs').realpathSync(Path.resolve(REPO_ROOT, 'test')));
console.log(Path.resolve(KIBANA_ROOT, 'test'));
throw new Error('FAIL CI');
// console.log(Path.resolve(REPO_ROOT, 'test'));
// console.log(require('fs').realpathSync(Path.resolve(REPO_ROOT, 'test')));
// console.log(Path.resolve(KIBANA_ROOT, 'test'));
// throw new Error('FAIL CI');

// modifies all future calls to require() to automatically
// compile the required source with babel
Expand All @@ -29,7 +30,7 @@ require('@babel/register')({
// TODO: should should probably remove this link back to the source
Path.resolve(REPO_ROOT, 'x-pack/plugins/task_manager/server/config.ts'),
Path.resolve(REPO_ROOT, 'src/core/utils/default_app_categories.ts'),
],
].map((path) => Fs.realpathSync(path)),
babelrc: false,
presets: [require.resolve('@kbn/babel-preset/node_preset')],
extensions: ['.js', '.ts', '.tsx'],
Expand Down

0 comments on commit 9f6aa9f

Please sign in to comment.