Skip to content

Commit

Permalink
Revert "Using re2 for Timelion regular expressions (elastic#55208) (e…
Browse files Browse the repository at this point in the history
…lastic#60055)"

This reverts commit 2610d49.
  • Loading branch information
spalger committed Mar 13, 2020
1 parent bfec9ed commit 7fd86d6
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 106 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/.es
.DS_Store
.node_binaries
.native_modules
node_modules
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
!/src/dev/notice/__fixtures__/node_modules
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@
"pug": "^2.0.4",
"query-string": "6.10.1",
"raw-loader": "3.1.0",
"re2": "1.10.5",
"react": "^16.12.0",
"react-color": "^2.13.8",
"react-dom": "^16.12.0",
Expand Down
2 changes: 0 additions & 2 deletions src/dev/build/build_distributables.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import {
InstallDependenciesTask,
BuildKibanaPlatformPluginsTask,
OptimizeBuildTask,
PatchNativeModulesTask,
RemovePackageJsonDepsTask,
RemoveWorkspacesTask,
TranspileBabelTask,
Expand Down Expand Up @@ -133,7 +132,6 @@ export async function buildDistributables(options) {
* directories and perform platform-specific steps
*/
await run(CreateArchivesSourcesTask);
await run(PatchNativeModulesTask);
await run(CleanExtraBinScriptsTask);
await run(CleanExtraBrowsersTask);
await run(CleanNodeBuildsTask);
Expand Down
1 change: 0 additions & 1 deletion src/dev/build/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ export {
compress,
isFileAccessible,
} from './fs';
export { download } from './download';
export { scanDelete } from './scan_delete';
export { scanCopy } from './scan_copy';
1 change: 0 additions & 1 deletion src/dev/build/tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export * from './nodejs_modules';
export * from './notice_file_task';
export * from './optimize_task';
export * from './os_packages';
export * from './patch_native_modules_task';
export * from './transpile_babel_task';
export * from './transpile_scss_task';
export * from './verify_env_task';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import expect from '@kbn/expect';

import * as NodeShasumsNS from '../node_shasums';
import * as NodeDownloadInfoNS from '../node_download_info';
import * as DownloadNS from '../../../lib/download'; // sinon can't stub '../../../lib' properly
import * as DownloadNS from '../download';
import { DownloadNodeBuildsTask } from '../download_node_builds_task';

describe('src/dev/build/tasks/nodejs/download_node_builds_task', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import chalk from 'chalk';
import { createHash } from 'crypto';
import Axios from 'axios';

import { mkdirp } from './fs';
import { mkdirp } from '../../lib';

function tryUnlink(path) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/tasks/nodejs/download_node_builds_task.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { download } from '../../lib';
import { download } from './download';
import { getNodeShasums } from './node_shasums';
import { getNodeDownloadInfo } from './node_download_info';

Expand Down
85 changes: 0 additions & 85 deletions src/dev/build/tasks/patch_native_modules_task.js

This file was deleted.

5 changes: 1 addition & 4 deletions src/plugins/timelion/server/series_functions/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ export default new Chainable('label', {
const config = args.byName;
return alter(args, function(eachSeries) {
if (config.regex) {
// not using a standard `import` so that if there's an issue with the re2 native module
// that it doesn't prevent Kibana from starting up and we only have an issue using Timelion labels
const RE2 = require('re2');
eachSeries.label = eachSeries.label.replace(new RE2(config.regex), config.label);
eachSeries.label = eachSeries.label.replace(new RegExp(config.regex), config.label);
} else {
eachSeries.label = config.label;
}
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21835,7 +21835,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==

nan@^2.13.2, nan@^2.14.0, nan@^2.9.2:
nan@^2.13.2, nan@^2.9.2:
version "2.14.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
Expand Down Expand Up @@ -24872,13 +24872,6 @@ re-resizable@^6.1.1:
dependencies:
fast-memoize "^2.5.1"

[email protected]:
version "1.10.5"
resolved "https://registry.yarnpkg.com/re2/-/re2-1.10.5.tgz#b3730438121c6bf59d459aff3471177eef513445"
integrity sha512-ssO3AD8/YJzuQUgEasS8PxA8n1yg8JB2VNSJhCebuuHLwaGiufhtFGUypS2bONrCPDbjwlMy7OZD9LkcrQMr1g==
dependencies:
nan "^2.14.0"

react-ace@^5.5.0:
version "5.10.0"
resolved "https://registry.yarnpkg.com/react-ace/-/react-ace-5.10.0.tgz#e328b37ac52759f700be5afdb86ada2f5ec84c5e"
Expand Down

0 comments on commit 7fd86d6

Please sign in to comment.