mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Clean up glob related dependencies (#138571)
* Clean up glob related dependencies * wip * update snapshots * updates * fix tests * update package.json * i18n * fix tests * onlyFiles: false * preserve folders on **/* globs * one more * revert instance of onlyFiles: false
This commit is contained in:
parent
b678a9fb08
commit
6bf11a7d3e
27 changed files with 95 additions and 142 deletions
10
package.json
10
package.json
|
@ -94,7 +94,7 @@
|
|||
"**/use-composed-ref": "^1.3.0",
|
||||
"**/use-latest": "^1.2.1",
|
||||
"@tanstack/query-core": "^4.2.1",
|
||||
"globby/fast-glob": "3.2.7",
|
||||
"globby/fast-glob": "^3.2.11",
|
||||
"puppeteer/node-fetch": "^2.6.7"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -435,7 +435,7 @@
|
|||
"dedent": "^0.7.0",
|
||||
"deep-freeze-strict": "^1.1.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
"del": "^5.1.0",
|
||||
"del": "^6.1.0",
|
||||
"elastic-apm-node": "^3.38.0",
|
||||
"email-addresses": "^5.0.0",
|
||||
"execa": "^4.0.2",
|
||||
|
@ -451,9 +451,7 @@
|
|||
"get-port": "^5.0.0",
|
||||
"getopts": "^2.2.5",
|
||||
"getos": "^3.1.0",
|
||||
"glob": "^7.1.2",
|
||||
"glob-all": "^3.2.1",
|
||||
"globby": "^11.0.3",
|
||||
"globby": "^11.1.0",
|
||||
"handlebars": "4.7.7",
|
||||
"he": "^1.2.0",
|
||||
"history": "^4.9.0",
|
||||
|
@ -770,7 +768,6 @@
|
|||
"@types/flot": "^0.0.31",
|
||||
"@types/geojson": "7946.0.7",
|
||||
"@types/getos": "^3.0.0",
|
||||
"@types/glob": "^7.1.2",
|
||||
"@types/gulp": "^4.0.6",
|
||||
"@types/gulp-zip": "^4.0.1",
|
||||
"@types/hapi__cookie": "^10.1.3",
|
||||
|
@ -1253,7 +1250,6 @@
|
|||
"html": "1.0.0",
|
||||
"html-loader": "^1.3.2",
|
||||
"http-proxy": "^1.18.1",
|
||||
"is-glob": "^4.0.1",
|
||||
"is-path-inside": "^3.0.2",
|
||||
"jest": "^26.6.3",
|
||||
"jest-axe": "^5.0.0",
|
||||
|
|
|
@ -44,7 +44,7 @@ RUNTIME_DEPS = [
|
|||
"@npm//del",
|
||||
"@npm//execa",
|
||||
"@npm//getopts",
|
||||
"@npm//glob",
|
||||
"@npm//globby",
|
||||
"@npm//node-fetch",
|
||||
"@npm//simple-git",
|
||||
"@npm//tree-kill",
|
||||
|
|
|
@ -28,8 +28,11 @@ jest.mock('fs', () => ({
|
|||
};
|
||||
}
|
||||
}),
|
||||
readdirSync: jest.fn().mockImplementation(() => {
|
||||
return ['oldest.yml', 'newest.yml', 'middle.yml'];
|
||||
}));
|
||||
|
||||
jest.mock('globby', () => ({
|
||||
sync: jest.fn().mockImplementation(() => {
|
||||
return ['/data/oldest.yml', '/data/newest.yml', '/data/middle.yml'];
|
||||
}),
|
||||
}));
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
|
||||
/**
|
||||
* Find the most recently modified file that matches the pattern pattern
|
||||
|
@ -20,8 +20,8 @@ export function findMostRecentlyChanged(pattern: string) {
|
|||
|
||||
const ctime = (p: string) => fs.statSync(p).ctime.getTime();
|
||||
|
||||
return glob
|
||||
.sync(pattern)
|
||||
return globby
|
||||
.sync(pattern, { onlyFiles: false })
|
||||
.sort((a, b) => ctime(a) - ctime(b))
|
||||
.pop();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,9 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
"README.md",
|
||||
]
|
||||
|
||||
RUNTIME_DEPS = []
|
||||
RUNTIME_DEPS = [
|
||||
"@npm//globby",
|
||||
]
|
||||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const program = require('commander');
|
||||
const glob = require('glob');
|
||||
const globby = require('globby');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const packageJSON = require('../package.json');
|
||||
|
@ -26,7 +26,7 @@ if (!program.glob) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
const files = glob.sync(program.glob);
|
||||
const files = globby.sync(program.glob);
|
||||
const totalFilesCount = files.length;
|
||||
let convertedFilesCount = 0;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ RUNTIME_DEPS = [
|
|||
"//packages/kbn-eslint-plugin-imports",
|
||||
"//packages/kbn-utility-types",
|
||||
"//packages/kbn-utils",
|
||||
"@npm//glob",
|
||||
"@npm//globby",
|
||||
"@npm//listr",
|
||||
"@npm//normalize-path",
|
||||
]
|
||||
|
@ -52,8 +52,8 @@ TYPES_DEPS = [
|
|||
"//packages/kbn-eslint-plugin-imports:npm_module_types",
|
||||
"//packages/kbn-utility-types:npm_module_types",
|
||||
"//packages/kbn-utils:npm_module_types",
|
||||
"@npm//globby",
|
||||
"@npm//tslib",
|
||||
"@npm//@types/glob",
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/listr",
|
||||
"@npm//@types/lodash",
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import globby from 'globby';
|
||||
import * as ts from 'typescript';
|
||||
import * as path from 'path';
|
||||
import { parseUsageCollection } from './ts_parser';
|
||||
import { globAsync } from './utils';
|
||||
import { TelemetryRC } from './config';
|
||||
import { compilerHost } from './compiler_host';
|
||||
|
||||
|
@ -17,21 +17,24 @@ export async function getProgramPaths({
|
|||
root,
|
||||
exclude,
|
||||
}: Pick<TelemetryRC, 'root' | 'exclude'>): Promise<string[]> {
|
||||
const filePaths = await globAsync('**/*.ts', {
|
||||
cwd: root,
|
||||
ignore: [
|
||||
'**/node_modules/**',
|
||||
'**/*.test.*',
|
||||
'**/*.mock.*',
|
||||
'**/mocks.*',
|
||||
'**/__fixture__/**',
|
||||
'**/__tests__/**',
|
||||
'**/public/**',
|
||||
'**/dist/**',
|
||||
'**/target/**',
|
||||
'**/*.d.ts',
|
||||
const filePaths = await globby(
|
||||
[
|
||||
'**/*.ts',
|
||||
'!**/node_modules/**',
|
||||
'!**/*.test.*',
|
||||
'!**/*.mock.*',
|
||||
'!**/mocks.*',
|
||||
'!**/__fixture__/**',
|
||||
'!**/__tests__/**',
|
||||
'!**/public/**',
|
||||
'!**/dist/**',
|
||||
'!**/target/**',
|
||||
'!**/*.d.ts',
|
||||
],
|
||||
});
|
||||
{
|
||||
cwd: root,
|
||||
}
|
||||
);
|
||||
|
||||
if (filePaths.length === 0) {
|
||||
throw Error(`No files found in ${root}`);
|
||||
|
|
|
@ -20,7 +20,6 @@ import {
|
|||
isEqual,
|
||||
} from 'lodash';
|
||||
import * as path from 'path';
|
||||
import glob from 'glob';
|
||||
import { readFile, writeFile } from 'fs';
|
||||
import { promisify } from 'util';
|
||||
import normalize from 'normalize-path';
|
||||
|
@ -28,7 +27,6 @@ import { Optional } from '@kbn/utility-types';
|
|||
|
||||
export const readFileAsync = promisify(readFile);
|
||||
export const writeFileAsync = promisify(writeFile);
|
||||
export const globAsync = promisify(glob);
|
||||
|
||||
export function isPropertyWithKey(property: ts.Node, identifierName: string) {
|
||||
if (ts.isPropertyAssignment(property) || ts.isMethodDeclaration(property)) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import http from 'http';
|
|||
|
||||
import sinon from 'sinon';
|
||||
import nock from 'nock';
|
||||
import glob from 'glob-all';
|
||||
import globby from 'globby';
|
||||
import del from 'del';
|
||||
|
||||
import { Logger } from '../lib/logger';
|
||||
|
@ -33,12 +33,12 @@ describe('kibana cli', function () {
|
|||
const logger = new Logger(settings);
|
||||
|
||||
function expectWorkingPathEmpty() {
|
||||
const files = glob.sync('**/*', { cwd: testWorkingPath });
|
||||
const files = globby.sync('**/*', { cwd: testWorkingPath, onlyFiles: false });
|
||||
expect(files).toEqual([]);
|
||||
}
|
||||
|
||||
function expectWorkingPathNotEmpty() {
|
||||
const files = glob.sync('**/*', { cwd: testWorkingPath });
|
||||
const files = globby.sync('**/*', { cwd: testWorkingPath, onlyFiles: false });
|
||||
const expected = ['archive.part'];
|
||||
|
||||
expect(files.sort()).toEqual(expected.sort());
|
||||
|
|
|
@ -10,7 +10,7 @@ import Fs from 'fs';
|
|||
import { join } from 'path';
|
||||
|
||||
import sinon from 'sinon';
|
||||
import glob from 'glob-all';
|
||||
import globby from 'globby';
|
||||
import del from 'del';
|
||||
|
||||
import { Logger } from '../lib/logger';
|
||||
|
@ -71,7 +71,8 @@ describe('kibana cli', function () {
|
|||
await getPackData(settings, logger);
|
||||
await extract(settings, logger);
|
||||
|
||||
expect(glob.sync('**/*', { cwd: testWorkingPath })).toMatchInlineSnapshot(`
|
||||
expect(globby.sync('**/*', { cwd: testWorkingPath, onlyFiles: false }).sort())
|
||||
.toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"archive.part",
|
||||
"bin",
|
||||
|
|
|
@ -11,7 +11,7 @@ import os from 'os';
|
|||
import fs from 'fs';
|
||||
|
||||
import del from 'del';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
|
||||
import { analyzeArchive, extractArchive } from './zip';
|
||||
|
||||
|
@ -53,18 +53,18 @@ describe('kibana cli', function () {
|
|||
const archive = path.resolve(repliesPath, 'test_plugin.zip');
|
||||
await extractArchive(archive, tempPath, 'kibana/test-plugin');
|
||||
|
||||
expect(glob.sync('**/*', { cwd: tempPath })).toMatchInlineSnapshot(`
|
||||
expect(globby.sync('**/*', { cwd: tempPath, onlyFiles: false })).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"bin",
|
||||
"bin/executable",
|
||||
"bin/not-executable",
|
||||
"kibana.json",
|
||||
"node_modules",
|
||||
"public",
|
||||
"bin/executable",
|
||||
"bin/not-executable",
|
||||
"node_modules/some-package",
|
||||
"public/index.js",
|
||||
"node_modules/some-package/index.js",
|
||||
"node_modules/some-package/package.json",
|
||||
"public",
|
||||
"public/index.js",
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
@ -76,7 +76,7 @@ describe('kibana cli', function () {
|
|||
|
||||
await extractArchive(archivePath, tempPath, 'kibana/test-plugin/bin');
|
||||
|
||||
expect(glob.sync('**/*', { cwd: tempPath })).toMatchInlineSnapshot(`
|
||||
expect(globby.sync('**/*', { cwd: tempPath, onlyFiles: false })).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"executable",
|
||||
"not-executable",
|
||||
|
|
|
@ -10,7 +10,7 @@ import { join } from 'path';
|
|||
import { writeFileSync, existsSync, mkdirSync } from 'fs';
|
||||
|
||||
import sinon from 'sinon';
|
||||
import glob from 'glob-all';
|
||||
import globby from 'globby';
|
||||
import del from 'del';
|
||||
|
||||
import { Logger } from '../lib/logger';
|
||||
|
@ -82,8 +82,7 @@ describe('kibana cli', function () {
|
|||
mkdirSync(join(pluginDir, 'bar'), { recursive: true });
|
||||
|
||||
remove(settings, logger);
|
||||
|
||||
const files = glob.sync('**/*', { cwd: pluginDir });
|
||||
const files = globby.sync('**/*', { cwd: pluginDir, onlyFiles: false });
|
||||
const expected = ['bar'];
|
||||
expect(files.sort()).toEqual(expected.sort());
|
||||
});
|
||||
|
|
|
@ -21,11 +21,8 @@ describe(`enumeratePatterns`, () => {
|
|||
new Map([['x-pack/plugins/screenshotting', ['kibana-screenshotting']]])
|
||||
);
|
||||
|
||||
expect(actual).toHaveProperty(
|
||||
'0',
|
||||
expect.arrayContaining([
|
||||
'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting',
|
||||
])
|
||||
expect(actual.flat()).toContain(
|
||||
'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting'
|
||||
);
|
||||
});
|
||||
it(`should resolve src/plugins/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => {
|
||||
|
@ -33,18 +30,15 @@ describe(`enumeratePatterns`, () => {
|
|||
new Map([['src/plugins/charts/common/static/color_maps', ['kibana-app']]])
|
||||
);
|
||||
|
||||
expect(actual[0][0]).toBe(
|
||||
expect(actual.flat()).toContain(
|
||||
'src/plugins/charts/common/static/color_maps/color_maps.ts kibana-app'
|
||||
);
|
||||
});
|
||||
it(`should resolve x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/translations.ts to kibana-security`, () => {
|
||||
const short = 'x-pack/plugins/security_solution';
|
||||
const short =
|
||||
'x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout';
|
||||
const actual = enumeratePatterns(REPO_ROOT)(log)(new Map([[short, ['kibana-security']]]));
|
||||
|
||||
expect(
|
||||
actual[0].includes(
|
||||
`${short}/public/common/components/exceptions/edit_exception_flyout/translations.ts kibana-security`
|
||||
)
|
||||
).toBe(true);
|
||||
expect(actual.flat()).toContain(`${short}/translations.ts kibana-security`);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,23 +7,21 @@
|
|||
*/
|
||||
|
||||
import { statSync } from 'fs';
|
||||
import isGlob from 'is-glob';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
import { left, right, tryCatch } from '../either';
|
||||
import { taMark } from '../utils';
|
||||
|
||||
export const push = (xs) => (x) => xs.push(x);
|
||||
export const pathExists = (x) => tryCatch(() => statSync(x)).fold(left, right);
|
||||
export const isDir = (x) => statSync(x).isDirectory();
|
||||
export const prokGlob = (x) => glob.sync(x, { nonull: true });
|
||||
export const prokGlob = (x) => globby.sync(x);
|
||||
export const trim = (ROOT) => (x) => x.replace(`${ROOT}/`, '');
|
||||
export const isFileAllowed = (x) => /.(j|t)(s|sx)$/gm.test(x);
|
||||
export const isRejectedDir = (x) =>
|
||||
/node_modules|__tests__|__fixture__|__fixtures__|build\//gm.test(x);
|
||||
const isGlobFound = (x) => (xs) => x === xs[0] ? false : true;
|
||||
export const globExpands = (x) => isGlobFound(x)(prokGlob(x));
|
||||
export const globExpands = (x) => Boolean(prokGlob(x).length);
|
||||
export const tryPath = (x) => {
|
||||
const isAGlob = isGlob(x);
|
||||
const isAGlob = globby.hasMagic(x);
|
||||
|
||||
if (isAGlob) return globExpands(x) ? right(x) : left(x);
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
*/
|
||||
|
||||
import path from 'path';
|
||||
import globby from 'globby';
|
||||
|
||||
import { extractCodeMessages } from './extractors';
|
||||
import { globAsync, readFileAsync, normalizePath } from './utils';
|
||||
import { readFileAsync, normalizePath } from './utils';
|
||||
|
||||
import { createFailError, isFailError } from '@kbn/dev-cli-errors';
|
||||
|
||||
|
@ -58,13 +59,14 @@ export async function matchEntriesWithExctractors(inputPath, options = {}) {
|
|||
'**/build/**',
|
||||
'**/*.test.{js,jsx,ts,tsx}',
|
||||
'**/*.d.ts',
|
||||
].concat(additionalIgnore);
|
||||
]
|
||||
.concat(additionalIgnore)
|
||||
.map((i) => `!${i}`);
|
||||
|
||||
const entries = await globAsync('*.{js,jsx,ts,tsx}', {
|
||||
const entries = await globby(['*.{js,jsx,ts,tsx}', ...ignore], {
|
||||
cwd: inputPath,
|
||||
matchBase: true,
|
||||
ignore,
|
||||
mark,
|
||||
baseNameMatch: true,
|
||||
markDirectories: mark,
|
||||
absolute,
|
||||
});
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ export {
|
|||
writeFileAsync,
|
||||
makeDirAsync,
|
||||
accessAsync,
|
||||
globAsync,
|
||||
// functions
|
||||
normalizePath,
|
||||
difference,
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
isBinaryExpression,
|
||||
} from '@babel/types';
|
||||
import fs from 'fs';
|
||||
import glob from 'glob';
|
||||
import { promisify } from 'util';
|
||||
import normalize from 'normalize-path';
|
||||
import path from 'path';
|
||||
|
@ -37,7 +36,6 @@ export const readFileAsync = promisify(fs.readFile);
|
|||
export const writeFileAsync = promisify(fs.writeFile);
|
||||
export const makeDirAsync = promisify(fs.mkdir);
|
||||
export const accessAsync = promisify(fs.access);
|
||||
export const globAsync = promisify(glob);
|
||||
|
||||
export function normalizePath(inputPath) {
|
||||
return normalize(path.relative('.', inputPath));
|
||||
|
|
|
@ -8,15 +8,12 @@
|
|||
|
||||
import { resolve } from 'path';
|
||||
import { readFile } from 'fs/promises';
|
||||
import { promisify } from 'util';
|
||||
|
||||
import glob from 'glob';
|
||||
|
||||
const globAsync = promisify(glob);
|
||||
import globby from 'globby';
|
||||
|
||||
export async function getBundledNotices(packageDirectory) {
|
||||
const pattern = resolve(packageDirectory, '*{LICENSE,NOTICE}*');
|
||||
const paths = await globAsync(pattern);
|
||||
const paths = await globby(pattern);
|
||||
return Promise.all(
|
||||
paths.map(async (path) => ({
|
||||
path,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import _, { merge } from 'lodash';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
import { basename, join, resolve } from 'path';
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
|
@ -115,8 +115,8 @@ export class SpecDefinitionsService {
|
|||
}
|
||||
|
||||
private loadJSONSpecInDir(dirname: string) {
|
||||
const generatedFiles = glob.sync(join(dirname, 'generated', '*.json'));
|
||||
const overrideFiles = glob.sync(join(dirname, 'overrides', '*.json'));
|
||||
const generatedFiles = globby.sync(join(dirname, 'generated', '*.json'));
|
||||
const overrideFiles = globby.sync(join(dirname, 'overrides', '*.json'));
|
||||
|
||||
return generatedFiles.reduce((acc, file) => {
|
||||
const overrideFile = overrideFiles.find((f) => basename(f) === basename(file));
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import _ from 'lodash';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
import path from 'path';
|
||||
import processFunctionDefinition from './process_function_definition';
|
||||
|
||||
|
@ -18,7 +18,7 @@ export default function (directory) {
|
|||
|
||||
// Get a list of all files and use the filename as the object key
|
||||
const files = _.map(
|
||||
glob
|
||||
globby
|
||||
.sync(path.resolve(__dirname, '../' + directory + '/*.js'))
|
||||
.filter((filename) => !filename.includes('.test')),
|
||||
function (file) {
|
||||
|
@ -28,7 +28,9 @@ export default function (directory) {
|
|||
);
|
||||
|
||||
// Get a list of all directories with an index.js, use the directory name as the key in the object
|
||||
const directories = _.chain(glob.sync(path.resolve(__dirname, '../' + directory + '/*/index.js')))
|
||||
const directories = _.chain(
|
||||
globby.sync(path.resolve(__dirname, '../' + directory + '/*/index.js'))
|
||||
)
|
||||
.map(function (file) {
|
||||
const parts = file.split('/');
|
||||
const name = parts[parts.length - 2];
|
||||
|
|
|
@ -6,20 +6,14 @@
|
|||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
import { bold } from 'chalk';
|
||||
import { argv } from 'yargs';
|
||||
import { requestFromApi } from './request_from_api';
|
||||
|
||||
async function listFiles() {
|
||||
const scan = (pattern) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob(pattern, {}, (err, files) => (err ? reject(err) : resolve(files)));
|
||||
});
|
||||
};
|
||||
|
||||
const pattern = resolve(__dirname, './apis/*/index.js');
|
||||
const files = await scan(pattern);
|
||||
const files = await globby(pattern);
|
||||
files.forEach((file) => {
|
||||
const { name, description } = require(file); // eslint-disable-line import/no-dynamic-require
|
||||
console.log(' ' + bold(`node ${argv.$0} ${name}`));
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { readFileSync } from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
import { safeLoad } from 'js-yaml';
|
||||
|
||||
import { getField, processFields } from './field';
|
||||
|
@ -27,7 +27,7 @@ expect.addSnapshotSerializer({
|
|||
|
||||
test('tests loading fields.yml', () => {
|
||||
// Find all .yml files to run tests on
|
||||
const files = glob.sync(path.join(__dirname, '/tests/*.yml'));
|
||||
const files = globby.sync(path.join(__dirname, '/tests/*.yml'));
|
||||
for (const file of files) {
|
||||
const fieldsYML = readFileSync(file, 'utf-8');
|
||||
const fields: Field[] = safeLoad(fieldsYML);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
import path from 'path';
|
||||
import { FtrProviderContext } from '../common/ftr_provider_context';
|
||||
|
||||
|
@ -23,7 +23,7 @@ export default function apmApiIntegrationTests({ getService, loadTestFile }: Ftr
|
|||
const registry = getService('registry');
|
||||
|
||||
describe('APM API tests', function () {
|
||||
const tests = glob.sync(getGlobPattern(), { cwd });
|
||||
const tests = globby.sync(getGlobPattern(), { cwd });
|
||||
|
||||
if (envGrepFiles) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { chunk } from 'lodash';
|
||||
import { resolve } from 'path';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
|
||||
import Url from 'url';
|
||||
|
||||
|
@ -21,7 +21,7 @@ const retrieveIntegrations = (chunksTotal: number, chunkIndex: number) => {
|
|||
__dirname,
|
||||
'../../plugins/security_solution/cypress/integration/**/*.spec.ts'
|
||||
);
|
||||
const integrationsPaths = glob.sync(pattern);
|
||||
const integrationsPaths = globby.sync(pattern);
|
||||
const chunkSize = Math.ceil(integrationsPaths.length / chunksTotal);
|
||||
|
||||
return chunk(integrationsPaths, chunkSize)[chunkIndex - 1];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { chunk } from 'lodash';
|
||||
import { resolve } from 'path';
|
||||
import glob from 'glob';
|
||||
import globby from 'globby';
|
||||
|
||||
import Url from 'url';
|
||||
|
||||
|
@ -26,7 +26,7 @@ const retrieveIntegrations = (chunksTotal: number, chunkIndex: number) => {
|
|||
__dirname,
|
||||
'../../plugins/threat_intelligence/cypress/integration/**/*.spec.ts'
|
||||
);
|
||||
const integrationsPaths = glob.sync(pattern);
|
||||
const integrationsPaths = globby.sync(pattern);
|
||||
const chunkSize = Math.ceil(integrationsPaths.length / chunksTotal);
|
||||
|
||||
return chunk(integrationsPaths, chunkSize)[chunkIndex - 1];
|
||||
|
|
43
yarn.lock
43
yarn.lock
|
@ -6386,7 +6386,7 @@
|
|||
"@types/glob" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.2", "@types/glob@^7.1.3":
|
||||
"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3":
|
||||
version "7.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
|
||||
integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==
|
||||
|
@ -13224,21 +13224,7 @@ del@^4.1.1:
|
|||
pify "^4.0.1"
|
||||
rimraf "^2.6.3"
|
||||
|
||||
del@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7"
|
||||
integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==
|
||||
dependencies:
|
||||
globby "^10.0.1"
|
||||
graceful-fs "^4.2.2"
|
||||
is-glob "^4.0.1"
|
||||
is-path-cwd "^2.2.0"
|
||||
is-path-inside "^3.0.1"
|
||||
p-map "^3.0.0"
|
||||
rimraf "^3.0.0"
|
||||
slash "^3.0.0"
|
||||
|
||||
del@^6.0.0, del@^6.1.1:
|
||||
del@^6.0.0, del@^6.1.0, del@^6.1.1:
|
||||
version "6.1.1"
|
||||
resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a"
|
||||
integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==
|
||||
|
@ -14951,17 +14937,6 @@ fast-equals@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-2.0.0.tgz#bef2c423af3939f2c54310df54c57e64cd2adefc"
|
||||
integrity sha512-u6RBd8cSiLLxAiC04wVsLV6GBFDOXcTCgWkd3wEoFXgidPSoAJENqC9m7Jb2vewSvjBIfXV6icKeh3GTKfIaXA==
|
||||
|
||||
fast-glob@3.2.7, fast-glob@^3.2.9:
|
||||
version "3.2.7"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
|
||||
integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==
|
||||
dependencies:
|
||||
"@nodelib/fs.stat" "^2.0.2"
|
||||
"@nodelib/fs.walk" "^1.2.3"
|
||||
glob-parent "^5.1.2"
|
||||
merge2 "^1.3.0"
|
||||
micromatch "^4.0.4"
|
||||
|
||||
fast-glob@^2.2.6:
|
||||
version "2.2.7"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
|
||||
|
@ -14974,7 +14949,7 @@ fast-glob@^2.2.6:
|
|||
merge2 "^1.2.3"
|
||||
micromatch "^3.1.10"
|
||||
|
||||
fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.11, fast-glob@^3.2.2, fast-glob@^3.2.7:
|
||||
fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.11, fast-glob@^3.2.2, fast-glob@^3.2.7, fast-glob@^3.2.9:
|
||||
version "3.2.11"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
|
||||
integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==
|
||||
|
@ -15862,14 +15837,6 @@ gl-matrix@~3.3.0:
|
|||
resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-3.3.0.tgz#232eef60b1c8b30a28cbbe75b2caf6c48fd6358b"
|
||||
integrity sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==
|
||||
|
||||
glob-all@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.2.1.tgz#082ca81afd2247cbd3ed2149bb2630f4dc877d95"
|
||||
integrity sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw==
|
||||
dependencies:
|
||||
glob "^7.1.2"
|
||||
yargs "^15.3.1"
|
||||
|
||||
glob-parent@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
|
||||
|
@ -16161,7 +16128,7 @@ got@^9.6.0:
|
|||
to-readable-stream "^1.0.0"
|
||||
url-parse-lax "^3.0.0"
|
||||
|
||||
graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
||||
graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
||||
version "4.2.10"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
|
||||
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
|
||||
|
@ -17649,7 +17616,7 @@ is-path-inside@^2.1.0:
|
|||
dependencies:
|
||||
path-is-inside "^1.0.2"
|
||||
|
||||
is-path-inside@^3.0.1, is-path-inside@^3.0.2:
|
||||
is-path-inside@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017"
|
||||
integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue