From 905d83fbc6cbaf383d13c32cd80c6f39ba07276d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 20 Aug 2024 21:52:12 +0100 Subject: [PATCH 001/157] chore(NA): upgrade into webpack v5 --- .../public/app/overview.tsx | 2 +- .../public/app/register_embeddable.tsx | 8 +- examples/field_formats_example/public/app.tsx | 10 +- package.json | 48 +- .../src/styles/styles_service.test.ts | 2 +- .../src/styles/styles_service.ts | 2 +- .../src/ace/modes/x_json/worker/index.ts | 2 +- .../src/ace/modes/x_json/worker/worker.d.ts | 14 - packages/kbn-ace/tsconfig.json | 2 +- packages/kbn-ambient-ui-types/index.d.ts | 12 + .../src/rules/no_boundary_crossing.ts | 2 +- .../src/import_resolver.ts | 4 +- packages/kbn-mapbox-gl/index.ts | 6 +- packages/kbn-mapbox-gl/tsconfig.json | 2 +- packages/kbn-monaco/BUILD.bazel | 3 +- packages/kbn-monaco/webpack.config.js | 7 +- .../src/webpack_helpers.ts | 29 +- .../kbn-optimizer/src/worker/theme_loader.ts | 15 +- .../src/worker/webpack.config.ts | 61 +- .../kbn-storybook/src/lib/default_config.ts | 20 +- packages/kbn-storybook/src/webpack.config.ts | 50 +- packages/kbn-test/src/jest/resolver.js | 2 +- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 3 +- .../src/public_path_loader.js | 14 +- .../kbn-ui-shared-deps-npm/webpack.config.js | 15 +- packages/kbn-ui-shared-deps-src/BUILD.bazel | 2 +- .../kbn-ui-shared-deps-src/webpack.config.js | 26 +- .../.storybook/main.js | 2 +- .../expression_metric/.storybook/main.js | 2 +- .../expression_tagcloud/.storybook/main.js | 2 +- .../legacy_core_editor/mode/worker/index.js | 2 +- src/plugins/unified_search/.storybook/main.js | 2 +- .../vis_types/vega/public/default_spec.ts | 2 +- .../shareable_runtime/webpack.config.js | 25 +- .../canvas/storybook/canvas_webpack.ts | 11 +- yarn.lock | 926 +++++++++++++----- 36 files changed, 887 insertions(+), 450 deletions(-) delete mode 100644 packages/kbn-ace/src/ace/modes/x_json/worker/worker.d.ts diff --git a/examples/embeddable_examples/public/app/overview.tsx b/examples/embeddable_examples/public/app/overview.tsx index c7ebb3578f4b7..eca686c7b6e13 100644 --- a/examples/embeddable_examples/public/app/overview.tsx +++ b/examples/embeddable_examples/public/app/overview.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { css } from '@emotion/react'; import { EuiMarkdownFormat } from '@elastic/eui'; // @ts-ignore -import overviewMarkdown from '!!raw-loader!@kbn/embeddable-plugin/README.md'; +import overviewMarkdown from '@kbn/embeddable-plugin/README.md?raw'; export const Overview = () => { return ( diff --git a/examples/embeddable_examples/public/app/register_embeddable.tsx b/examples/embeddable_examples/public/app/register_embeddable.tsx index ae4f2a09daa65..bce61a50197d7 100644 --- a/examples/embeddable_examples/public/app/register_embeddable.tsx +++ b/examples/embeddable_examples/public/app/register_embeddable.tsx @@ -9,13 +9,13 @@ import React from 'react'; import { EuiCodeBlock, EuiSpacer, EuiText } from '@elastic/eui'; // @ts-ignore -import registerSearchEmbeddableSource from '!!raw-loader!../react_embeddables/search/register_search_embeddable'; +import registerSearchEmbeddableSource from '../react_embeddables/search/register_search_embeddable?raw'; // @ts-ignore -import registerAttachActionSource from '!!raw-loader!../react_embeddables/search/register_add_search_panel_action'; +import registerAttachActionSource from '../react_embeddables/search/register_add_search_panel_action?raw'; // @ts-ignore -import registerFieldListEmbeddableSource from '!!raw-loader!../react_embeddables/field_list/register_field_list_embeddable'; +import registerFieldListEmbeddableSource from '../react_embeddables/field_list/register_field_list_embeddable?raw'; // @ts-ignore -import registerReactEmbeddableSavedObjectSource from '!!raw-loader!../react_embeddables/register_saved_object_example'; +import registerReactEmbeddableSavedObjectSource from '../react_embeddables/register_saved_object_example?raw'; export const RegisterEmbeddable = () => { return ( diff --git a/examples/field_formats_example/public/app.tsx b/examples/field_formats_example/public/app.tsx index 2961925f0a160..e9f9d50cf755b 100644 --- a/examples/field_formats_example/public/app.tsx +++ b/examples/field_formats_example/public/app.tsx @@ -23,15 +23,15 @@ import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import * as example1 from './examples/1_using_existing_format'; import * as example2 from './examples/2_creating_custom_formatter'; // @ts-ignore -import example1SampleCode from '!!raw-loader!./examples/1_using_existing_format'; +import example1SampleCode from './examples/1_using_existing_format?raw'; // @ts-ignore -import example2SampleCodePart1 from '!!raw-loader!../common/example_currency_format'; +import example2SampleCodePart1 from '../common/example_currency_format?raw'; // @ts-ignore -import example2SampleCodePart2 from '!!raw-loader!./examples/2_creating_custom_formatter'; +import example2SampleCodePart2 from './examples/2_creating_custom_formatter?raw'; // @ts-ignore -import example2SampleCodePart3 from '!!raw-loader!../server/examples/2_creating_custom_formatter'; +import example2SampleCodePart3 from '../server/examples/2_creating_custom_formatter?raw'; // @ts-ignore -import example3SampleCode from '!!raw-loader!./examples/3_creating_custom_format_editor'; +import example3SampleCode from './examples/3_creating_custom_format_editor?raw'; export interface Deps { fieldFormats: FieldFormatsStart; diff --git a/package.json b/package.json index d8edf6b57e459..5f3e640d3d0d5 100644 --- a/package.json +++ b/package.json @@ -1271,7 +1271,7 @@ "@bazel/typescript": "4.6.2", "@cypress/debugging-proxy": "2.0.1", "@cypress/grep": "^4.0.1", - "@cypress/webpack-preprocessor": "^6.0.1", + "@cypress/webpack-preprocessor": "^6.0.2", "@elastic/eslint-plugin-eui": "0.0.2", "@elastic/makelogs": "^6.1.1", "@elastic/synthetics": "^1.5.0", @@ -1599,10 +1599,9 @@ "@types/vinyl": "^2.0.4", "@types/vinyl-fs": "^3.0.2", "@types/watchpack": "^1.1.5", - "@types/webpack": "^4.41.3", + "@types/webpack": "^5.28.5", "@types/webpack-bundle-analyzer": "^4.7.0", - "@types/webpack-env": "^1.15.3", - "@types/webpack-merge": "^4.1.5", + "@types/webpack-env": "^1.18.5", "@types/webpack-sources": "^0.1.4", "@types/xml2js": "^0.4.11", "@types/yargs": "^15.0.0", @@ -1617,6 +1616,7 @@ "aggregate-error": "^3.1.0", "apidoc-markdown": "^7.3.2", "argsplit": "^1.0.5", + "assert": "^2.1.0", "autoprefixer": "^10.4.7", "axe-core": "^4.10.0", "babel-jest": "^29.6.1", @@ -1629,16 +1629,17 @@ "babel-plugin-transform-typescript-metadata": "^0.3.2", "backport": "^8.9.8", "blob-polyfill": "^7.0.20220408", + "buffer": "^6.0.3", "buildkite-test-collector": "^1.7.0", "callsites": "^3.1.0", "chance": "1.0.18", "chromedriver": "^126.0.3", - "clean-webpack-plugin": "^3.0.0", + "clean-webpack-plugin": "^4.0.0", "cli-progress": "^3.12.0", "cli-table3": "^0.6.1", "content-security-policy-parser": "^0.6.0", "cpy": "^8.1.1", - "css-loader": "^3.4.2", + "css-loader": "^7.1.2", "cssnano": "^5.1.12", "cssnano-preset-default": "^5.2.12", "csstype": "^3.0.2", @@ -1674,11 +1675,10 @@ "eslint-traverse": "^1.0.0", "exit-hook": "^2.2.0", "expect": "^29.6.1", - "expose-loader": "^0.7.5", + "expose-loader": "^5.0.0", "express": "^4.19.2", "faker": "^5.1.0", "fetch-mock": "^7.3.9", - "file-loader": "^4.2.0", "find-cypress-specs": "^1.41.4", "form-data": "^4.0.0", "geckodriver": "^4.4.1", @@ -1687,7 +1687,7 @@ "gulp-terser": "^2.1.0", "has-ansi": "^3.0.0", "html": "1.0.0", - "html-loader": "^1.3.2", + "html-loader": "^5.1.0", "http-proxy": "^1.18.1", "http2-proxy": "^5.0.53", "http2-wrapper": "^2.2.1", @@ -1711,10 +1711,9 @@ "license-checker": "^25.0.1", "listr2": "^8.2.4", "lmdb": "^2.9.2", - "loader-utils": "^2.0.4", "marge": "^1.0.1", "micromatch": "^4.0.7", - "mini-css-extract-plugin": "1.1.0", + "mini-css-extract-plugin": "2.9.1", "minimist": "^1.2.6", "mocha": "^10.1.0", "mocha-junit-reporter": "^2.0.2", @@ -1728,7 +1727,6 @@ "mutation-observer": "^1.0.3", "native-hdr-histogram": "^1.0.0", "nock": "12.0.3", - "null-loader": "^3.0.0", "nyc": "^15.1.0", "oboe": "^2.1.4", "openapi-types": "^10.0.0", @@ -1743,27 +1741,26 @@ "playwright": "=1.38.0", "pngjs": "^3.4.0", "postcss": "^8.4.31", - "postcss-loader": "^4.2.0", + "postcss-loader": "^8.1.1", "postcss-prefix-selector": "^1.16.0", "postcss-scss": "^4.0.4", "prettier": "^2.8.8", "proxy": "^2.1.1", - "raw-loader": "^3.1.0", "react-test-renderer": "^17.0.2", "recast": "^0.23.9", "regenerate": "^1.4.0", "resolve": "^1.22.0", "rxjs-marbles": "^7.0.1", "sass-embedded": "^1.77.8", - "sass-loader": "^10.5.1", + "sass-loader": "^16.0.1", "selenium-webdriver": "^4.22.0", "sharp": "0.32.6", "simple-git": "^3.16.0", "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.4", - "string-replace-loader": "^2.2.0", - "style-loader": "^1.1.3", + "string-replace-loader": "^3.1.0", + "style-loader": "^4.0.0", "stylelint": "^14.9.1", "stylelint-scss": "^4.3.0", "superagent": "^9.0.2", @@ -1774,23 +1771,24 @@ "table": "^6.8.1", "tape": "^5.0.1", "terser": "^5.31.6", - "terser-webpack-plugin": "^4.2.3", + "terser-webpack-plugin": "^5.3.10", "tough-cookie": "^4.1.4", "tree-kill": "^1.2.2", "ts-morph": "^15.1.0", "tsd": "^0.31.1", "typescript": "5.1.6", - "url-loader": "^2.2.0", - "val-loader": "^1.1.1", + "url": "^0.11.4", + "util": "^0.12.5", + "val-loader": "^6.0.0", "vinyl-fs": "^4.0.0", "watchpack": "^1.6.0", "web-streams-polyfill": "^4.0.0", - "webpack": "^4.41.5", + "webpack": "^5.93.0", "webpack-bundle-analyzer": "^4.5.0", - "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.9.3", - "webpack-merge": "^4.2.2", - "webpack-sources": "^1.4.1", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.0.4", + "webpack-merge": "^6.0.1", + "webpack-sources": "^3.2.3", "webpack-visualizer-plugin2": "^1.1.0", "xml-crypto": "^6.0.0", "xmlbuilder": "13.0.2", diff --git a/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.test.ts b/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.test.ts index 20625dcbc3b94..6b30bf0670be3 100644 --- a/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.test.ts +++ b/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.test.ts @@ -8,7 +8,7 @@ import { BehaviorSubject } from 'rxjs'; -jest.mock('!!raw-loader!./disable_animations.css', () => 'MOCK DISABLE ANIMATIONS CSS'); +jest.mock('./disable_animations.css?raw', () => 'MOCK DISABLE ANIMATIONS CSS'); import { StylesService } from './styles_service'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; diff --git a/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.ts b/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.ts index 9bbed46ff12f5..19852f9f66236 100644 --- a/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.ts +++ b/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.ts @@ -11,7 +11,7 @@ import { Subscription } from 'rxjs'; import type { CoreService } from '@kbn/core-base-browser-internal'; import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; // @ts-expect-error -import disableAnimationsCss from '!!raw-loader!./disable_animations.css'; +import disableAnimationsCss from './disable_animations.css?raw'; interface StartDeps { uiSettings: IUiSettingsClient; diff --git a/packages/kbn-ace/src/ace/modes/x_json/worker/index.ts b/packages/kbn-ace/src/ace/modes/x_json/worker/index.ts index 3721726fe1f5c..5a22a7e66e484 100644 --- a/packages/kbn-ace/src/ace/modes/x_json/worker/index.ts +++ b/packages/kbn-ace/src/ace/modes/x_json/worker/index.ts @@ -7,7 +7,7 @@ */ // @ts-ignore -import src from '!!raw-loader!./x_json.ace.worker'; +import src from './x_json.ace.worker?raw'; export const workerModule = { id: 'ace/mode/json_worker', diff --git a/packages/kbn-ace/src/ace/modes/x_json/worker/worker.d.ts b/packages/kbn-ace/src/ace/modes/x_json/worker/worker.d.ts deleted file mode 100644 index b5821e43930f8..0000000000000 --- a/packages/kbn-ace/src/ace/modes/x_json/worker/worker.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -// Satisfy TS's requirements that the module be declared per './index.ts'. -declare module '!!raw-loader!./worker.js' { - const content: string; - // eslint-disable-next-line import/no-default-export - export default content; -} diff --git a/packages/kbn-ace/tsconfig.json b/packages/kbn-ace/tsconfig.json index a545abd7d65a6..d0d25905b18cb 100644 --- a/packages/kbn-ace/tsconfig.json +++ b/packages/kbn-ace/tsconfig.json @@ -4,7 +4,7 @@ "allowJs": false, "outDir": "target/types", "stripInternal": true, - "types": ["node"] + "types": ["node", "@kbn/ambient-ui-types"] }, "include": [ "**/*.ts", diff --git a/packages/kbn-ambient-ui-types/index.d.ts b/packages/kbn-ambient-ui-types/index.d.ts index 7f2f3cf1d0089..8fb34fa63b644 100644 --- a/packages/kbn-ambient-ui-types/index.d.ts +++ b/packages/kbn-ambient-ui-types/index.d.ts @@ -35,3 +35,15 @@ declare module '*.mdx' { // eslint-disable-next-line import/no-default-export export default MDXComponent; } + +declare module '*?asUrl' { + const content: string; + // eslint-disable-next-line import/no-default-export + export default string; +} + +declare module '*?raw' { + const content: string; + // eslint-disable-next-line import/no-default-export + export default string; +} diff --git a/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts b/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts index 2513922e9c9a8..44295a175068a 100644 --- a/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts +++ b/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts @@ -104,7 +104,7 @@ export const NoBoundaryCrossingRule: Rule.RuleModule = { if ( req === null || // we can ignore imports using the raw-loader, they will need to be resolved but can be managed on a case by case basis - req.startsWith('!!raw-loader') || + req.endsWith('?raw') || // type only imports can stretch across all the boundaries isTypeOnlyImport(importer) ) { diff --git a/packages/kbn-import-resolver/src/import_resolver.ts b/packages/kbn-import-resolver/src/import_resolver.ts index ee1f168d693a1..699b06fa5a228 100644 --- a/packages/kbn-import-resolver/src/import_resolver.ts +++ b/packages/kbn-import-resolver/src/import_resolver.ts @@ -235,8 +235,8 @@ export class ImportResolver { resolve(req: string, dirname: string): ResolveResult | null { // transform webpack loader requests and focus on the actual file selected const lastExI = req.lastIndexOf('!'); - if (lastExI > -1) { - const quesI = req.lastIndexOf('?'); + const quesI = req.lastIndexOf('?'); + if (lastExI > -1 || quesI > -1) { const prefix = req.slice(0, lastExI + 1); const postfix = quesI > -1 ? req.slice(quesI) : ''; const result = this.resolve(req.slice(lastExI + 1, quesI > -1 ? quesI : undefined), dirname); diff --git a/packages/kbn-mapbox-gl/index.ts b/packages/kbn-mapbox-gl/index.ts index 1a3ef936494ff..59cc6dcccdf47 100644 --- a/packages/kbn-mapbox-gl/index.ts +++ b/packages/kbn-mapbox-gl/index.ts @@ -32,10 +32,8 @@ import type { // @ts-expect-error import maplibreglDist from 'maplibre-gl/dist/maplibre-gl-csp'; -// @ts-expect-error -import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js'; -// @ts-expect-error -import mbWorkerUrl from '!!file-loader!maplibre-gl/dist/maplibre-gl-csp-worker'; +import mbRtlPlugin from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js?asUrl'; +import mbWorkerUrl from 'maplibre-gl/dist/maplibre-gl-csp-worker?asUrl'; import 'maplibre-gl/dist/maplibre-gl.css'; const maplibregl: any = maplibreglDist; diff --git a/packages/kbn-mapbox-gl/tsconfig.json b/packages/kbn-mapbox-gl/tsconfig.json index 225d37d8136ea..295b6cb8147c8 100644 --- a/packages/kbn-mapbox-gl/tsconfig.json +++ b/packages/kbn-mapbox-gl/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "types": [] + "types": ["@kbn/ambient-ui-types"] }, "include": [ "**/*.ts", diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 9a2e2b8f03243..93717d8041aa8 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -41,7 +41,8 @@ webpack_cli( "@npm//terser-webpack-plugin", "@npm//@babel/runtime", "@npm//babel-loader", - "@npm//raw-loader", + "@npm//assert", + "@npm//buffer", "@npm//rxjs", "webpack.config.js", diff --git a/packages/kbn-monaco/webpack.config.js b/packages/kbn-monaco/webpack.config.js index b0e2bbd2cd680..d49bc63800677 100644 --- a/packages/kbn-monaco/webpack.config.js +++ b/packages/kbn-monaco/webpack.config.js @@ -29,7 +29,8 @@ const workerConfig = (languages) => ({ entries[language] = getWorkerEntry(language); return entries; }, {}), - devtool: process.env.NODE_ENV === 'production' ? false : '#cheap-source-map', + devtool: process.env.NODE_ENV === 'production' ? false : 'cheap-source-map', + target: 'web', output: { path: path.resolve(__dirname, 'target_workers'), filename: ({ chunk }) => `${chunk.name}.editor.worker.js`, @@ -40,6 +41,10 @@ const workerConfig = (languages) => ({ // swap default umd import for the esm one provided in vscode-uri package 'vscode-uri$': require.resolve('vscode-uri').replace(/\/umd\/index.js/, '/esm/index.mjs'), }, + fallback: { + assert: require.resolve('assert'), + buffer: require.resolve('buffer'), + }, }, stats: 'errors-only', module: { diff --git a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts index 2ad7ab8815c14..433e55d800239 100644 --- a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts +++ b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts @@ -7,32 +7,19 @@ */ import webpack from 'webpack'; -// @ts-expect-error module is not typed -import Stats from 'webpack/lib/Stats'; export function isFailureStats(stats: webpack.Stats) { if (stats.hasErrors()) { return true; } - const { warnings } = stats.toJson({ all: false, warnings: true }); - - // 1 - when typescript doesn't do a full type check, as we have the ts-loader - // configured here, it does not have enough information to determine - // whether an imported name is a type or not, so when the name is then - // exported, typescript has no choice but to emit the export. Fortunately, - // the extraneous export should not be harmful, so we just suppress these warnings - // https://github.com/TypeStrong/ts-loader#transpileonly-boolean-defaultfalse - // - // 2 - Mini Css Extract plugin tracks the order for each css import we have - // through the project (and it's successive imports) since version 0.4.2. - // In case we have the same imports more than one time with different - // sequences, this plugin will throw a warning. This should not be harmful, - // but the an issue was opened and can be followed on: - // https://github.com/webpack-contrib/mini-css-extract-plugin/issues/250#issuecomment-415345126 - const filteredWarnings = Stats.filterWarnings(warnings, STATS_WARNINGS_FILTER); - - return filteredWarnings.length > 0; + const { warnings } = stats.toJson({ + all: false, + warnings: true, + warningsFilter: STATS_WARNINGS_FILTER, + }); + + return warnings && warnings.length > 0; } const STATS_WARNINGS_FILTER = new RegExp( @@ -44,7 +31,7 @@ const STATS_WARNINGS_FILTER = new RegExp( export function failedStatsToErrorMessage(stats: webpack.Stats) { const details = stats.toString({ - ...Stats.presetToOptions('minimal'), + ...stats.compilation.createStatsOptions('minimal'), colors: true, warningsFilter: STATS_WARNINGS_FILTER, errors: true, diff --git a/packages/kbn-optimizer/src/worker/theme_loader.ts b/packages/kbn-optimizer/src/worker/theme_loader.ts index af5681e721784..8de45eac69243 100644 --- a/packages/kbn-optimizer/src/worker/theme_loader.ts +++ b/packages/kbn-optimizer/src/worker/theme_loader.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import { stringifyRequest, getOptions } from 'loader-utils'; import webpack from 'webpack'; import { parseThemeTags, ALL_THEMES, ThemeTag } from '../common'; @@ -16,18 +15,21 @@ const compare = (a: ThemeTag, b: ThemeTag) => (getVersion(a) === getVersion(b) ? 1 : 0) + (getIsDark(a) === getIsDark(b) ? 1 : 0); // eslint-disable-next-line import/no-default-export -export default function (this: webpack.loader.LoaderContext) { +export default function (this: webpack.LoaderContext) { this.cacheable(true); - const options = getOptions(this); + const options = this.getOptions(this); const bundleId = options.bundleId as string; const themeTags = parseThemeTags(options.themeTags); const cases = ALL_THEMES.map((tag) => { if (themeTags.includes(tag)) { + const req = JSON.stringify( + this.utils.contextify(this.context || this.rootContext, `${this.resourcePath}?${tag}`) + ); return ` case '${tag}': - return require(${stringifyRequest(this, `${this.resourcePath}?${tag}`)});`; + return require(${req});`; } const fallback = themeTags @@ -36,10 +38,13 @@ export default function (this: webpack.loader.LoaderContext) { .shift()!; const message = `SASS files in [${bundleId}] were not built for theme [${tag}]. Styles were compiled using the [${fallback}] theme instead to keep Kibana somewhat usable. Please adjust the advanced settings to make use of [${themeTags}] or make sure the KBN_OPTIMIZER_THEMES environment variable includes [${tag}] in a comma separated list of themes you want to compile. You can also set it to "*" to build all themes.`; + const req = JSON.stringify( + this.utils.contextify(this.context || this.rootContext, `${this.resourcePath}?${fallback}`) + ); return ` case '${tag}': console.error(new Error(${JSON.stringify(message)})); - return require(${stringifyRequest(this, `${this.resourcePath}?${fallback}`)})`; + return require(${req})`; }).join('\n'); return ` diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index f81d0e89fb983..46482c0ec4372 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -9,11 +9,9 @@ import Path from 'path'; import Fs from 'fs'; -import { stringifyRequest } from 'loader-utils'; import webpack from 'webpack'; -// @ts-expect-error import TerserPlugin from 'terser-webpack-plugin'; -import webpackMerge from 'webpack-merge'; +import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm'; import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src'; @@ -39,7 +37,6 @@ export function getWebpackConfig( const ENTRY_CREATOR = require.resolve('./entry_point_creator'); const commonConfig: webpack.Configuration = { - node: { fs: 'empty' }, context: bundle.contextDir, cache: true, entry: { @@ -54,12 +51,12 @@ export function getWebpackConfig( path: bundle.outputDir, filename: `${bundle.id}.${bundle.type}.js`, chunkFilename: `${bundle.id}.chunk.[id].js`, - devtoolModuleFilenameTemplate: (info) => + devtoolModuleFilenameTemplate: (info: any) => `/${bundle.type}:${bundle.id}/${Path.relative( bundle.sourceRoot, info.absoluteResourcePath )}${info.query}`, - jsonpFunction: `${bundle.id}_bundle_jsonpfunction`, + chunkLoadingGlobal: `jsonp_webpack_${bundle.id}`, }, optimization: { @@ -198,14 +195,17 @@ export function getWebpackConfig( { loader: 'sass-loader', options: { - additionalData(content: string, loaderContext: webpack.loader.LoaderContext) { - return `@import ${stringifyRequest( - loaderContext, - Path.resolve( - worker.repoRoot, - `src/core/public/styles/core_app/_globals_${theme}.scss` + additionalData(content: string, loaderContext: webpack.LoaderContext) { + const req = JSON.stringify( + loaderContext.utils.contextify( + loaderContext.context || loaderContext.rootContext, + Path.resolve( + worker.repoRoot, + `src/core/public/styles/core_app/_globals_${theme}.scss` + ) ) - )};\n${content}`; + ); + return `@import ${req};\n${content}`; }, implementation: require('sass-embedded'), sassOptions: { @@ -239,13 +239,6 @@ export function getWebpackConfig( }, ], }, - { - test: /\.(woff|woff2|ttf|eot|svg|ico|png|jpg|gif|jpeg)(\?|$)/, - loader: 'url-loader', - options: { - limit: 8192, - }, - }, { test: /\.(js|tsx?)$/, exclude: /node_modules/, @@ -258,16 +251,28 @@ export function getWebpackConfig( }, }, }, - { - test: /\.(html|md|txt|tmpl)$/, - use: { - loader: 'raw-loader', - }, - }, { test: /\.peggy$/, loader: require.resolve('@kbn/peggy-loader'), }, + // emits a separate file and exports the URL. Previously achievable by using file-loader. + { + test: [ + require.resolve('@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js'), + require.resolve('maplibre-gl/dist/maplibre-gl-csp-worker'), + ], + type: 'asset/resource', + }, + // exports the source code of the asset. Previously achievable by using raw-loader. + { + test: [/\.(html|md|txt|tmpl)$/], + type: 'asset/source', + }, + // automatically chooses between exporting a data URI and emitting a separate file. Previously achievable by using url-loader with asset size limit. + { + test: /\.(woff|woff2|ttf|eot|svg|ico|png|jpg|gif|jpeg)(\?|$)/, + type: 'asset', + }, ], }, @@ -280,6 +285,8 @@ export function getWebpackConfig( 'src/core/public/styles/core_app/images' ), vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'), + child_process: false, + fs: false, }, }, @@ -309,8 +316,6 @@ export function getWebpackConfig( optimization: { minimizer: [ new TerserPlugin({ - cache: false, - sourceMap: false, extractComments: false, parallel: false, terserOptions: { diff --git a/packages/kbn-storybook/src/lib/default_config.ts b/packages/kbn-storybook/src/lib/default_config.ts index 4e497572fdfd8..43fc979278e74 100644 --- a/packages/kbn-storybook/src/lib/default_config.ts +++ b/packages/kbn-storybook/src/lib/default_config.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import fs from 'fs'; import type { StorybookConfig } from '@storybook/core-common'; import webpack, { Configuration } from 'webpack'; -import webpackMerge from 'webpack-merge'; +import { merge as webpackMerge } from 'webpack-merge'; import { REPO_ROOT } from './constants'; import { default as WebpackConfig } from '../webpack.config'; @@ -23,8 +23,12 @@ const toPath = (_path: string) => path.join(REPO_ROOT, _path); // This ignore pattern excludes all of node_modules EXCEPT for `@kbn`. This allows for // changes to packages to cause a refresh in Storybook. -const IGNORE_PATTERN = - /[/\\]node_modules[/\\](?!@kbn[/\\][^/\\]+[/\\](?!node_modules)([^/\\]+))([^/\\]+[/\\][^/\\]+)/; +const IGNORE_GLOBS = [ + '**/node_modules/**', + '!**/node_modules/@kbn/**', + '!**/node_modules/@kbn/*/**', + '!**/node_modules/@kbn/*/!(node_modules)/**' +] export const defaultConfig: StorybookConfig = { addons: ['@kbn/storybook/preset', '@storybook/addon-a11y', '@storybook/addon-essentials'], @@ -98,11 +102,17 @@ export const defaultConfig: StorybookConfig = { }) ); - config.node = { fs: 'empty' }; + config.resolve = { + ...config.resolve, + fallback: { + ...config?.resolve?.fallback, + fs: false, + }, + }; config.watch = true; config.watchOptions = { ...config.watchOptions, - ignored: [IGNORE_PATTERN], + ignored: IGNORE_GLOBS, }; // Remove when @storybook has moved to @emotion v11 diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 12f419f4d32db..95ae03e120c51 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -6,24 +6,16 @@ * Side Public License, v 1. */ +/* eslint-disable import/no-default-export */ import { externals } from '@kbn/ui-shared-deps-src'; -import { stringifyRequest } from 'loader-utils'; import { resolve } from 'path'; -import webpack, { Configuration, Stats } from 'webpack'; -import webpackMerge from 'webpack-merge'; +import webpack, { Configuration } from 'webpack'; +import { merge as webpackMerge } from 'webpack-merge'; import { REPO_ROOT } from './lib/constants'; import { IgnoreNotFoundExportPlugin } from './ignore_not_found_export_plugin'; type Preset = string | [string, Record] | Record; -const stats = { - ...Stats.presetToOptions('minimal'), - colors: true, - errorDetails: true, - errors: true, - moduleTrace: true, -}; - function isProgressPlugin(plugin: any) { return 'handler' in plugin && plugin.showActiveModules && plugin.showModules; } @@ -33,7 +25,10 @@ function isHtmlPlugin(plugin: any): plugin is { options: { template: string } } } interface BabelLoaderRule extends webpack.RuleSetRule { - use: webpack.RuleSetLoader[]; + use: Array<{ + loader: 'babel-loader'; + [key: string]: unknown; + }>; } function isBabelLoaderRule(rule: webpack.RuleSetRule): rule is BabelLoaderRule { @@ -42,7 +37,7 @@ function isBabelLoaderRule(rule: webpack.RuleSetRule): rule is BabelLoaderRule { Array.isArray(rule.use) && rule.use.some( (l) => - typeof l === 'object' && typeof l.loader === 'string' && l.loader.includes('babel-loader') + typeof l === 'object' && typeof l?.loader === 'string' && l?.loader.includes('babel-loader') ) ); } @@ -67,11 +62,13 @@ function isDesiredPreset(preset: Preset) { } // Extend the Storybook Webpack config with some customizations -/* eslint-disable import/no-default-export */ +/** + * @returns {import('webpack').Configuration} + */ export default ({ config: storybookConfig }: { config: Configuration }) => { const config = { devServer: { - stats, + stats: 'errors-only', }, externals, module: { @@ -82,9 +79,7 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { rules: [ { test: /\.(html|md|txt|tmpl)$/, - use: { - loader: 'raw-loader', - }, + type: 'asset/source', }, { test: /\.peggy$/, @@ -110,10 +105,13 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { loader: 'sass-loader', options: { additionalData(content: string, loaderContext: any) { - return `@import ${stringifyRequest( - loaderContext, - resolve(REPO_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss') - )};\n${content}`; + const req = JSON.stringify( + loaderContext.utils.contextify( + loaderContext.context || loaderContext.rootContext, + resolve(REPO_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss') + ) + ); + return `@import ${req};\n${content}`; }, implementation: require('sass-embedded'), sassOptions: { @@ -136,16 +134,16 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), }, }, - stats, + stats: 'errors-only', }; // Override storybookConfig mainFields instead of merging with config delete storybookConfig.resolve?.mainFields; - const updatedModuleRules = []; + const updatedModuleRules: webpack.RuleSetRule[] = []; // clone and modify the module.rules config provided by storybook so that the default babel plugins run after the typescript preset for (const originalRule of storybookConfig.module?.rules ?? []) { - const rule = { ...originalRule }; + const rule = typeof originalRule !== 'string' ? { ...originalRule } : {}; updatedModuleRules.push(rule); if (isBabelLoaderRule(rule)) { @@ -198,7 +196,7 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { filteredStorybookPlugins.push(plugin); } - return webpackMerge( + return webpackMerge( { ...storybookConfig, plugins: filteredStorybookPlugins, diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 2723851340ae4..655d2535f6bbb 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -74,7 +74,7 @@ module.exports = (request, options) => { } } - if (request.startsWith('file-loader!') || request.startsWith('!!file-loader!')) { + if (req.endsWith('?asUrl')) { return FILE_MOCK; } diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 937cbe0c2a8ef..bf3994398f034 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -26,7 +26,6 @@ SRCS = glob( RUNTIME_DEPS = [ "@npm//babel-loader", "@npm//@babel/plugin-proposal-optional-chaining", - "@npm//loader-utils", "@npm//val-loader", "//packages/kbn-repo-info", # deps in the dll need to be included in the sandbox for consumers @@ -45,6 +44,7 @@ RUNTIME_DEPS = [ "@npm//@hello-pangea/dnd", "@npm//@tanstack/react-query", "@npm//@tanstack/react-query-devtools", + "@npm//buffer", "@npm//classnames", "@npm//fflate", "@npm//fastest-levenshtein", @@ -61,6 +61,7 @@ RUNTIME_DEPS = [ "@npm//rxjs", "@npm//styled-components", "@npm//tslib", + "@npm//util", "@npm//uuid", "@npm//io-ts", "@npm//@reduxjs/toolkit", diff --git a/packages/kbn-ui-shared-deps-npm/src/public_path_loader.js b/packages/kbn-ui-shared-deps-npm/src/public_path_loader.js index 77057cd426869..fe5c167d9e831 100644 --- a/packages/kbn-ui-shared-deps-npm/src/public_path_loader.js +++ b/packages/kbn-ui-shared-deps-npm/src/public_path_loader.js @@ -6,19 +6,21 @@ * Side Public License, v 1. */ -// eslint-disable-next-line import/no-extraneous-dependencies -const { stringifyRequest } = require('loader-utils'); - const VAL_LOADER = require.resolve('val-loader'); const MODULE_CREATOR = require.resolve('./public_path_module_creator'); /** - * @this {any} this + * @this {import('webpack').LoaderContext} * @param {string} source */ module.exports = function (source) { const options = this.query; const valOpts = new URLSearchParams({ key: options.key }).toString(); - const req = `${VAL_LOADER}?${valOpts}!${MODULE_CREATOR}`; - return `require(${stringifyRequest(this, req)});${source}`; + const req = JSON.stringify( + this.utils.contextify( + this.context || this.rootContext, + `${VAL_LOADER}?${valOpts}!${MODULE_CREATOR}` + ) + ); + return `require(${req});${source}`; }; diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 294bffdaaa833..c4d3668872347 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -18,14 +18,11 @@ const WEBPACK_SRC = require.resolve('webpack'); const REPO_ROOT = Path.resolve(__dirname, '..', '..'); +/** @returns {import('webpack').Configuration} */ module.exports = (_, argv) => { const outputPath = argv.outputPath ? Path.resolve(argv.outputPath) : UiSharedDepsNpm.distDir; return { - node: { - child_process: 'empty', - fs: 'empty', - }, externals: { module: 'module', }, @@ -104,6 +101,7 @@ module.exports = (_, argv) => { }, context: __dirname, devtool: 'cheap-source-map', + target: 'web', output: { path: outputPath, filename: '[name].dll.js', @@ -111,7 +109,6 @@ module.exports = (_, argv) => { devtoolModuleFilenameTemplate: (info) => `kbn-ui-shared-deps-npm/${Path.relative(REPO_ROOT, info.absoluteResourcePath)}`, library: '__kbnSharedDeps_npm__', - futureEmitAssets: true, }, module: { @@ -145,11 +142,17 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], + fallback: { + child_process: false, + fs: false, + util: require.resolve('util'), + buffer: require.resolve('buffer'), + }, }, optimization: { minimize: false, - noEmitOnErrors: true, + emitOnErrors: false, }, performance: { diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index cd723a8ed6401..a1ffc4a2ddbec 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -15,7 +15,7 @@ webpack_cli( "@npm//moment", "@npm//babel-loader", "@npm//css-loader", - "@npm//url-loader", + "@npm//url", "@npm//@babel/plugin-transform-numeric-separator", "//packages/kbn-ui-shared-deps-npm", "//packages/kbn-babel-register", diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 2f81dc5e1d8e5..9bf30d7df9e2e 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -21,11 +21,8 @@ const MOMENT_SRC = require.resolve('moment/min/moment-with-locales.js'); const REPO_ROOT = Path.resolve(__dirname, '..', '..'); +/** @returns {import('webpack').Configuration} */ module.exports = { - node: { - child_process: 'empty', - fs: 'empty', - }, externals: { module: 'module', }, @@ -35,6 +32,7 @@ module.exports = { }, context: __dirname, devtool: 'cheap-source-map', + target: 'web', output: { path: UiSharedDepsSrcDistDir, filename: '[name].js', @@ -43,7 +41,6 @@ module.exports = { devtoolModuleFilenameTemplate: (info) => `kbn-ui-shared-deps-src/${Path.relative(REPO_ROOT, info.absoluteResourcePath)}`, library: '__kbnSharedDeps__', - futureEmitAssets: true, }, module: { @@ -67,13 +64,6 @@ module.exports = { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'], }, - { - test: /\.(ttf)(\?|$)/, - loader: 'url-loader', - options: { - limit: 8192, - }, - }, { test: /\.(js|tsx?)$/, exclude: /[\/\\]node_modules[\/\\](?!@kbn)([^\/\\]+)[\/\\]/, @@ -101,6 +91,11 @@ module.exports = { }, }, }, + // automatically chooses between exporting a data URI and emitting a separate file. Previously achievable by using url-loader with asset size limit. + { + test: /\.(ttf)(\?|$)/, + type: 'asset', + }, ], }, @@ -114,11 +109,16 @@ module.exports = { 'react-dom$': 'react-dom/profiling', 'scheduler/tracing': 'scheduler/tracing-profiling', }, + fallback: { + child_process: false, + fs: false, + url: require.resolve('url'), + }, }, optimization: { minimize: false, - noEmitOnErrors: true, + emitOnErrors: false, }, performance: { diff --git a/src/plugins/chart_expressions/expression_legacy_metric/.storybook/main.js b/src/plugins/chart_expressions/expression_legacy_metric/.storybook/main.js index 80e65c9e371f0..f6513394f076d 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/.storybook/main.js +++ b/src/plugins/chart_expressions/expression_legacy_metric/.storybook/main.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ import { defaultConfig } from '@kbn/storybook'; -import webpackMerge from 'webpack-merge'; +import { merge as webpackMerge } from 'webpack-merge'; import { resolve } from 'path'; const mockConfig = { diff --git a/src/plugins/chart_expressions/expression_metric/.storybook/main.js b/src/plugins/chart_expressions/expression_metric/.storybook/main.js index f73918da64596..e48632f2008ab 100644 --- a/src/plugins/chart_expressions/expression_metric/.storybook/main.js +++ b/src/plugins/chart_expressions/expression_metric/.storybook/main.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ import { defaultConfig } from '@kbn/storybook'; -import webpackMerge from 'webpack-merge'; +import { merge as webpackMerge } from 'webpack-merge'; import { resolve } from 'path'; const mockConfig = { diff --git a/src/plugins/chart_expressions/expression_tagcloud/.storybook/main.js b/src/plugins/chart_expressions/expression_tagcloud/.storybook/main.js index cb483d5394285..3042011e1cf39 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/.storybook/main.js +++ b/src/plugins/chart_expressions/expression_tagcloud/.storybook/main.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ import { defaultConfig } from '@kbn/storybook'; -import webpackMerge from 'webpack-merge'; +import { merge as webpackMerge } from 'webpack-merge'; import { resolve } from 'path'; const mockConfig = { diff --git a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/index.js b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/index.js index 32c4d77a75df7..e75044c503240 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/index.js +++ b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/index.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import src from '!!raw-loader!./worker'; +import src from './worker?raw'; export const workerModule = { id: 'sense_editor/mode/worker', diff --git a/src/plugins/unified_search/.storybook/main.js b/src/plugins/unified_search/.storybook/main.js index 3c5919edc3e53..c3863bacbba90 100644 --- a/src/plugins/unified_search/.storybook/main.js +++ b/src/plugins/unified_search/.storybook/main.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ import { defaultConfig } from '@kbn/storybook'; -import webpackMerge from 'webpack-merge'; +import { merge as webpackMerge } from 'webpack-merge'; import { resolve } from 'path'; const mockConfig = { diff --git a/src/plugins/vis_types/vega/public/default_spec.ts b/src/plugins/vis_types/vega/public/default_spec.ts index a6ea02165340a..b6612a1327b54 100644 --- a/src/plugins/vis_types/vega/public/default_spec.ts +++ b/src/plugins/vis_types/vega/public/default_spec.ts @@ -7,6 +7,6 @@ */ // @ts-ignore -import defaultSpec from '!!raw-loader!./default.spec.hjson'; +import defaultSpec from './default.spec.hjson?raw'; export const getDefaultSpec = () => defaultSpec; diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js index a2ed32fe77573..ab44d7bb7da02 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js +++ b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js @@ -9,7 +9,6 @@ require('@kbn/babel-register').install(); const path = require('path'); const webpack = require('webpack'); -const { stringifyRequest } = require('loader-utils'); const { CiStatsPlugin } = require('./webpack/ci_stats_plugin'); const { @@ -21,6 +20,7 @@ const { const isProd = process.env.NODE_ENV === 'production'; +/** @type {import('webpack').Configuration} */ module.exports = { context: KIBANA_ROOT, entry: { @@ -35,6 +35,8 @@ module.exports = { resolve: { alias: { core_app_image_assets: path.resolve(KIBANA_ROOT, 'src/core/public/styles/core_app/images'), + [require.resolve('@elastic/eui/es/components/drag_and_drop')]: false, + [require.resolve('highlight.js')]: false, }, extensions: ['.js', '.json', '.ts', '.tsx', '.scss'], mainFields: ['browser', 'main'], @@ -160,10 +162,16 @@ module.exports = { loader: 'sass-loader', options: { additionalData(content, loaderContext) { - return `@import ${stringifyRequest( - loaderContext, - path.resolve(KIBANA_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss') - )};\n${content}`; + const req = JSON.stringify( + loaderContext.utils.contextify( + loaderContext.context || loaderContext.rootContext, + path.resolve( + KIBANA_ROOT, + 'src/core/public/styles/core_app/_globals_v8light.scss' + ) + ) + ); + return `@import ${req};\n${content}`; }, implementation: require('sass-embedded'), sassOptions: { @@ -188,13 +196,6 @@ module.exports = { loader: 'html-loader', exclude: /node_modules/, }, - { - test: [ - require.resolve('@elastic/eui/es/components/drag_and_drop'), - require.resolve('highlight.js'), - ], - use: require.resolve('null-loader'), - }, { test: /\.peggy$/, use: require.resolve('@kbn/peggy-loader'), diff --git a/x-pack/plugins/canvas/storybook/canvas_webpack.ts b/x-pack/plugins/canvas/storybook/canvas_webpack.ts index c6ae4a9dbaa95..db507748e2519 100644 --- a/x-pack/plugins/canvas/storybook/canvas_webpack.ts +++ b/x-pack/plugins/canvas/storybook/canvas_webpack.ts @@ -43,19 +43,14 @@ export const canvasWebpack = { }, ], }, - // Exclude large-dependency, troublesome or irrelevant modules. - { - test: [ - resolve(KIBANA_ROOT, 'x-pack/plugins/canvas/public/components/embeddable_flyout'), - resolve(KIBANA_ROOT, 'x-pack/plugins/reporting/public'), - ], - use: 'null-loader', - }, ], }, resolve: { alias: { 'src/plugins': resolve(KIBANA_ROOT, 'src/plugins'), + // Exclude large-dependency, troublesome or irrelevant modules. + [resolve(KIBANA_ROOT, 'x-pack/plugins/canvas/public/components/embeddable_flyout')]: false, + [resolve(KIBANA_ROOT, 'x-pack/plugins/reporting/public')]: false, }, }, }; diff --git a/yarn.lock b/yarn.lock index 0d94353a5941c..f2848fbede658 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1562,10 +1562,10 @@ tunnel-agent "^0.6.0" uuid "^8.3.2" -"@cypress/webpack-preprocessor@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@cypress/webpack-preprocessor/-/webpack-preprocessor-6.0.1.tgz#5369527c063b2f4718a125ddbd163c5775086e06" - integrity sha512-WVNeFVSnFKxE3WZNRIriduTgqJRpevaiJIPlfqYTTzfXRD7X1Pv4woDE+G4caPV9bJqVKmVFiwzrXMRNeJxpxA== +"@cypress/webpack-preprocessor@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@cypress/webpack-preprocessor/-/webpack-preprocessor-6.0.2.tgz#58a96aa4dbff7433dd37d24ed47e413aa3d3fabb" + integrity sha512-0+1+4iy4W9PE6R5ywBNKAZoFp8Sf//w3UJ+CKTqkcAjA29b+dtsD0iFT70DsYE0BMqUM1PO7HXFGbXllQ+bRAA== dependencies: bluebird "3.7.1" debug "^4.3.4" @@ -3287,6 +3287,26 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@jsonjoy.com/base64@^1.1.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.2.tgz#cf8ea9dcb849b81c95f14fc0aaa151c6b54d2578" + integrity sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA== + +"@jsonjoy.com/json-pack@^1.0.3": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.1.0.tgz#33ca57ee29d12feef540f2139225597469dec894" + integrity sha512-zlQONA+msXPPwHWZMKFVS78ewFczIll5lXiVPwFPCZUsrOKdxc2AvxU1HoNBmMRhqDZUR9HkC3UOm+6pME6Xsg== + dependencies: + "@jsonjoy.com/base64" "^1.1.1" + "@jsonjoy.com/util" "^1.1.2" + hyperdyperid "^1.2.0" + thingies "^1.20.0" + +"@jsonjoy.com/util@^1.1.2", "@jsonjoy.com/util@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.3.0.tgz#e5623885bb5e0c48c1151e4dae422fb03a5887a1" + integrity sha512-Cebt4Vk7k1xHy87kHY7KSPLT77A7Ev7IfOblyLZhtYEhrdQ6fX4EoLq3xOQ3O/DRMEh2ok5nyC180E+ABS8Wmw== + "@juggle/resize-observer@^3.3.1": version "3.4.0" resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" @@ -10029,10 +10049,10 @@ "@types/connect" "*" "@types/node" "*" -"@types/bonjour@^3.5.9": - version "3.5.10" - resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.10.tgz#0f6aadfe00ea414edc86f5d106357cda9701e275" - integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== +"@types/bonjour@^3.5.13": + version "3.5.13" + resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.13.tgz#adf90ce1a105e81dd1f9c61fdc5afda1bfb92956" + integrity sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ== dependencies: "@types/node" "*" @@ -10116,10 +10136,10 @@ dependencies: "@types/color-convert" "*" -"@types/connect-history-api-fallback@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" - integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== +"@types/connect-history-api-fallback@^1.5.4": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz#7de71645a103056b48ac3ce07b3520b819c1d5b3" + integrity sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw== dependencies: "@types/express-serve-static-core" "*" "@types/node" "*" @@ -10317,6 +10337,16 @@ "@types/qs" "*" "@types/range-parser" "*" +"@types/express-serve-static-core@^4.17.33": + version "4.19.3" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz#e469a13e4186c9e1c0418fb17be8bc8ff1b19a7a" + integrity sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + "@types/express@*", "@types/express@^4.17.13": version "4.17.13" resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.13.tgz#a76e2995728999bab51a33fabce1d705a3709034" @@ -10327,6 +10357,16 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/express@^4.17.21": + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + "@types/extract-zip@^1.6.2": version "1.6.2" resolved "https://registry.yarnpkg.com/@types/extract-zip/-/extract-zip-1.6.2.tgz#5c7eb441c41136167a42b88b64051e6260c29e86" @@ -10526,6 +10566,11 @@ resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== +"@types/http-errors@*": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.4.tgz#7eb47726c391b7345a6ec35ad7f4de469cf5ba4f" + integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== + "@types/http-proxy@^1.17.4", "@types/http-proxy@^1.17.8": version "1.17.9" resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.9.tgz#7f0e7931343761efde1e2bf48c40f02f3f75705a" @@ -10857,7 +10902,7 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node-forge@^1.3.11": +"@types/node-forge@^1.3.0", "@types/node-forge@^1.3.11": version "1.3.11" resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== @@ -11198,6 +11243,11 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== +"@types/retry@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" + integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -11226,14 +11276,22 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== -"@types/serve-index@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" - integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== +"@types/send@*": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" + integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-index@^1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.4.tgz#e6ae13d5053cb06ed36392110b4f9a49ac4ec898" + integrity sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug== dependencies: "@types/express" "*" -"@types/serve-static@*", "@types/serve-static@^1.13.10": +"@types/serve-static@*": version "1.13.10" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.10.tgz#f5e0ce8797d2d7cc5ebeda48a52c96c4fa47a8d9" integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== @@ -11241,6 +11299,15 @@ "@types/mime" "^1" "@types/node" "*" +"@types/serve-static@^1.15.5": + version "1.15.7" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.7.tgz#22174bbd74fb97fe303109738e9b5c2f3064f714" + integrity sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + "@types/set-value@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/set-value/-/set-value-2.0.0.tgz#63d386b103926dcf49b50e16e0f6dd49983046be" @@ -11261,10 +11328,10 @@ resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== -"@types/sockjs@^0.3.33": - version "0.3.33" - resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" - integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== +"@types/sockjs@^0.3.36": + version "0.3.36" + resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.36.tgz#ce322cf07bcc119d4cbf7f88954f3a3bd0f67535" + integrity sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q== dependencies: "@types/node" "*" @@ -11470,17 +11537,15 @@ tapable "^2.2.0" webpack "^5" -"@types/webpack-env@^1.15.3", "@types/webpack-env@^1.16.0": +"@types/webpack-env@^1.16.0": version "1.16.3" resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.16.3.tgz#b776327a73e561b71e7881d0cd6d34a1424db86a" integrity sha512-9gtOPPkfyNoEqCQgx4qJKkuNm/x0R2hKR7fdl7zvTJyHnIisuE/LfvXOsYWL0o3qq6uiBnKZNNNzi3l0y/X+xw== -"@types/webpack-merge@^4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/webpack-merge/-/webpack-merge-4.1.5.tgz#265fbee4810474860d0f4c17e0107032881eed47" - integrity sha512-cbDo592ljSHeaVe5Q39JKN6Z4vMhmo4+C3JbksOIg+kjhKQYN2keGN7dvr/i18+dughij98Qrsfn1mU9NgVoCA== - dependencies: - "@types/webpack" "*" +"@types/webpack-env@^1.18.5": + version "1.18.5" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.18.5.tgz#eccda0b04fe024bed505881e2e532f9c119169bf" + integrity sha512-wz7kjjRRj8/Lty4B+Kr0LN6Ypc/3SymeCCGSbaXp2leH0ZVg/PriNiOwNj4bD4uphI7A8NXS4b6Gl373sfO5mA== "@types/webpack-sources@*", "@types/webpack-sources@^0.1.4": version "0.1.5" @@ -11491,7 +11556,7 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@types/webpack@*", "@types/webpack@^4", "@types/webpack@^4.4.31", "@types/webpack@^4.41.26", "@types/webpack@^4.41.3", "@types/webpack@^4.41.8": +"@types/webpack@^4", "@types/webpack@^4.41.26", "@types/webpack@^4.41.8": version "4.41.32" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.32.tgz#a7bab03b72904070162b2f169415492209e94212" integrity sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg== @@ -11503,7 +11568,7 @@ anymatch "^3.0.0" source-map "^0.6.0" -"@types/webpack@^5.0.0": +"@types/webpack@^5.0.0", "@types/webpack@^5.28.5": version "5.28.5" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-5.28.5.tgz#0e9d9a15efa09bbda2cef41356ca4ac2031ea9a2" integrity sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw== @@ -11517,13 +11582,20 @@ resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g== -"@types/ws@*", "@types/ws@^8.5.1": +"@types/ws@*": version "8.5.3" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== dependencies: "@types/node" "*" +"@types/ws@^8.5.10": + version "8.5.12" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e" + integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== + dependencies: + "@types/node" "*" + "@types/xml2js@^0.4.11": version "0.4.11" resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.4.11.tgz#bf46a84ecc12c41159a7bd9cf51ae84129af0e79" @@ -11934,22 +12006,20 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" - integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== -"@webpack-cli/info@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" - integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== - dependencies: - envinfo "^7.7.3" +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== -"@webpack-cli/serve@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" - integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== "@wojtekmaj/enzyme-adapter-react-17@^0.6.7": version "0.6.7" @@ -12209,7 +12279,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-keywords@^5.0.0: +ajv-keywords@^5.0.0, ajv-keywords@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== @@ -12226,7 +12296,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.8.0: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.8.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -12561,11 +12631,6 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-flatten@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - array-from@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195" @@ -12715,6 +12780,17 @@ assert@^1.1.1: object-assign "^4.1.1" util "0.10.3" +assert@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" + integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== + dependencies: + call-bind "^1.0.2" + is-nan "^1.3.2" + object-is "^1.1.5" + object.assign "^4.1.4" + util "^0.12.5" + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -13388,13 +13464,11 @@ body-parser@1.20.2: type-is "~1.6.18" unpipe "1.0.0" -bonjour-service@^1.0.11: - version "1.0.13" - resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.0.13.tgz#4ac003dc1626023252d58adf2946f57e5da450c1" - integrity sha512-LWKRU/7EqDUC9CTAQtuZl5HzBALoCYwtLhffW3et7vZMwv3bWLpJf8bRYlMD5OCcDpTfnPgNCV4yo9ZIaJGMiA== +bonjour-service@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.2.1.tgz#eb41b3085183df3321da1264719fbada12478d02" + integrity sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw== dependencies: - array-flatten "^2.1.2" - dns-equal "^1.0.0" fast-deep-equal "^3.1.3" multicast-dns "^7.2.5" @@ -13697,6 +13771,13 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= +bundle-name@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" + integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== + dependencies: + run-applescript "^7.0.0" + byte-size@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-8.1.0.tgz#6353d0bc14ab7a69abcefbf11f8db0145a862cb5" @@ -13877,6 +13958,14 @@ camel-case@^4.1.1: pascal-case "^3.1.1" tslib "^1.10.0" +camel-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + camelcase-css@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" @@ -14136,7 +14225,7 @@ child-process-promise@^2.2.1: node-version "^1.0.0" promise-polyfill "^6.0.1" -chokidar@3.5.3, chokidar@^2.1.2, chokidar@^2.1.8, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.3: +chokidar@3.5.3, chokidar@^2.1.2, chokidar@^2.1.8, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.3, chokidar@^3.6.0: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -14251,17 +14340,23 @@ clean-css@^4.2.3: dependencies: source-map "~0.6.0" +clean-css@~5.3.2: + version "5.3.3" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd" + integrity sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg== + dependencies: + source-map "~0.6.0" + clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -clean-webpack-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz#a99d8ec34c1c628a4541567aa7b457446460c62b" - integrity sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A== +clean-webpack-plugin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-4.0.0.tgz#72947d4403d452f38ed61a9ff0ada8122aacd729" + integrity sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w== dependencies: - "@types/webpack" "^4.4.31" del "^4.1.1" cli-boxes@^2.2.1: @@ -14586,7 +14681,7 @@ commander@6.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.0.tgz#b990bfb8ac030aedc6d11bc04d1488ffef56db75" integrity sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q== -commander@7, commander@^7.0.0, commander@^7.2.0: +commander@7, commander@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -14596,7 +14691,7 @@ commander@8: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@^10.0.1: +commander@^10.0.0, commander@^10.0.1: version "10.0.1" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== @@ -15098,7 +15193,7 @@ css-line-break@^2.1.0: dependencies: utrie "^1.0.2" -css-loader@^3.4.2, css-loader@^3.6.0: +css-loader@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.6.0.tgz#2e4b2c7e6e2d27f8c8f28f61bffcd2e6c91ef645" integrity sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ== @@ -15117,6 +15212,20 @@ css-loader@^3.4.2, css-loader@^3.6.0: schema-utils "^2.7.0" semver "^6.3.0" +css-loader@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.2.tgz#64671541c6efe06b0e22e750503106bdd86880f8" + integrity sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA== + dependencies: + icss-utils "^5.1.0" + postcss "^8.4.33" + postcss-modules-extract-imports "^3.1.0" + postcss-modules-local-by-default "^4.0.5" + postcss-modules-scope "^3.2.0" + postcss-modules-values "^4.0.0" + postcss-value-parser "^4.2.0" + semver "^7.5.4" + css-select@^4.1.3: version "4.3.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" @@ -15902,6 +16011,19 @@ default-browser-id@^1.0.4: meow "^3.1.0" untildify "^2.0.0" +default-browser-id@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" + integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== + +default-browser@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" + integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== + dependencies: + bundle-name "^4.1.0" + default-browser-id "^5.0.0" + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -15942,6 +16064,11 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" @@ -16296,11 +16423,6 @@ discontinuous-range@1.0.0: resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - dns-packet@^5.2.2: version "5.4.0" resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" @@ -16382,13 +16504,6 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" -domhandler@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-3.0.0.tgz#51cd13efca31da95bbb0c5bee3a48300e333b3e9" - integrity sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw== - dependencies: - domelementtype "^2.0.1" - domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" @@ -16408,7 +16523,7 @@ dompurify@^3.0.6: resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.5.tgz#2c6a113fc728682a0f55684b1388c58ddb79dc38" integrity sha512-lwG+n5h8QNpxtyrJW/gJWckL+1/DQiYMX8f7t8Z2AZTPw1esVrqjI63i7Zc2Gz0aKzLVMYC1V1PL/ky+aY/NgA== -domutils@^2.0.0, domutils@^2.5.2, domutils@^2.8.0: +domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== @@ -16754,6 +16869,14 @@ enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enhanced-resolve@^5.17.0: + version "5.17.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" + integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -17752,10 +17875,10 @@ exponential-backoff@^3.1.1: resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== -expose-loader@^0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/expose-loader/-/expose-loader-0.7.5.tgz#e29ea2d9aeeed3254a3faa1b35f502db9f9c3f6f" - integrity sha512-iPowgKUZkTPX5PznYsmifVj9Bob0w2wTHVkt/eYNPSzyebkUgIedmskf/kcfEIWpiWjg3JRjnW+a17XypySMuw== +expose-loader@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/expose-loader/-/expose-loader-5.0.0.tgz#41368903eb1246b7c09fecf32c5cb3f67d0260e6" + integrity sha512-BtUqYRmvx1bEY5HN6eK2I9URUZgNmN0x5UANuocaNjXSgfoDlkXt+wyEMe7i5DzDNh2BKJHPc5F4rBwEdSQX6w== expr-eval@^2.0.2: version "2.0.2" @@ -18070,14 +18193,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -file-loader@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-4.2.0.tgz#5fb124d2369d7075d70a9a5abecd12e60a95215e" - integrity sha512-+xZnaK5R8kBJrHK0/6HRlrKNamvVS5rjyuju+rnyxRGuwUJwpAMsVzUl5dz6rK8brkzjV6JpcFNjp6NqV0g1OQ== - dependencies: - loader-utils "^1.2.3" - schema-utils "^2.0.0" - file-loader@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" @@ -18969,6 +19084,18 @@ glob@^10.3.10: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@^10.3.7: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0, glob@^7.2.3, glob@~7.2.0: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -19657,27 +19784,30 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-entities@^2.1.0, html-entities@^2.3.2: +html-entities@^2.1.0: version "2.3.3" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== +html-entities@^2.4.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" + integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-loader@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-1.3.2.tgz#5a72ebba420d337083497c9aba7866c9e1aee340" - integrity sha512-DEkUwSd0sijK5PF3kRWspYi56XP7bTNkyg5YWSzBdjaSDmvCufep5c4Vpb3PBf6lUL0YPtLwBfy9fL0t5hBAGA== +html-loader@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-5.1.0.tgz#85c13e0abc3b5f3aa6e7f664eee6e44d00718d95" + integrity sha512-Jb3xwDbsm0W3qlXrCZwcYqYGnYz55hb6aoKQTlzyZPXsPpi6tHXzAfqalecglMQgNvtEfxrCQPaKT90Irt5XDA== dependencies: - html-minifier-terser "^5.1.1" - htmlparser2 "^4.1.0" - loader-utils "^2.0.0" - schema-utils "^3.0.0" + html-minifier-terser "^7.2.0" + parse5 "^7.1.2" -html-minifier-terser@^5.0.1, html-minifier-terser@^5.1.1: +html-minifier-terser@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" integrity sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg== @@ -19690,6 +19820,19 @@ html-minifier-terser@^5.0.1, html-minifier-terser@^5.1.1: relateurl "^0.2.7" terser "^4.6.3" +html-minifier-terser@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz#18752e23a2f0ed4b0f550f217bb41693e975b942" + integrity sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA== + dependencies: + camel-case "^4.1.2" + clean-css "~5.3.2" + commander "^10.0.0" + entities "^4.4.0" + param-case "^3.0.4" + relateurl "^0.2.7" + terser "^5.15.1" + html-tags@^3.1.0, html-tags@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.2.0.tgz#dbb3518d20b726524e4dd43de397eb0a95726961" @@ -19741,16 +19884,6 @@ html@1.0.0: dependencies: concat-stream "^1.4.7" -htmlparser2@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-4.1.0.tgz#9a4ef161f2e4625ebf7dfbe6c0a2f52d18a59e78" - integrity sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q== - dependencies: - domelementtype "^2.0.1" - domhandler "^3.0.0" - domutils "^2.0.0" - entities "^2.0.0" - htmlparser2@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" @@ -19934,6 +20067,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + hyphenate-style-name@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.3.tgz#097bb7fa0b8f1a9cf0bd5c734cf95899981a9b48" @@ -19972,6 +20110,11 @@ icss-utils@^4.0.0, icss-utils@^4.1.1: dependencies: postcss "^7.0.14" +icss-utils@^5.0.0, icss-utils@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" + integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== + ieee754@^1.1.12, ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -20180,6 +20323,11 @@ interpret@^2.2.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + intl-messageformat@10.5.12: version "10.5.12" resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.5.12.tgz#a0c1a20da896b7a1f4ba1b59c8ba5d9943c29c3f" @@ -20240,10 +20388,10 @@ ipaddr.js@2.0.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.0.tgz#77ccccc8063ae71ab65c55f21b090698e763fc6e" integrity sha512-S54H9mIj0rbxRIyrDMEuuER86LdlgUg9FSeZ8duQb6CUG2iRrA36MYVQBSprTF/ZeAwvyQ5mDGuNvIPM0BIl3w== -ipaddr.js@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" - integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== +ipaddr.js@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" + integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== irregular-plurals@^3.2.0: version "3.2.0" @@ -20429,6 +20577,11 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-dom@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-dom/-/is-dom-1.1.0.tgz#af1fced292742443bb59ca3f76ab5e80907b4e8a" @@ -20495,6 +20648,13 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.0.0.tgz#038c31b774709641bda678b1f06a4e3227c10b3e" integrity sha512-elzyIdM7iKoFHzcrndIqjYomImhxrFRnGP3galODoII4TB9gI7mZ+FnlLQmmjf27SxHS2gKEeyhX5/+YRS6H9g== +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + is-glob@^3.0.0, is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -20519,6 +20679,13 @@ is-in-ci@^0.1.0: resolved "https://registry.yarnpkg.com/is-in-ci/-/is-in-ci-0.1.0.tgz#5e07d6a02ec3a8292d3f590973357efa3fceb0d3" integrity sha512-d9PXLEY0v1iJ64xLiQMJ51J128EYHAaOR4yZqQi8aHGfw6KgifM3/Viw1oZZ1GCVmb3gBuyhLyHj0HgR2DhSXQ== +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-installed-globally@^0.4.0, is-installed-globally@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -20544,6 +20711,14 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-nan@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" + integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + is-native@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-native/-/is-native-1.0.1.tgz#cd18cc162e8450d683b5babe79ac99c145449675" @@ -20562,6 +20737,11 @@ is-negative-zero@^2.0.3: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== +is-network-error@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-network-error/-/is-network-error-1.1.0.tgz#d26a760e3770226d11c169052f266a4803d9c997" + integrity sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g== + is-nil@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-nil/-/is-nil-1.0.1.tgz#2daba29e0b585063875e7b539d071f5b15937969" @@ -20765,7 +20945,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.1" -is-typed-array@^1.1.13: +is-typed-array@^1.1.13, is-typed-array@^1.1.3: version "1.1.13" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== @@ -20863,6 +21043,13 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + is2@^2.0.6: version "2.0.9" resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.9.tgz#ff63b441f90de343fa8fac2125ee170da8e8240d" @@ -21031,6 +21218,15 @@ jackspeak@^2.3.5: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jake@^10.8.5: version "10.8.5" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.5.tgz#f2183d2c59382cb274226034543b9c03b8164c46" @@ -21583,6 +21779,11 @@ jest@^29.6.1: import-local "^3.0.2" jest-cli "^29.6.1" +jiti@^1.20.0: + version "1.21.6" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" + integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== + joi-to-json@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/joi-to-json/-/joi-to-json-4.3.0.tgz#c56131ecf8a772fce89fd98b7f81d7b0fac31dbc" @@ -22104,6 +22305,14 @@ latest-version@^7.0.0: dependencies: package-json "^8.1.0" +launch-editor@^2.6.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.8.1.tgz#3bda72af213ec9b46b170e39661916ec66c2f463" + integrity sha512-elBx2l/tp9z99X5H/qev8uyDywVh0VXAwEbjk8kJhnc5grOFkGh7aW6q55me9xnYbss261XtnUrysZ+XvGbhQA== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.8.1" + launchdarkly-eventsource@1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/launchdarkly-eventsource/-/launchdarkly-eventsource-1.4.4.tgz#fa595af8602e487c61520787170376c6a1104459" @@ -22331,7 +22540,7 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^1.0.0, loader-utils@^1.1.0, loader-utils@^1.2.3: +loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== @@ -22658,6 +22867,11 @@ lru-cache@10.2.0, "lru-cache@^9.1.1 || ^10.0.0": resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== +lru-cache@^10.2.0: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" @@ -23047,13 +23261,23 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -memfs@^3.1.2, memfs@^3.4.3: +memfs@^3.1.2: version "3.4.7" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.7.tgz#e5252ad2242a724f938cb937e3c4f7ceb1f70e5a" integrity sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw== dependencies: fs-monkey "^1.0.3" +memfs@^4.6.0: + version "4.11.1" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.11.1.tgz#9c9c8e65bf8ac72c0db8d0fbbbe29248cf51d56a" + integrity sha512-LZcMTBAgqUUKNXZagcZxvXXfgF1bHX7Y7nQ0QyEiNbRJgE29GhgPd8Yna1VQcLlPiHt/5RFJMWYN9Uv/VPNvjQ== + dependencies: + "@jsonjoy.com/json-pack" "^1.0.3" + "@jsonjoy.com/util" "^1.3.0" + tree-dump "^1.0.1" + tslib "^2.0.0" + "memoize-one@>=3.1.1 <6", memoize-one@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" @@ -23310,14 +23534,13 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY= -mini-css-extract-plugin@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.1.0.tgz#dcc2f0bfbec660c0bd1200ff7c8f82deec2cc8a6" - integrity sha512-0bTS+Fg2tGe3dFAgfiN7+YRO37oyQM7/vjFvZF1nXSCJ/sy0tGpeme8MbT4BCpUuUphKwTh9LH/uuTcWRr9DPA== +mini-css-extract-plugin@2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.1.tgz#4d184f12ce90582e983ccef0f6f9db637b4be758" + integrity sha512-+Vyi+GCCOHnrJ2VPS+6aPoXN2k2jgUzDRhTFLjjTBn23qyXJXkjUWQgTL+mXpF5/A8ixLdCc6kWsoeOjKGejKQ== dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - webpack-sources "^1.1.0" + schema-utils "^4.0.0" + tapable "^2.2.1" minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" @@ -23357,6 +23580,13 @@ minimatch@^9.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -23416,6 +23646,11 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== +minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -23918,7 +24153,7 @@ nanoid@3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== -nanoid@^3.3.1, nanoid@^3.3.6: +nanoid@^3.3.1, nanoid@^3.3.6, nanoid@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== @@ -24333,14 +24568,6 @@ nth-check@^2.0.1: dependencies: boolbase "^1.0.0" -null-loader@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/null-loader/-/null-loader-3.0.0.tgz#3e2b6c663c5bda8c73a54357d8fa0708dc61b245" - integrity sha512-hf5sNLl8xdRho4UPBOOeoIwT3WhjYcMUQm0zj44EhD6UscMAz72o2udpoDFBgykucdEDGIcd6SXbc/G6zssbzw== - dependencies: - loader-utils "^1.2.3" - schema-utils "^1.0.0" - num-sort@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/num-sort/-/num-sort-2.1.0.tgz#1cbb37aed071329fdf41151258bc011898577a9b" @@ -24614,7 +24841,7 @@ on-exit-leak-free@^2.1.0: resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz#5c703c968f7e7f851885f6459bf8a8a57edc9cc4" integrity sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w== -on-finished@2.4.1: +on-finished@2.4.1, on-finished@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== @@ -24654,6 +24881,16 @@ onetime@^7.0.0: dependencies: mimic-function "^5.0.0" +open@^10.0.3: + version "10.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1" + integrity sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw== + dependencies: + default-browser "^5.2.1" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^3.1.0" + open@^7.0.3: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" @@ -24662,7 +24899,7 @@ open@^7.0.3: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^8.0.9, open@^8.4.0, open@~8.4.0: +open@^8.4.0, open@~8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -24948,7 +25185,7 @@ p-reflect@2.1.0, p-reflect@^2.1.0: resolved "https://registry.yarnpkg.com/p-reflect/-/p-reflect-2.1.0.tgz#5d67c7b3c577c4e780b9451fc9129675bd99fe67" integrity sha512-paHV8NUz8zDHu5lhr/ngGWQiW067DK/+IbJ+RfZ4k+s8y4EKyYCz8pGYWjxCg35eHztpJAt+NUgvN4L+GCbPlg== -p-retry@4, p-retry@^4.2.0, p-retry@^4.5.0: +p-retry@4, p-retry@^4.2.0: version "4.6.2" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== @@ -24956,6 +25193,15 @@ p-retry@4, p-retry@^4.2.0, p-retry@^4.5.0: "@types/retry" "0.12.0" retry "^0.13.1" +p-retry@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-6.2.0.tgz#8d6df01af298750009691ce2f9b3ad2d5968f3bd" + integrity sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA== + dependencies: + "@types/retry" "0.12.2" + is-network-error "^1.0.0" + retry "^0.13.1" + p-settle@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/p-settle/-/p-settle-4.1.1.tgz#37fbceb2b02c9efc28658fc8d36949922266035f" @@ -25016,6 +25262,11 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + package-json@^8.1.0: version "8.1.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.1.tgz#3e9948e43df40d1e8e78a85485f1070bf8f03dc8" @@ -25063,6 +25314,14 @@ param-case@^3.0.3: dot-case "^3.0.3" tslib "^1.10.0" +param-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" + integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + parent-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" @@ -25140,6 +25399,13 @@ parse5@^7.0.0, parse5@^7.1.1: dependencies: entities "^4.4.0" +parse5@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -25153,6 +25419,14 @@ pascal-case@^3.1.1: no-case "^3.0.3" tslib "^1.10.0" +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" @@ -25223,6 +25497,14 @@ path-scurry@^1.10.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -25650,6 +25932,15 @@ postcss-loader@^4.2.0: schema-utils "^3.0.0" semver "^7.3.4" +postcss-loader@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-8.1.1.tgz#2822589e7522927344954acb55bbf26e8b195dfe" + integrity sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ== + dependencies: + cosmiconfig "^9.0.0" + jiti "^1.20.0" + semver "^7.5.4" + postcss-media-query-parser@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" @@ -25712,6 +26003,11 @@ postcss-modules-extract-imports@^2.0.0: dependencies: postcss "^7.0.5" +postcss-modules-extract-imports@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz#b4497cb85a9c0c4b5aabeb759bb25e8d89f15002" + integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== + postcss-modules-local-by-default@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz#e8a6561be914aaf3c052876377524ca90dbb7915" @@ -25722,6 +26018,15 @@ postcss-modules-local-by-default@^3.0.2: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.0" +postcss-modules-local-by-default@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz#f1b9bd757a8edf4d8556e8d0f4f894260e3df78f" + integrity sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== + dependencies: + icss-utils "^5.0.0" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.1.0" + postcss-modules-scope@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" @@ -25730,6 +26035,13 @@ postcss-modules-scope@^2.2.0: postcss "^7.0.6" postcss-selector-parser "^6.0.0" +postcss-modules-scope@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz#a43d28289a169ce2c15c00c4e64c0858e43457d5" + integrity sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== + dependencies: + postcss-selector-parser "^6.0.4" + postcss-modules-values@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" @@ -25738,6 +26050,13 @@ postcss-modules-values@^3.0.0: icss-utils "^4.0.0" postcss "^7.0.6" +postcss-modules-values@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" + integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== + dependencies: + icss-utils "^5.0.0" + postcss-normalize-charset@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz#9302de0b29094b52c259e9b2cf8dc0879879f0ed" @@ -25898,6 +26217,15 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" +postcss@^8.4.33: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + potpack@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/potpack/-/potpack-2.0.0.tgz#61f4dd2dc4b3d5e996e3698c0ec9426d0e169104" @@ -26304,7 +26632,7 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.2.4: +punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -26368,6 +26696,13 @@ qs@^6.10.0, qs@^6.11.0, qs@^6.7.0: dependencies: side-channel "^1.0.4" +qs@^6.12.3: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + query-string@^6.13.2: version "6.13.2" resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.13.2.tgz#3585aa9412c957cbd358fd5eaca7466f05586dda" @@ -26501,14 +26836,6 @@ raw-body@2.5.2: iconv-lite "0.4.24" unpipe "1.0.0" -raw-loader@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-3.1.0.tgz#5e9d399a5a222cc0de18f42c3bc5e49677532b3f" - integrity sha512-lzUVMuJ06HF4rYveaz9Tv0WRlUMxJ0Y1hgSkkgg+50iEdaI0TthyEDe08KIHb0XsF6rn8WYTqPCaGTZg3sX+qA== - dependencies: - loader-utils "^1.1.0" - schema-utils "^2.0.1" - raw-loader@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" @@ -27286,12 +27613,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -rechoir@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" - integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== dependencies: - resolve "^1.9.0" + resolve "^1.20.0" redent@^1.0.0: version "1.0.0" @@ -27884,7 +28211,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.22.3, resolve@^1.22.8, resolve@^1.3.2, resolve@^1.9.0: +resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.22.3, resolve@^1.22.8, resolve@^1.3.2: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -27983,6 +28310,13 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" +rimraf@^5.0.5: + version "5.0.7" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.7.tgz#27bddf202e7d89cb2e0381656380d1734a854a74" + integrity sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg== + dependencies: + glob "^10.3.7" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" @@ -28026,6 +28360,11 @@ rtl-css-js@^1.9.0: dependencies: "@babel/runtime" "^7.1.2" +run-applescript@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" + integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A== + run-async@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" @@ -28283,16 +28622,12 @@ sass-embedded@^1.77.8: sass-embedded-win32-ia32 "1.77.8" sass-embedded-win32-x64 "1.77.8" -sass-loader@^10.5.1: - version "10.5.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.5.1.tgz#4cfb9cd17e09afc7d8787fdb57d665254c3aadcb" - integrity sha512-P8BGIW6OxYLJWaWG8DROibc98Uw/B90oHPYOjPQ5/tF572OTTwkhxSxpaQzD5lYam36zQd0cxjh24b4rcdNIZQ== +sass-loader@^16.0.1: + version "16.0.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.1.tgz#57049c1787076e923b21a1dccc612546ecaf4295" + integrity sha512-xACl1ToTsKnL9Ce5yYpRxrLj9QUDCnwZNhzpC7tKiFyA8zXsd3Ap+HGVnbCgkdQcm43E+i6oKAWBsvGA6ZoiMw== dependencies: - klona "^2.0.4" - loader-utils "^2.0.0" neo-async "^2.6.2" - schema-utils "^3.0.0" - semver "^7.3.2" sass-lookup@^5.0.1: version "5.0.1" @@ -28328,7 +28663,7 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" -schema-utils@2.7.0, schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.5, schema-utils@^2.7.0: +schema-utils@2.7.0, schema-utils@^2.6.5, schema-utils@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== @@ -28337,14 +28672,6 @@ schema-utils@2.7.0, schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.5. ajv "^6.12.2" ajv-keywords "^3.4.1" -schema-utils@^0.4.5: - version "0.4.7" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" - integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ== - dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" - schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" @@ -28373,6 +28700,16 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" +schema-utils@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" + integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + scope-analyzer@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/scope-analyzer/-/scope-analyzer-2.1.1.tgz#5156c27de084d74bf75af9e9506aaf95c6e73dd6" @@ -28420,11 +28757,12 @@ self-signed-cert@^1.0.1: resolved "https://registry.yarnpkg.com/self-signed-cert/-/self-signed-cert-1.0.1.tgz#9e2fae07503f84fb910f4a87c5c5c6becc207bf6" integrity sha512-86d1jYydqaRdUEyR9tj5nQ0d059RUWB9gdZrzDy2MJaUHii1h9EyzbAepkV1rOLO2AkSkQbXtUrqWRH4FDYWHA== -selfsigned@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" - integrity sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ== +selfsigned@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== dependencies: + "@types/node-forge" "^1.3.0" node-forge "^1" semver-compare@^1.0.0: @@ -28692,6 +29030,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shell-quote@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -28754,6 +29097,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -29051,6 +29404,11 @@ source-map-js@^1.0.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" @@ -29535,13 +29893,13 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-replace-loader@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/string-replace-loader/-/string-replace-loader-2.2.0.tgz#0a0e6543fcec783d85c353a3e96a23872d45a94f" - integrity sha512-Ukt4ZC8+xVWdBRut3/iwnPJCNL1yV8AbVKXn8UcWdYrHgtuW4UDDAbBSi/J/CQDEWQBt824AJvPYahF23eJLRg== +string-replace-loader@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-replace-loader/-/string-replace-loader-3.1.0.tgz#11ac6ee76bab80316a86af358ab773193dd57a4f" + integrity sha512-5AOMUZeX5HE/ylKDnEa/KKBqvlnFmRZudSOjVJHxhoJg9QYTwl1rECx7SLR8BBH7tfxb4Rp7EM2XVfQFxIhsbQ== dependencies: - loader-utils "^1.2.3" - schema-utils "^1.0.0" + loader-utils "^2.0.0" + schema-utils "^3.0.0" "string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" @@ -29743,7 +30101,7 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -style-loader@^1.1.3, style-loader@^1.3.0: +style-loader@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.3.0.tgz#828b4a3b3b7e7aa5847ce7bae9e874512114249e" integrity sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q== @@ -29751,6 +30109,11 @@ style-loader@^1.1.3, style-loader@^1.3.0: loader-utils "^2.0.0" schema-utils "^2.7.0" +style-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-4.0.0.tgz#0ea96e468f43c69600011e0589cb05c44f3b17a5" + integrity sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA== + style-search@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" @@ -30115,7 +30478,7 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tapable@^2.1.1, tapable@^2.2.0: +tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== @@ -30295,6 +30658,16 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^5.15.1: + version "5.31.3" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38" + integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + terser@^5.26.0, terser@^5.3.4, terser@^5.31.6, terser@^5.9.0: version "5.31.6" resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" @@ -30341,6 +30714,11 @@ textarea-caret@^3.1.0: resolved "https://registry.yarnpkg.com/textarea-caret/-/textarea-caret-3.1.0.tgz#5d5a35bb035fd06b2ff0e25d5359e97f2655087f" integrity sha512-cXAvzO9pP5CGa6NKx0WYHl+8CHKZs8byMkt3PCJBCmq2a34YA9pO1NrQET5pzeqnBjBdToF5No4rrmkDUgQC2Q== +thingies@^1.20.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-1.21.0.tgz#e80fbe58fd6fdaaab8fad9b67bd0a5c943c445c1" + integrity sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g== + thread-stream@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-2.3.0.tgz#4fc07fb39eff32ae7bad803cb7dd9598349fed33" @@ -30604,6 +30982,11 @@ traverse@^0.6.6, traverse@~0.6.6: resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= +tree-dump@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.2.tgz#c460d5921caeb197bde71d0e9a7b479848c5b8ac" + integrity sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ== + tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" @@ -31307,15 +31690,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-loader@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-2.3.0.tgz#e0e2ef658f003efb8ca41b0f3ffbf76bab88658b" - integrity sha512-goSdg8VY+7nPZKUEChZSEtW5gjbS66USIGCeSJ1OVOJ7Yfuh/36YxCwMi5HVEJh6mqUYOoy3NJ0vlOMrWsSHog== - dependencies: - loader-utils "^1.2.3" - mime "^2.4.4" - schema-utils "^2.5.0" - url-loader@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2" @@ -31346,6 +31720,14 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +url@^0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.4.tgz#adca77b3562d56b72746e76b330b7f27b6721f3c" + integrity sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg== + dependencies: + punycode "^1.4.1" + qs "^6.12.3" + urlpattern-polyfill@10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" @@ -31434,6 +31816,17 @@ util@^0.11.0: dependencies: inherits "2.0.3" +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" @@ -31505,13 +31898,10 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" -val-loader@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/val-loader/-/val-loader-1.1.1.tgz#32ba8ed5c3607504134977251db2966499e15ef7" - integrity sha512-JLqLXJWCVLXTxbUeHhLpWkgl3+X3U8Bl0vY7rTFZgFSbLJaEtAxuD2ixy/cM8w/gzC7sS3NE5IDSzClDt332sw== - dependencies: - loader-utils "^1.0.0" - schema-utils "^0.4.5" +val-loader@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/val-loader/-/val-loader-6.0.0.tgz#88078512fdb66e04deab659fec05e281105e4d81" + integrity sha512-NHi81ow+/mVBRuFRNxp8tfTSnAIFsq/wzZGqxv/a82Y722GQSOQi9yP0GuenSBiuw4+zGjmW/H9sLTbP3bewrw== validate-npm-package-license@^3.0.1: version "3.0.1" @@ -32166,22 +32556,23 @@ webpack-bundle-analyzer@^4.5.0: sirv "^1.0.7" ws "^7.3.1" -webpack-cli@^4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" - integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== +webpack-cli@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.2.0" - "@webpack-cli/info" "^1.5.0" - "@webpack-cli/serve" "^1.7.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" colorette "^2.0.14" - commander "^7.0.0" + commander "^10.0.1" cross-spawn "^7.0.3" + envinfo "^7.7.3" fastest-levenshtein "^1.0.12" import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" + interpret "^3.1.1" + rechoir "^0.8.0" webpack-merge "^5.7.3" webpack-dev-middleware@^3.7.3: @@ -32195,51 +32586,53 @@ webpack-dev-middleware@^3.7.3: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-middleware@^5.3.1: - version "5.3.4" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517" - integrity sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q== +webpack-dev-middleware@^7.1.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-7.4.1.tgz#5fafc609c44b0fcda27bb4444376eb1dc9fc1fe3" + integrity sha512-/t6KpZw/bnmCR0VKILjJT05mWecbf1aIM2VxCJUvBbg0iXqaQJFxbJ4PCrsY4iBH7PGwnccm4BYyoP1G+lGfAA== dependencies: colorette "^2.0.10" - memfs "^3.4.3" + memfs "^4.6.0" mime-types "^2.1.31" + on-finished "^2.4.1" range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^4.9.3: - version "4.9.3" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz#2360a5d6d532acb5410a668417ad549ee3b8a3c9" - integrity sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw== - dependencies: - "@types/bonjour" "^3.5.9" - "@types/connect-history-api-fallback" "^1.3.5" - "@types/express" "^4.17.13" - "@types/serve-index" "^1.9.1" - "@types/serve-static" "^1.13.10" - "@types/sockjs" "^0.3.33" - "@types/ws" "^8.5.1" +webpack-dev-server@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-5.0.4.tgz#cb6ea47ff796b9251ec49a94f24a425e12e3c9b8" + integrity sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA== + dependencies: + "@types/bonjour" "^3.5.13" + "@types/connect-history-api-fallback" "^1.5.4" + "@types/express" "^4.17.21" + "@types/serve-index" "^1.9.4" + "@types/serve-static" "^1.15.5" + "@types/sockjs" "^0.3.36" + "@types/ws" "^8.5.10" ansi-html-community "^0.0.8" - bonjour-service "^1.0.11" - chokidar "^3.5.3" + bonjour-service "^1.2.1" + chokidar "^3.6.0" colorette "^2.0.10" compression "^1.7.4" connect-history-api-fallback "^2.0.0" default-gateway "^6.0.3" express "^4.17.3" graceful-fs "^4.2.6" - html-entities "^2.3.2" + html-entities "^2.4.0" http-proxy-middleware "^2.0.3" - ipaddr.js "^2.0.1" - open "^8.0.9" - p-retry "^4.5.0" - rimraf "^3.0.2" - schema-utils "^4.0.0" - selfsigned "^2.0.1" + ipaddr.js "^2.1.0" + launch-editor "^2.6.1" + open "^10.0.3" + p-retry "^6.2.0" + rimraf "^5.0.5" + schema-utils "^4.2.0" + selfsigned "^2.4.1" serve-index "^1.9.1" sockjs "^0.3.24" spdy "^4.0.2" - webpack-dev-middleware "^5.3.1" - ws "^8.4.2" + webpack-dev-middleware "^7.1.0" + ws "^8.16.0" webpack-filter-warnings-plugin@^1.2.1: version "1.2.1" @@ -32264,13 +32657,6 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" - integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== - dependencies: - lodash "^4.17.15" - webpack-merge@^5.7.3: version "5.8.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" @@ -32279,7 +32665,16 @@ webpack-merge@^5.7.3: clone-deep "^4.0.1" wildcard "^2.0.0" -webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: +webpack-merge@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-6.0.1.tgz#50c776868e080574725abc5869bd6e4ef0a16c6a" + integrity sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.1" + +webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== @@ -32310,7 +32705,7 @@ webpack-visualizer-plugin2@^1.1.0: react "^17.0.1" react-dom "^17.0.1" -webpack@4, webpack@^4.41.5: +webpack@4: version "4.46.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== @@ -32369,6 +32764,36 @@ webpack@4, webpack@^4.41.5: watchpack "^2.4.1" webpack-sources "^3.2.3" +webpack@^5.93.0: + version "5.93.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" + integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-attributes "^1.9.5" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.17.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" @@ -32473,7 +32898,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15: +which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== @@ -32531,6 +32956,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +wildcard@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + window-size@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" @@ -32670,7 +33100,7 @@ write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@>=8.16.0, ws@^8.18.0, ws@^8.2.3, ws@^8.4.2, ws@^8.9.0: +ws@>=8.16.0, ws@^8.16.0, ws@^8.18.0, ws@^8.2.3, ws@^8.9.0: version "8.18.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== From 1285a0392501944379d519f6f0f0ea47fb6af4d8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 20 Aug 2024 21:55:40 +0100 Subject: [PATCH 002/157] chore(NA): correctly use devtool on worker config --- packages/kbn-optimizer/src/worker/webpack.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 46482c0ec4372..a2115a9f12973 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -43,7 +43,7 @@ export function getWebpackConfig( [bundle.id]: ENTRY_CREATOR, }, - devtool: worker.dist ? false : '#cheap-source-map', + devtool: worker.dist ? false : 'cheap-source-map', profile: worker.profileWebpack, output: { @@ -60,7 +60,7 @@ export function getWebpackConfig( }, optimization: { - noEmitOnErrors: true, + emitOnErrors: false, splitChunks: { maxAsyncRequests: 10, cacheGroups: { From 94789bcc97940d6df7a9e99cfc976da91241dc0e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 21 Aug 2024 04:21:48 +0100 Subject: [PATCH 003/157] chore(NA): upgrades bundle_remotes_plugin --- package.json | 1 + .../kbn-optimizer-webpack-helpers/index.ts | 1 + .../src/webpack_helpers.ts | 6 ++- .../src/worker/bundle_remotes_plugin.ts | 52 +++++++++---------- .../worker/populate_bundle_cache_plugin.ts | 3 +- .../kbn-optimizer/src/worker/run_compilers.ts | 1 - .../src/worker/webpack.config.ts | 3 ++ 7 files changed, 38 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 5f3e640d3d0d5..12a74a415b181 100644 --- a/package.json +++ b/package.json @@ -1731,6 +1731,7 @@ "oboe": "^2.1.4", "openapi-types": "^10.0.0", "p-reflect": "2.1.0", + "path-browserify": "^1.0.1", "pbf": "3.2.1", "peggy": "^1.2.0", "picomatch": "^2.3.1", diff --git a/packages/kbn-optimizer-webpack-helpers/index.ts b/packages/kbn-optimizer-webpack-helpers/index.ts index b79e55477310c..3da5a5ecc559f 100644 --- a/packages/kbn-optimizer-webpack-helpers/index.ts +++ b/packages/kbn-optimizer-webpack-helpers/index.ts @@ -24,4 +24,5 @@ export { isExternalModule, isIgnoredModule, isNormalModule, + isRuntimeModule, } from './src/webpack_helpers'; diff --git a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts index 433e55d800239..c92316092fc2d 100644 --- a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts +++ b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts @@ -108,7 +108,7 @@ export interface WebpackIgnoredModule { } export function isIgnoredModule(module: any): module is WebpackIgnoredModule { - return module?.constructor?.name === 'RawModule' && module.identifierStr?.startsWith('ignored '); + return module?.constructor?.name === 'RawModule' && module.identifierStr?.startsWith('ignored'); } /** module replacing imports for webpack externals */ @@ -155,3 +155,7 @@ export function getModulePath(module: WebpackNormalModule) { const queryIndex = module.resource.indexOf('?'); return queryIndex === -1 ? module.resource : module.resource.slice(0, queryIndex); } + +export function isRuntimeModule(module: any): boolean { + return module instanceof webpack.RuntimeModule; +} diff --git a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts index 1a5eb8b50710d..a0b626a2d814e 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts @@ -21,7 +21,7 @@ interface RequestData { } type Callback = (error?: any, result?: T) => void; -type ModuleFactory = (data: RequestData, callback: Callback) => void; +// type ModuleFactory = (data: RequestData, callback: Callback) => void; export class BundleRemotesPlugin { private allowedBundleIds = new Set(); @@ -34,40 +34,40 @@ export class BundleRemotesPlugin { public apply(compiler: webpack.Compiler) { // called whenever the compiler starts to compile, passed the params // that will be used to create the compilation - compiler.hooks.compile.tap('BundleRemotesPlugin', (compilationParams: any) => { + compiler.hooks.normalModuleFactory.tap('BundleRemotesPlugin', (normalModuleFactory: any) => { const moduleCache = new Map(); - // hook into the creation of NormalModule instances in webpack, if the import // statement leading to the creation of the module is pointing to a bundleRef // entry then create a BundleRefModule instead of a NormalModule. - compilationParams.normalModuleFactory.hooks.factory.tap( + normalModuleFactory.hooks.factorize.tapAsync( 'BundleRefsPlugin/normalModuleFactory/factory', - (wrappedFactory: ModuleFactory): ModuleFactory => - (data, callback) => { - const { request } = data.dependencies[0]; + (data: RequestData, callback: Callback) => { + const { request } = data.dependencies[0]; - const cached = moduleCache.get(request); - if (cached === null) { - return wrappedFactory(data, callback); - } - if (cached !== undefined) { - return callback(null, cached); - } + const cached = moduleCache.get(request); + if (cached === null) { + // return normalModuleFactory(data, callback); + return callback(null, undefined); + } + if (cached !== undefined) { + return callback(null, cached); + } - this.resolve(request, (error, result) => { - if (error || result === undefined) { - return callback(error); - } + this.resolve(request, (error, result) => { + if (error || result === undefined) { + return callback(error); + } - moduleCache.set(request, result); + moduleCache.set(request, result); - if (result === null) { - return wrappedFactory(data, callback); - } + if (result === null) { + // return normalModuleFactory(data, callback); + return callback(null, undefined); + } - callback(null, result); - }); - } + callback(null, result); + }); + } ); }); @@ -96,7 +96,7 @@ export class BundleRemotesPlugin { .join(', '); if (unusedBundleIds) { - const error = new Error( + const error = new webpack.WebpackError( `Bundle for [${this.bundle.id}] lists [${unusedBundleIds}] as a required bundle, but does not use it. Please remove it.` ); (error as any).file = manifestPath; diff --git a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts index e431e0d698d0a..18f74e2c8a1c4 100644 --- a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts +++ b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts @@ -16,6 +16,7 @@ import { isIgnoredModule, isConcatenatedModule, isDelegatedModule, + isRuntimeModule, getModulePath, } from '@kbn/optimizer-webpack-helpers'; @@ -130,7 +131,7 @@ export class PopulateBundleCachePlugin { continue; } - if (isExternalModule(module) || isIgnoredModule(module)) { + if (isExternalModule(module) || isIgnoredModule(module) || isRuntimeModule(module)) { continue; } diff --git a/packages/kbn-optimizer/src/worker/run_compilers.ts b/packages/kbn-optimizer/src/worker/run_compilers.ts index b3de65bc871f4..da1ffb5d570f6 100644 --- a/packages/kbn-optimizer/src/worker/run_compilers.ts +++ b/packages/kbn-optimizer/src/worker/run_compilers.ts @@ -52,7 +52,6 @@ const observeCompiler = ( */ const complete$ = Rx.fromEventPattern((cb) => done.tap(PLUGIN_NAME, cb)).pipe( maybeMap((stats) => { - // @ts-expect-error not included in types, but it is real https://github.com/webpack/webpack/blob/ab4fa8ddb3f433d286653cd6af7e3aad51168649/lib/Watching.js#L58 if (stats.compilation.needAdditionalPass) { return undefined; } diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index a2115a9f12973..e14794c17961a 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -288,6 +288,9 @@ export function getWebpackConfig( child_process: false, fs: false, }, + fallback: { + path: require.resolve('path-browserify'), + } }, performance: { From 095f9ab95de291a659f2b0cdb799ab4316b66a6b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 21 Aug 2024 04:31:43 +0100 Subject: [PATCH 004/157] fix(NA): theme_loader getOptions --- packages/kbn-optimizer/src/worker/theme_loader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/theme_loader.ts b/packages/kbn-optimizer/src/worker/theme_loader.ts index 8de45eac69243..a13e9d8d6a8ce 100644 --- a/packages/kbn-optimizer/src/worker/theme_loader.ts +++ b/packages/kbn-optimizer/src/worker/theme_loader.ts @@ -18,7 +18,7 @@ const compare = (a: ThemeTag, b: ThemeTag) => export default function (this: webpack.LoaderContext) { this.cacheable(true); - const options = this.getOptions(this); + const options = this.getOptions(); const bundleId = options.bundleId as string; const themeTags = parseThemeTags(options.themeTags); From 50421c0c42cd047006ecb0fb3358a6a877b79160 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 21 Aug 2024 05:17:07 +0100 Subject: [PATCH 005/157] fix(NA): modules and fileDependencies loop --- .../worker/populate_bundle_cache_plugin.ts | 77 +++++++++++-------- .../src/worker/webpack.config.ts | 2 +- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts index 18f74e2c8a1c4..d51af46d27e84 100644 --- a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts +++ b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts @@ -7,6 +7,7 @@ */ import Path from 'path'; +import Fs from 'fs'; import { inspect } from 'util'; import webpack from 'webpack'; @@ -17,7 +18,6 @@ import { isConcatenatedModule, isDelegatedModule, isRuntimeModule, - getModulePath, } from '@kbn/optimizer-webpack-helpers'; import { @@ -30,6 +30,11 @@ import { } from '../common'; import { BundleRemoteModule } from './bundle_remote_module'; +interface InputFileSystem { + readFileSync: (path: string, encoding?: null | undefined) => Buffer; + statSync: (path: string) => Fs.Stats; +} + /** * sass-loader creates about a 40% overhead on the overall optimizer runtime, and * so this constant is used to indicate to assignBundlesToWorkers() that there is @@ -48,12 +53,17 @@ export class PopulateBundleCachePlugin { public apply(compiler: webpack.Compiler) { const { bundle, workerConfig } = this; + const inputFs = compiler.inputFileSystem as InputFileSystem; + if (!inputFs) { + throw new Error('expected inputFs to be defined'); + } compiler.hooks.emit.tap( - { - name: 'PopulateBundleCachePlugin', - before: ['BundleMetricsPlugin'], - }, + // { + // name: 'PopulateBundleCachePlugin', + // before: ['BundleMetricsPlugin'], + // }, + 'PopulateBundleCachePlugin', (compilation) => { const bundleRefExportIds: string[] = []; let moduleCount = 0; @@ -69,7 +79,7 @@ export class PopulateBundleCachePlugin { paths.add(path); let content: Buffer; try { - content = compiler.inputFileSystem.readFileSync(path); + content = inputFs.readFileSync(path); } catch { return rawHashes.set(path, null); } @@ -83,35 +93,38 @@ export class PopulateBundleCachePlugin { addReferenced(bundle.manifestPath); } + // add all files from the fileDependencies (which includes a bunch of directories) to the cache + for (const path of compilation.fileDependencies) { + const stat = inputFs.statSync(path); + if (!stat.isFile()) { + continue; + } + + addReferenced(path); + if (path.endsWith('.scss')) { + workUnits += EXTRA_SCSS_WORK_UNITS; + continue; + } + + const parsedPath = parseFilePath(path); + if (!parsedPath.dirs.includes('node_modules')) { + continue; + } + + const nmIndex = parsedPath.dirs.lastIndexOf('node_modules'); + const isScoped = parsedPath.dirs[nmIndex + 1].startsWith('@'); + const pkgJsonPath = Path.join( + parsedPath.root, + ...parsedPath.dirs.slice(0, nmIndex + 1 + (isScoped ? 2 : 1)), + 'package.json' + ); + addReferenced(pkgJsonPath); + continue; + } + for (const module of compilation.modules) { if (isNormalModule(module)) { moduleCount += 1; - const path = getModulePath(module); - const parsedPath = parseFilePath(path); - - // TODO: Does this need to be updated to support @kbn/ packages? - if (!parsedPath.dirs.includes('node_modules')) { - addReferenced(path); - - if (path.endsWith('.scss')) { - workUnits += EXTRA_SCSS_WORK_UNITS; - - for (const depPath of module.buildInfo.fileDependencies) { - addReferenced(depPath); - } - } - - continue; - } - - const nmIndex = parsedPath.dirs.lastIndexOf('node_modules'); - const isScoped = parsedPath.dirs[nmIndex + 1].startsWith('@'); - const pkgJsonPath = Path.join( - parsedPath.root, - ...parsedPath.dirs.slice(0, nmIndex + 1 + (isScoped ? 2 : 1)), - 'package.json' - ); - addReferenced(pkgJsonPath); continue; } diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index e14794c17961a..c55a92c7a89fb 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -290,7 +290,7 @@ export function getWebpackConfig( }, fallback: { path: require.resolve('path-browserify'), - } + }, }, performance: { From 756aa74c9e01118a38be5360c80aa0788a6bd7b0 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 21 Aug 2024 18:11:30 +0100 Subject: [PATCH 006/157] fix(NA): missing raw request processor --- .../kbn-optimizer-webpack-helpers/src/webpack_helpers.ts | 2 +- packages/kbn-optimizer/src/worker/webpack.config.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts index c92316092fc2d..7238bc894875a 100644 --- a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts +++ b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts @@ -89,7 +89,7 @@ export interface WebpackNormalModule { resource: string; buildInfo: { cacheable: boolean; - fileDependencies: Set; + buildDependencies: Set; }; dependencies: Dependency[]; } diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index c55a92c7a89fb..aa1f2f8585888 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -56,7 +56,8 @@ export function getWebpackConfig( bundle.sourceRoot, info.absoluteResourcePath )}${info.query}`, - chunkLoadingGlobal: `jsonp_webpack_${bundle.id}`, + chunkLoadingGlobal: `${bundle.id}_bundle_jsonpfunction`, + chunkLoading: 'jsonp', }, optimization: { @@ -268,6 +269,10 @@ export function getWebpackConfig( test: [/\.(html|md|txt|tmpl)$/], type: 'asset/source', }, + { + resourceQuery: '?raw', + type: 'asset/source', + }, // automatically chooses between exporting a data URI and emitting a separate file. Previously achievable by using url-loader with asset size limit. { test: /\.(woff|woff2|ttf|eot|svg|ico|png|jpg|gif|jpeg)(\?|$)/, From 31fd74c481056c04ee8171dd2a568eda0ca5d75f Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 21 Aug 2024 19:02:34 +0100 Subject: [PATCH 007/157] chore(NA): correctly applies bundle_remote_plugin conversion --- .../src/worker/bundle_remotes_plugin.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts index a0b626a2d814e..0ce03790acaed 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts @@ -34,20 +34,20 @@ export class BundleRemotesPlugin { public apply(compiler: webpack.Compiler) { // called whenever the compiler starts to compile, passed the params // that will be used to create the compilation - compiler.hooks.normalModuleFactory.tap('BundleRemotesPlugin', (normalModuleFactory: any) => { + compiler.hooks.compile.tap('BundleRemotesPlugin', (compilationParams: any) => { const moduleCache = new Map(); + // hook into the creation of NormalModule instances in webpack, if the import // statement leading to the creation of the module is pointing to a bundleRef // entry then create a BundleRefModule instead of a NormalModule. - normalModuleFactory.hooks.factorize.tapAsync( - 'BundleRefsPlugin/normalModuleFactory/factory', + compilationParams.normalModuleFactory.hooks.factorize.tapAsync( + 'BundleRefsPlugin/normalModuleFactory/factorize', (data: RequestData, callback: Callback) => { const { request } = data.dependencies[0]; const cached = moduleCache.get(request); if (cached === null) { - // return normalModuleFactory(data, callback); - return callback(null, undefined); + return callback(); } if (cached !== undefined) { return callback(null, cached); @@ -61,8 +61,7 @@ export class BundleRemotesPlugin { moduleCache.set(request, result); if (result === null) { - // return normalModuleFactory(data, callback); - return callback(null, undefined); + return callback(); } callback(null, result); From 1f5495a11eb570c6802f91a6988fd1529424cf7e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 21 Aug 2024 20:20:09 +0100 Subject: [PATCH 008/157] chore(NA): update webpack sources and loader --- package.json | 2 +- packages/kbn-peggy-loader/index.ts | 2 +- yarn.lock | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 12a74a415b181..5b1f5098a19aa 100644 --- a/package.json +++ b/package.json @@ -1602,7 +1602,7 @@ "@types/webpack": "^5.28.5", "@types/webpack-bundle-analyzer": "^4.7.0", "@types/webpack-env": "^1.18.5", - "@types/webpack-sources": "^0.1.4", + "@types/webpack-sources": "^3.2.3", "@types/xml2js": "^0.4.11", "@types/yargs": "^15.0.0", "@types/yauzl": "^2.9.1", diff --git a/packages/kbn-peggy-loader/index.ts b/packages/kbn-peggy-loader/index.ts index 4fb6e7cdd8290..d40884f60f1f5 100644 --- a/packages/kbn-peggy-loader/index.ts +++ b/packages/kbn-peggy-loader/index.ts @@ -10,7 +10,7 @@ import { getJsSource } from '@kbn/peggy'; import webpack from 'webpack'; // eslint-disable-next-line import/no-default-export -export default function (this: webpack.loader.LoaderContext) { +export default function (this: webpack.LoaderContext) { this.cacheable(true); const callback = this.async(); diff --git a/yarn.lock b/yarn.lock index f2848fbede658..ffc325b06f47f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11547,7 +11547,7 @@ resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.18.5.tgz#eccda0b04fe024bed505881e2e532f9c119169bf" integrity sha512-wz7kjjRRj8/Lty4B+Kr0LN6Ypc/3SymeCCGSbaXp2leH0ZVg/PriNiOwNj4bD4uphI7A8NXS4b6Gl373sfO5mA== -"@types/webpack-sources@*", "@types/webpack-sources@^0.1.4": +"@types/webpack-sources@*": version "0.1.5" resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.5.tgz#be47c10f783d3d6efe1471ff7f042611bd464a92" integrity sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w== @@ -11556,6 +11556,15 @@ "@types/source-list-map" "*" source-map "^0.6.1" +"@types/webpack-sources@^3.2.3": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-3.2.3.tgz#b667bd13e9fa15a9c26603dce502c7985418c3d8" + integrity sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw== + dependencies: + "@types/node" "*" + "@types/source-list-map" "*" + source-map "^0.7.3" + "@types/webpack@^4", "@types/webpack@^4.41.26", "@types/webpack@^4.41.8": version "4.41.32" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.32.tgz#a7bab03b72904070162b2f169415492209e94212" From eb14c00524a34c57a6aa66bfd2f2390cb69e435b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 02:52:46 +0100 Subject: [PATCH 009/157] chore(NA): do not use esm by default --- packages/kbn-optimizer/src/worker/webpack.config.ts | 1 + packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 ++ packages/kbn-ui-shared-deps-src/webpack.config.js | 2 ++ 3 files changed, 5 insertions(+) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index aa1f2f8585888..0196e5e1993e8 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -284,6 +284,7 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], mainFields: ['browser', 'main'], + conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { core_app_image_assets: Path.resolve( worker.repoRoot, diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index c4d3668872347..3bbf039602954 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -142,6 +142,8 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], + mainFields: ['browser', 'main'], + conditionNames: ['require', 'default', 'node', 'module', 'import'], fallback: { child_process: false, fs: false, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 9bf30d7df9e2e..3d402e0d6fb54 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -101,6 +101,8 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], + mainFields: ['browser', 'main'], + conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', moment: MOMENT_SRC, From d1124be184ef792eb20ba1517fb5946a7e442b7f Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 03:42:17 +0100 Subject: [PATCH 010/157] chore(NA): do not use esm by default --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 +- packages/kbn-ui-shared-deps-src/webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 0196e5e1993e8..88f1f3db5627a 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -283,7 +283,7 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], - mainFields: ['browser', 'main'], + mainFields: ['browser', 'main', 'module'], conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { core_app_image_assets: Path.resolve( diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 3bbf039602954..724a737338195 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -142,7 +142,7 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], - mainFields: ['browser', 'main'], + mainFields: ['browser', 'main', 'module'], conditionNames: ['require', 'default', 'node', 'module', 'import'], fallback: { child_process: false, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 3d402e0d6fb54..b5855f040d52e 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -101,7 +101,7 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], - mainFields: ['browser', 'main'], + mainFields: ['browser', 'main', 'module'], conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', From 41d526c069be4499f4787605b4168837178b7da7 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 05:07:44 +0100 Subject: [PATCH 011/157] chore(NA): some more progress on bundle_remote_module --- .../src/worker/bundle_remote_module.ts | 54 +++++++++++++++---- .../src/worker/bundle_remotes_plugin.ts | 28 ++++++++++ 2 files changed, 71 insertions(+), 11 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index 7c379b7b0d897..ff59b52879f29 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -12,6 +12,7 @@ import { KbnImportReq } from '@kbn/repo-packages'; // @ts-ignore not typed by @types/webpack import Module from 'webpack/lib/Module'; +import { RawSource } from 'webpack-sources'; import { BundleRemote } from '../common'; export class BundleRemoteModule extends Module { @@ -27,8 +28,8 @@ export class BundleRemoteModule extends Module { return this.req.full; } - chunkCondition(chunk: any) { - return chunk.hasEntryModule(); + chunkCondition(chunk: any, { chunkGraph }: any) { + return chunkGraph.getNumberOfEntryModules(chunk) > 0; } identifier() { @@ -39,33 +40,64 @@ export class BundleRemoteModule extends Module { return this.identifier(); } - needRebuild() { - return false; + needBuild(context: any, callback: any) { + return callback(null, !this.buildMeta); } build(_: any, __: any, ___: any, ____: any, callback: () => void) { - this.built = true; - this.buildMeta = {}; + // this.built = true; + this.buildMeta = { + async: true, + exportsType: undefined, + }; this.buildInfo = { + strict: true, + topLevelDeclarations: new Set(), + module: __.outputOptions.module, exportsArgument: '__webpack_exports__', }; callback(); } - source() { - return ` + getConcatenationBailoutReason({ moduleGraph }: any) { + return `@kbn/bundleRemote externals can't be concatenated`; + } + + codeGeneration(_: any) { + const sources = new Map(); + sources.set( + 'javascript', + new RawSource(` __webpack_require__.r(__webpack_exports__); var ns = __kbnBundles__.get('${this.remote.bundleType}/${this.remote.bundleId}/${this.req.target}'); Object.defineProperties(__webpack_exports__, Object.getOwnPropertyDescriptors(ns)) - `; + `) + ); + + const data = new Map(); + data.set('url', this.req.full); + + return { + sources, + runtimeRequirements: new Set([]), + data, + }; } + // source() { + // return ` + // __webpack_require__.r(__webpack_exports__); + // var ns = __kbnBundles__.get('${this.remote.bundleType}/${this.remote.bundleId}/${this.req.target}'); + // Object.defineProperties(__webpack_exports__, Object.getOwnPropertyDescriptors(ns)) + // `; + // } + size() { return 42; } - updateHash(hash: any) { + updateHash(hash: any, context: any) { hash.update(this.identifier()); - super.updateHash(hash); + super.updateHash(hash, context); } } diff --git a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts index 0ce03790acaed..0ffb34a2f882a 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts @@ -40,6 +40,34 @@ export class BundleRemotesPlugin { // hook into the creation of NormalModule instances in webpack, if the import // statement leading to the creation of the module is pointing to a bundleRef // entry then create a BundleRefModule instead of a NormalModule. + // compilationParams.normalModuleFactory.hooks.factorize.tap( + // 'BundleRefsPlugin/normalModuleFactory/factorize', + // (data: RequestData) => { + // const { request } = data.dependencies[0]; + // + // const cached = moduleCache.get(request); + // if (cached === null) { + // return; + // } + // if (cached !== undefined) { + // return cached; + // } + // + // this.resolve(request, (error, result) => { + // if (error || result === undefined) { + // throw error; + // } + // + // moduleCache.set(request, result); + // + // if (result === null) { + // return; + // } + // + // return result; + // }); + // } + // ); compilationParams.normalModuleFactory.hooks.factorize.tapAsync( 'BundleRefsPlugin/normalModuleFactory/factorize', (data: RequestData, callback: Callback) => { From 40fbb442834783401756a23e0166a88931ee691d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 05:22:54 +0100 Subject: [PATCH 012/157] chore(NA): update bundle remote module --- .../src/worker/bundle_remote_module.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index ff59b52879f29..5dc74bf632648 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -84,13 +84,13 @@ export class BundleRemoteModule extends Module { }; } - // source() { - // return ` - // __webpack_require__.r(__webpack_exports__); - // var ns = __kbnBundles__.get('${this.remote.bundleType}/${this.remote.bundleId}/${this.req.target}'); - // Object.defineProperties(__webpack_exports__, Object.getOwnPropertyDescriptors(ns)) - // `; - // } + source() { + return ` + __webpack_require__.r(__webpack_exports__); + var ns = __kbnBundles__.get('${this.remote.bundleType}/${this.remote.bundleId}/${this.req.target}'); + Object.defineProperties(__webpack_exports__, Object.getOwnPropertyDescriptors(ns)) + `; + } size() { return 42; From d2b5e17990f65f9ceaa14f3f3b1f6a653eb86a20 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 05:35:28 +0100 Subject: [PATCH 013/157] fix(NA): bundle_remote_module --- packages/kbn-optimizer/src/worker/bundle_remote_module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index 5dc74bf632648..d1b73db0d5cd6 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -51,7 +51,7 @@ export class BundleRemoteModule extends Module { exportsType: undefined, }; this.buildInfo = { - strict: true, + strict: false, topLevelDeclarations: new Set(), module: __.outputOptions.module, exportsArgument: '__webpack_exports__', @@ -79,7 +79,7 @@ export class BundleRemoteModule extends Module { return { sources, - runtimeRequirements: new Set([]), + runtimeRequirements: new Set(['module', '__webpack_exports__', '__webpack_require__']), data, }; } From 881127ab32c6d3778906c23b33ad5c54444d0154 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 06:00:02 +0100 Subject: [PATCH 014/157] chore(NA): add all polyfills --- package.json | 1 + .../src/worker/webpack.config.ts | 5 +- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 1 + .../kbn-ui-shared-deps-npm/webpack.config.js | 4 +- packages/kbn-ui-shared-deps-src/BUILD.bazel | 1 + .../kbn-ui-shared-deps-src/webpack.config.js | 3 +- yarn.lock | 112 ++++++++++++++++-- 7 files changed, 116 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 5b1f5098a19aa..d8a48bc6d09a8 100644 --- a/package.json +++ b/package.json @@ -1727,6 +1727,7 @@ "mutation-observer": "^1.0.3", "native-hdr-histogram": "^1.0.0", "nock": "12.0.3", + "node-polyfill-webpack-plugin": "^4.0.0", "nyc": "^15.1.0", "oboe": "^2.1.4", "openapi-types": "^10.0.0", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 88f1f3db5627a..5f0443d2e9275 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -10,6 +10,7 @@ import Path from 'path'; import Fs from 'fs'; import webpack from 'webpack'; +import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin'; import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; @@ -75,6 +76,7 @@ export function getWebpackConfig( externals: UiSharedDepsSrc.externals, plugins: [ + new NodePolyfillPlugin(), new CleanWebpackPlugin(), new BundleRemotesPlugin(bundle, bundleRemotes), new PopulateBundleCachePlugin(worker, bundle, parseDllManifest(DLL_MANIFEST)), @@ -295,7 +297,8 @@ export function getWebpackConfig( fs: false, }, fallback: { - path: require.resolve('path-browserify'), + child_process: false, + fs: false, }, }, diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index bf3994398f034..5578311050bbd 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -78,6 +78,7 @@ webpack_cli( ":webpack.config.js", "@npm//webpack", + "@npm//node-polyfill-webpack-plugin", "@npm//clean-webpack-plugin", "@npm//mini-css-extract-plugin", "@npm//moment", diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 724a737338195..c97dd2cdc7691 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -8,6 +8,7 @@ const Path = require('path'); const webpack = require('webpack'); +const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -147,8 +148,6 @@ module.exports = (_, argv) => { fallback: { child_process: false, fs: false, - util: require.resolve('util'), - buffer: require.resolve('buffer'), }, }, @@ -165,6 +164,7 @@ module.exports = (_, argv) => { }, plugins: [ + new NodePolyfillPlugin(), new CleanWebpackPlugin({ protectWebpackAssets: false, cleanAfterEveryBuildPatterns: [ diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index a1ffc4a2ddbec..738959632bb30 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -11,6 +11,7 @@ webpack_cli( data = SRCS + [ "//:.browserslistrc", "@npm//webpack", + "@npm//node-polyfill-webpack-plugin", "@npm//mini-css-extract-plugin", "@npm//moment", "@npm//babel-loader", diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index b5855f040d52e..f39a99726345a 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -12,6 +12,7 @@ require('@kbn/babel-register').install(); const Path = require('path'); const webpack = require('webpack'); +const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const UiSharedDepsNpm = require('@kbn/ui-shared-deps-npm'); @@ -114,7 +115,6 @@ module.exports = { fallback: { child_process: false, fs: false, - url: require.resolve('url'), }, }, @@ -131,6 +131,7 @@ module.exports = { }, plugins: [ + new NodePolyfillPlugin(), new MiniCssExtractPlugin({ filename: '[name].css', }), diff --git a/yarn.lock b/yarn.lock index ffc325b06f47f..693a351e59ed7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14855,6 +14855,11 @@ console-browserify@^1.1.0: dependencies: date-now "^0.1.4" +console-browserify@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -15136,7 +15141,7 @@ crypt@0.0.2: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -crypto-browserify@^3.11.0: +crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== @@ -16501,6 +16506,11 @@ domain-browser@^1.1.1: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== +domain-browser@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-5.7.0.tgz#81b942459672e3c7ed8f721fe31135a5628f31cf" + integrity sha512-edTFu0M/7wO1pXY6GDxVNVW086uqwWYIHP98txhcPyV995X21JIH2DtYp33sQJOupYoXKe9RwTw2Ya2vWaquTQ== + domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" @@ -20225,7 +20235,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -24443,6 +24453,36 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" +node-polyfill-webpack-plugin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-4.0.0.tgz#99c4e4a0b41073b65aa8c584b0d195798aed2c76" + integrity sha512-WLk77vLpbcpmTekRj6s6vYxk30XoyaY5MDZ4+9g8OaKoG3Ij+TjOqhpQjVUlfDZBPBgpNATDltaQkzuXSnnkwg== + dependencies: + assert "^2.1.0" + browserify-zlib "^0.2.0" + buffer "^6.0.3" + console-browserify "^1.2.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.12.0" + domain-browser "^5.7.0" + events "^3.3.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "^1.0.1" + process "^0.11.10" + punycode "^2.3.1" + querystring-es3 "^0.2.1" + readable-stream "^4.5.2" + stream-browserify "^3.0.0" + stream-http "^3.2.0" + string_decoder "^1.3.0" + timers-browserify "^2.0.12" + tty-browserify "^0.0.1" + type-fest "^4.18.2" + url "^0.11.3" + util "^0.12.5" + vm-browserify "^1.1.2" + node-preload@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" @@ -26651,6 +26691,11 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + pupa@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pupa/-/pupa-3.1.0.tgz#f15610274376bbcc70c9a3aa8b505ea23f41c579" @@ -26721,7 +26766,7 @@ query-string@^6.13.2: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -querystring-es3@^0.2.0: +querystring-es3@^0.2.0, querystring-es3@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= @@ -27534,7 +27579,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0, readable-stream@^3.6.2: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -27563,6 +27608,17 @@ readable-stream@^4.0.0: events "^3.3.0" process "^0.11.10" +readable-stream@^4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readable-stream@~2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" @@ -28458,7 +28514,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -29831,6 +29887,14 @@ stream-browserify@^2.0.1: inherits "~2.0.1" readable-stream "^2.0.2" +stream-browserify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" + integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== + dependencies: + inherits "~2.0.4" + readable-stream "^3.5.0" + stream-chopper@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/stream-chopper/-/stream-chopper-3.0.1.tgz#73791ae7bf954c297d6683aec178648efc61dd75" @@ -29864,6 +29928,16 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" +stream-http@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" + integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.4" + readable-stream "^3.6.0" + xtend "^4.0.2" + stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" @@ -30013,6 +30087,13 @@ string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +string_decoder@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -30803,6 +30884,13 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= +timers-browserify@^2.0.12: + version "2.0.12" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" + integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== + dependencies: + setimmediate "^1.0.4" + timers-browserify@^2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" @@ -31157,6 +31245,11 @@ tty-browserify@0.0.0: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= +tty-browserify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" + integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -31233,6 +31326,11 @@ type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.18.3.tgz#5249f96e7c2c3f0f1561625f54050e343f1c8f68" integrity sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ== +type-fest@^4.18.2: + version "4.25.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.25.0.tgz#b190374f969631866889bbdb01ece17ca424ee60" + integrity sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -31729,7 +31827,7 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -url@^0.11.4: +url@^0.11.3, url@^0.11.4: version "0.11.4" resolved "https://registry.yarnpkg.com/url/-/url-0.11.4.tgz#adca77b3562d56b72746e76b330b7f27b6721f3c" integrity sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg== @@ -32402,7 +32500,7 @@ vinyl@^3.0.0: replace-ext "^2.0.0" teex "^1.0.1" -vm-browserify@^1.0.1: +vm-browserify@^1.0.1, vm-browserify@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== From c0e8e7464e2e455e65e59581885622c9e3cf0e08 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 06:20:21 +0100 Subject: [PATCH 015/157] fix(NA): usage of node:crypto --- packages/kbn-optimizer/src/worker/webpack.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 5f0443d2e9275..d4023d07347b7 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -73,7 +73,10 @@ export function getWebpackConfig( }, }, - externals: UiSharedDepsSrc.externals, + externals: { + 'node:crypto': 'commonjs crypto', + ...UiSharedDepsSrc.externals, + }, plugins: [ new NodePolyfillPlugin(), From 6369ccd5a150b33af44eec3cddd012d61ebfae3d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 06:49:30 +0100 Subject: [PATCH 016/157] chore(NA): use relative import on sass file --- src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss b/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss index c89337d29e720..e78e7907c9847 100644 --- a/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss +++ b/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss @@ -1,4 +1,4 @@ -@import 'src/core/public/mixins'; +@import '../../../../../src/core/public/mixins'; .dshUnsavedListingItem { margin-top: $euiSizeM; From a2812bd2dd5d6dbfc38161d511cdecec84be99a7 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 07:58:49 +0100 Subject: [PATCH 017/157] chore(NA): more polyfills for ui shared deps --- packages/kbn-optimizer/src/worker/webpack.config.ts | 4 ++-- packages/kbn-ui-shared-deps-npm/webpack.config.js | 8 +++++--- packages/kbn-ui-shared-deps-src/webpack.config.js | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index d4023d07347b7..bd759bd5580b7 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -288,8 +288,8 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], - mainFields: ['browser', 'main', 'module'], - conditionNames: ['require', 'default', 'node', 'module', 'import'], + mainFields: ['browser', 'main'], + // conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { core_app_image_assets: Path.resolve( worker.repoRoot, diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index c97dd2cdc7691..66c8aff397811 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -143,8 +143,8 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], - mainFields: ['browser', 'main', 'module'], - conditionNames: ['require', 'default', 'node', 'module', 'import'], + mainFields: ['browser', 'main'], + // conditionNames: ['require', 'default', 'node', 'module', 'import'], fallback: { child_process: false, fs: false, @@ -164,7 +164,9 @@ module.exports = (_, argv) => { }, plugins: [ - new NodePolyfillPlugin(), + new NodePolyfillPlugin({ + additionalAliases: ['process'], + }), new CleanWebpackPlugin({ protectWebpackAssets: false, cleanAfterEveryBuildPatterns: [ diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index f39a99726345a..123ebf804a837 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -102,8 +102,8 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], - mainFields: ['browser', 'main', 'module'], - conditionNames: ['require', 'default', 'node', 'module', 'import'], + mainFields: ['browser', 'main'], + // conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', moment: MOMENT_SRC, From bf811bb67c7bd9ea5ad87f072a0a8da9b0b49fd5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 09:00:03 +0100 Subject: [PATCH 018/157] chore(NA): eslint fix --- packages/kbn-optimizer/src/worker/bundle_remote_module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index d1b73db0d5cd6..c0ebb6a2ad947 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -79,7 +79,7 @@ export class BundleRemoteModule extends Module { return { sources, - runtimeRequirements: new Set(['module', '__webpack_exports__', '__webpack_require__']), + runtimeRequirements: new Set(['module', '__webpack_exports__', '__webpack_require__']), data, }; } From 3d3aff0d15621fdd6a2f1130f5b6ab9695290f66 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 17:04:11 +0100 Subject: [PATCH 019/157] fix(NA): async code generation for bundles --- packages/kbn-optimizer/src/worker/bundle_remote_module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index c0ebb6a2ad947..8b55f5dc1ee1e 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -47,7 +47,7 @@ export class BundleRemoteModule extends Module { build(_: any, __: any, ___: any, ____: any, callback: () => void) { // this.built = true; this.buildMeta = { - async: true, + async: false, exportsType: undefined, }; this.buildInfo = { From 7fa674bd4ff4779bc036a193f4baf1633bd402f1 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 17:53:29 +0100 Subject: [PATCH 020/157] fix(NA): include process polyfills --- packages/kbn-optimizer/src/worker/webpack.config.ts | 6 +++++- packages/kbn-ui-shared-deps-src/webpack.config.js | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index bd759bd5580b7..204f3cb1d6a38 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -47,6 +47,8 @@ export function getWebpackConfig( devtool: worker.dist ? false : 'cheap-source-map', profile: worker.profileWebpack, + target: 'web', + output: { hashFunction: 'sha1', path: bundle.outputDir, @@ -79,7 +81,9 @@ export function getWebpackConfig( }, plugins: [ - new NodePolyfillPlugin(), + new NodePolyfillPlugin({ + additionalAliases: ['process'], + }), new CleanWebpackPlugin(), new BundleRemotesPlugin(bundle, bundleRemotes), new PopulateBundleCachePlugin(worker, bundle, parseDllManifest(DLL_MANIFEST)), diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 123ebf804a837..83b60228f2632 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -131,7 +131,9 @@ module.exports = { }, plugins: [ - new NodePolyfillPlugin(), + new NodePolyfillPlugin({ + additionalAliases: ['process'], + }), new MiniCssExtractPlugin({ filename: '[name].css', }), From 1845914393aa00c9803f1d3c06b15d5812091fe5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 22 Aug 2024 18:00:18 +0100 Subject: [PATCH 021/157] chore(NA): remove specific polyfills from package.json --- package.json | 3 --- packages/kbn-monaco/BUILD.bazel | 2 -- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 1 - 3 files changed, 6 deletions(-) diff --git a/package.json b/package.json index d8a48bc6d09a8..af49dafcf5d21 100644 --- a/package.json +++ b/package.json @@ -1616,7 +1616,6 @@ "aggregate-error": "^3.1.0", "apidoc-markdown": "^7.3.2", "argsplit": "^1.0.5", - "assert": "^2.1.0", "autoprefixer": "^10.4.7", "axe-core": "^4.10.0", "babel-jest": "^29.6.1", @@ -1629,7 +1628,6 @@ "babel-plugin-transform-typescript-metadata": "^0.3.2", "backport": "^8.9.8", "blob-polyfill": "^7.0.20220408", - "buffer": "^6.0.3", "buildkite-test-collector": "^1.7.0", "callsites": "^3.1.0", "chance": "1.0.18", @@ -1732,7 +1730,6 @@ "oboe": "^2.1.4", "openapi-types": "^10.0.0", "p-reflect": "2.1.0", - "path-browserify": "^1.0.1", "pbf": "3.2.1", "peggy": "^1.2.0", "picomatch": "^2.3.1", diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 93717d8041aa8..9b15dbd024cc4 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -41,8 +41,6 @@ webpack_cli( "@npm//terser-webpack-plugin", "@npm//@babel/runtime", "@npm//babel-loader", - "@npm//assert", - "@npm//buffer", "@npm//rxjs", "webpack.config.js", diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 5578311050bbd..581482dd1b9ab 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -44,7 +44,6 @@ RUNTIME_DEPS = [ "@npm//@hello-pangea/dnd", "@npm//@tanstack/react-query", "@npm//@tanstack/react-query-devtools", - "@npm//buffer", "@npm//classnames", "@npm//fflate", "@npm//fastest-levenshtein", From b91ecd0b1d62e8ac776fcc93b2327bb75fe291d9 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:13:35 +0000 Subject: [PATCH 022/157] [CI] Auto-commit changed files from 'node scripts/notice' --- yarn.lock | 263 ++++++++---------------------------------------------- 1 file changed, 35 insertions(+), 228 deletions(-) diff --git a/yarn.lock b/yarn.lock index 62509b846a117..09146e028b8ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13996,15 +13996,7 @@ callsites@^3.0.0, callsites@^3.1.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.1.tgz#1fc41c854f00e2f7d0139dfeba1542d6896fe547" - integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== - dependencies: - pascal-case "^3.1.1" - tslib "^1.10.0" - -camel-case@^4.1.2: +camel-case@^4.1.1, camel-case@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== @@ -14885,14 +14877,7 @@ connect-history-api-fallback@^2.0.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= - dependencies: - date-now "^0.1.4" - -console-browserify@^1.2.0: +console-browserify@^1.1.0, console-browserify@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== @@ -16917,15 +16902,7 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" - integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enhanced-resolve@^5.17.0: +enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0, enhanced-resolve@^5.17.0: version "5.17.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== @@ -19129,18 +19106,7 @@ glob@8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@^10.3.10: - version "10.3.10" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" - integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== - dependencies: - foreground-child "^3.1.0" - jackspeak "^2.3.5" - minimatch "^9.0.1" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry "^1.10.1" - -glob@^10.3.7: +glob@^10.3.10, glob@^10.3.7: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== @@ -19840,12 +19806,7 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-entities@^2.1.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== - -html-entities@^2.4.0: +html-entities@^2.1.0, html-entities@^2.4.0: version "2.5.2" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== @@ -22918,12 +22879,12 @@ lowlight@^1.14.0: fault "^1.0.0" highlight.js "~10.4.0" -lru-cache@10.2.0, "lru-cache@^9.1.1 || ^10.0.0": +lru-cache@10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== -lru-cache@^10.2.0: +lru-cache@^10.2.0, "lru-cache@^9.1.1 || ^10.0.0": version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== @@ -23629,14 +23590,7 @@ minimatch@^5.0.1, minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.1: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.4: +minimatch@^9.0.1, minimatch@^9.0.4: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -23697,12 +23651,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": - version "7.0.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" - integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== - -minipass@^7.1.2: +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== @@ -25392,15 +25341,7 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -param-case@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.3.tgz#4be41f8399eff621c56eebb829a5e451d9801238" - integrity sha512-VWBVyimc1+QrzappRs7waeN2YmoZFCGXWASRYX1/rGHtXqEcrGEIDm+jqIwFa2fRXNgQEwrxaYuIrX0WcAguTA== - dependencies: - dot-case "^3.0.3" - tslib "^1.10.0" - -param-case@^3.0.4: +param-case@^3.0.3, param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== @@ -25478,14 +25419,7 @@ parse5@^6.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^7.0.0, parse5@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.1.tgz#4649f940ccfb95d8754f37f73078ea20afe0c746" - integrity sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg== - dependencies: - entities "^4.4.0" - -parse5@^7.1.2: +parse5@^7.0.0, parse5@^7.1.1, parse5@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== @@ -25497,15 +25431,7 @@ parseurl@~1.3.2, parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -pascal-case@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.1.tgz#5ac1975133ed619281e88920973d2cd1f279de5f" - integrity sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA== - dependencies: - no-case "^3.0.3" - tslib "^1.10.0" - -pascal-case@^3.1.2: +pascal-case@^3.1.1, pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== @@ -25575,15 +25501,7 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" - integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== - dependencies: - lru-cache "^9.1.1 || ^10.0.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - -path-scurry@^1.11.1: +path-scurry@^1.10.1, path-scurry@^1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== @@ -26286,7 +26204,7 @@ postcss-values-parser@^6.0.2: is-url-superb "^4.0.0" quote-unquote "^1.0.0" -postcss@8.4.31, postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31: +postcss@8.4.31: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== @@ -26303,7 +26221,7 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.4.33: +postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: version "8.4.38" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== @@ -26723,12 +26641,7 @@ punycode@^1.2.4, punycode@^1.4.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -punycode@^2.3.1: +punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== @@ -26780,14 +26693,7 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -qs@^6.10.0, qs@^6.11.0, qs@^6.7.0: - version "6.11.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" - integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== - dependencies: - side-channel "^1.0.4" - -qs@^6.12.3: +qs@^6.10.0, qs@^6.11.0, qs@^6.12.3, qs@^6.7.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== @@ -27635,17 +27541,7 @@ read-pkg@^5.2.0: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba" - integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - -readable-stream@^4.5.2: +readable-stream@^4.0.0, readable-stream@^4.5.2: version "4.5.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== @@ -28792,17 +28688,7 @@ schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - -schema-utils@^4.2.0: +schema-utils@^4.0.0, schema-utils@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== @@ -29191,16 +29077,7 @@ should@^13.2.1: should-type-adaptors "^1.0.1" should-util "^1.0.0" -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -side-channel@^1.0.6: +side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== @@ -29502,12 +29379,7 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-js@^1.2.0: +source-map-js@^1.0.2, source-map-js@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== @@ -30118,14 +29990,7 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@^1.3.0: +string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -30137,6 +30002,13 @@ string_decoder@~0.10.x: resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + stringify-entities@^3.0.0, stringify-entities@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-3.0.1.tgz#32154b91286ab0869ab2c07696223bd23b6dbfc0" @@ -30786,17 +30658,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.15.1: - version "5.31.3" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38" - integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -terser@^5.26.0, terser@^5.3.4, terser@^5.31.6, terser@^5.9.0: +terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.31.6, terser@^5.9.0: version "5.31.6" resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" integrity sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg== @@ -30922,20 +30784,13 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= -timers-browserify@^2.0.12: +timers-browserify@^2.0.12, timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== dependencies: setimmediate "^1.0.4" -timers-browserify@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" - integrity sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw== - dependencies: - setimmediate "^1.0.4" - tiny-inflate@^1.0.0, tiny-inflate@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4" @@ -31359,12 +31214,7 @@ type-fest@^2.13.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== -type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: - version "4.18.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.18.3.tgz#5249f96e7c2c3f0f1561625f54050e343f1c8f68" - integrity sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ== - -type-fest@^4.18.2: +type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.18.2, type-fest@^4.9.0: version "4.25.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.25.0.tgz#b190374f969631866889bbdb01ece17ca424ee60" integrity sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw== @@ -31857,15 +31707,7 @@ url-template@^2.0.8: resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" integrity sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw== -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -url@^0.11.3, url@^0.11.4: +url@^0.11.0, url@^0.11.3, url@^0.11.4: version "0.11.4" resolved "https://registry.yarnpkg.com/url/-/url-0.11.4.tgz#adca77b3562d56b72746e76b330b7f27b6721f3c" integrity sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg== @@ -32879,37 +32721,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5: - version "5.91.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" - integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-assertions "^1.9.0" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.16.0" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - -webpack@^5.93.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.93.0: version "5.93.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== @@ -33096,12 +32908,7 @@ widest-line@^4.0.1: dependencies: string-width "^5.0.1" -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -wildcard@^2.0.1: +wildcard@^2.0.0, wildcard@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== From 69ab2f7fd42bd69dbaf8d221e461dbf972b27fc9 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:14:17 +0000 Subject: [PATCH 023/157] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- yarn.lock | 50 +++++++++++++------------------------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index 09146e028b8ac..6647348bf80bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12170,11 +12170,6 @@ acorn-globals@^7.0.0: acorn "^8.1.0" acorn-walk "^8.0.2" -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== - acorn-import-attributes@^1.9.5: version "1.9.5" resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" @@ -12325,7 +12320,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-keywords@^5.0.0, ajv-keywords@^5.1.0: +ajv-keywords@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== @@ -12342,7 +12337,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.8.0, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -15872,11 +15867,6 @@ date-fns@^2.29.3: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= - dateformat@^4.5.1: version "4.6.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" @@ -16582,7 +16572,7 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.1" -dot-case@^3.0.3, dot-case@^3.0.4: +dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== @@ -16902,7 +16892,7 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0, enhanced-resolve@^5.17.0: +enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.0: version "5.17.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== @@ -18873,7 +18863,7 @@ get-east-asian-width@^1.0.0: resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== @@ -21226,15 +21216,6 @@ iterate-value@^1.0.0: es-get-iterator "^1.0.2" iterate-iterator "^1.0.1" -jackspeak@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - jackspeak@^3.1.2: version "3.4.3" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" @@ -22884,7 +22865,7 @@ lru-cache@10.2.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== -lru-cache@^10.2.0, "lru-cache@^9.1.1 || ^10.0.0": +lru-cache@^10.2.0: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== @@ -23590,7 +23571,7 @@ minimatch@^5.0.1, minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.1, minimatch@^9.0.4: +minimatch@^9.0.4: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -24274,7 +24255,7 @@ nise@^1.5.2: lolex "^5.0.1" path-to-regexp "^1.7.0" -no-case@^3.0.3, no-case@^3.0.4: +no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== @@ -24747,7 +24728,7 @@ object-identity-map@^1.0.2: dependencies: object.entries "^1.1.0" -object-inspect@^1.13.1, object-inspect@^1.6.0, object-inspect@^1.7.0, object-inspect@^1.9.0: +object-inspect@^1.13.1, object-inspect@^1.6.0, object-inspect@^1.7.0: version "1.13.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== @@ -25431,7 +25412,7 @@ parseurl@~1.3.2, parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -pascal-case@^3.1.1, pascal-case@^3.1.2: +pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== @@ -25501,7 +25482,7 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1, path-scurry@^1.11.1: +path-scurry@^1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== @@ -26631,11 +26612,6 @@ punycode.js@^2.3.1: resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -26714,7 +26690,7 @@ querystring-es3@^0.2.0, querystring-es3@^0.2.1: resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= -querystring@0.2.0, querystring@^0.2.0: +querystring@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= @@ -31116,7 +31092,7 @@ tslib@2.6.2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3. resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== From 0efc8dee39a10aab5cc6355f2bd35f959ffef63e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 23 Aug 2024 18:34:03 +0100 Subject: [PATCH 024/157] chore(NA): max asset size as before --- packages/kbn-optimizer/src/worker/webpack.config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 204f3cb1d6a38..67ec8eb83c990 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -286,7 +286,12 @@ export function getWebpackConfig( { test: /\.(woff|woff2|ttf|eot|svg|ico|png|jpg|gif|jpeg)(\?|$)/, type: 'asset', - }, + parser: { + dataUrlCondition: { + maxSize: 8192 + } + } + } ], }, From 09f5e0d629d22a2c9ad0a5f25739bf1375c031b7 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 23 Aug 2024 19:12:08 +0100 Subject: [PATCH 025/157] fix(NA): url assets limits --- packages/kbn-optimizer/src/worker/webpack.config.ts | 6 +++--- packages/kbn-ui-shared-deps-src/webpack.config.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 67ec8eb83c990..f72e897ed0b7b 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -288,9 +288,9 @@ export function getWebpackConfig( type: 'asset', parser: { dataUrlCondition: { - maxSize: 8192 - } - } + maxSize: 8192, + }, + }, } ], }, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 83b60228f2632..335a83fc4969c 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -96,6 +96,11 @@ module.exports = { { test: /\.(ttf)(\?|$)/, type: 'asset', + parser: { + dataUrlCondition: { + maxSize: 8192, + }, + }, }, ], }, From a13fa3d197f6171f265bd5f8e5608417dfcba36e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 24 Aug 2024 04:45:37 +0100 Subject: [PATCH 026/157] fix(NA): recover old chunkIds algorithm --- packages/kbn-optimizer/src/worker/webpack.config.ts | 3 ++- packages/kbn-ui-shared-deps-npm/webpack.config.js | 1 + packages/kbn-ui-shared-deps-src/webpack.config.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index f72e897ed0b7b..4255eabdd032a 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -64,6 +64,7 @@ export function getWebpackConfig( }, optimization: { + chunkIds: worker.dist ? 'deterministic' : 'natural', emitOnErrors: false, splitChunks: { maxAsyncRequests: 10, @@ -291,7 +292,7 @@ export function getWebpackConfig( maxSize: 8192, }, }, - } + }, ], }, diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 66c8aff397811..20a0a250a1cb8 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -152,6 +152,7 @@ module.exports = (_, argv) => { }, optimization: { + chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, }, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 335a83fc4969c..5fa72ac4d1817 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -124,6 +124,7 @@ module.exports = { }, optimization: { + chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, }, From 5b23938eb8a7bf29f463f1cd8528c571114f02cb Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 26 Aug 2024 19:56:24 +0100 Subject: [PATCH 027/157] chore(NA): performance experiments --- .../src/worker/webpack.config.ts | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 4255eabdd032a..a2b347f22c306 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -50,7 +50,8 @@ export function getWebpackConfig( target: 'web', output: { - hashFunction: 'sha1', + // TODO: remove this commented line if xxhash64 is faster + // hashFunction: 'sha1', path: bundle.outputDir, filename: `${bundle.id}.${bundle.type}.js`, chunkFilename: `${bundle.id}.chunk.[id].js`, @@ -325,6 +326,31 @@ export function getWebpackConfig( const nonDistributableConfig: webpack.Configuration = { mode: 'development', + + // TODO: potential performance impact flags + output: { + hashFunction: 'xxhash64', + pathinfo: false, + }, + + experiments: { + cacheUnaffected: true, + // WHEN true is returning error + futureDefaults: false, + // TODO: enable this after converting all plugins to v5 + // backCompat: false, + }, + + optimization: { + sideEffects: false, + providedExports: false, + usedExports: false, + }, + + module: { + unsafeCache: true, + }, + // }; const distributableConfig: webpack.Configuration = { From f8c155686615f5732182bc92aa97914823d3773b Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:54:34 +0000 Subject: [PATCH 028/157] [CI] Auto-commit changed files from 'node scripts/notice' --- yarn.lock | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index fa7c7caf2aba4..fb125d5fe6d96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30916,12 +30916,7 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: - version "4.18.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.18.3.tgz#5249f96e7c2c3f0f1561625f54050e343f1c8f68" - integrity sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ== - -type-fest@^4.18.2: +type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.18.2, type-fest@^4.9.0: version "4.25.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.25.0.tgz#b190374f969631866889bbdb01ece17ca424ee60" integrity sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw== @@ -32583,12 +32578,7 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -wildcard@^2.0.1: +wildcard@^2.0.0, wildcard@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== From 813115029fc79cd188e1678bf4debe4479b7f0c6 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 27 Aug 2024 06:10:03 +0100 Subject: [PATCH 029/157] chore(NA): added some performance tunning settings to test --- .../src/worker/webpack.config.ts | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index a2b347f22c306..2bbe0950eadd9 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -39,7 +39,6 @@ export function getWebpackConfig( const commonConfig: webpack.Configuration = { context: bundle.contextDir, - cache: true, entry: { [bundle.id]: ENTRY_CREATOR, }, @@ -65,6 +64,7 @@ export function getWebpackConfig( }, optimization: { + moduleIds: worker.dist ? 'deterministic' : 'natural', chunkIds: worker.dist ? 'deterministic' : 'natural', emitOnErrors: false, splitChunks: { @@ -328,28 +328,44 @@ export function getWebpackConfig( mode: 'development', // TODO: potential performance impact flags + cache: { + type: 'memory', + cacheUnaffected: true, + }, + output: { - hashFunction: 'xxhash64', - pathinfo: false, + // xxhash64 or sha1: according to docs xxhash should be faster but for now sha1 looks faster + hashFunction: 'sha1', + // Setting this to false looks like it will boost performance by a little + // pathinfo: false, }, experiments: { cacheUnaffected: true, - // WHEN true is returning error - futureDefaults: false, // TODO: enable this after converting all plugins to v5 // backCompat: false, }, optimization: { + // Need to test which composition makes for the best performance sideEffects: false, - providedExports: false, - usedExports: false, + // providedExports: false, + // usedExports: false, + removeAvailableModules: false, + removeEmptyChunks: false, }, + // resolve: { + // // Not sure if this is bringing any performance to the table + // cacheWithContext: false, + // }, + module: { + // This was default on webpack v4 unsafeCache: true, }, + // NOTE: I'm not sure about this but it does seem like it is speeding up + parallelism: 5000, // }; From edaf5b85d73e1bebd9c147f1d7fcbe56dc77d66a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 27 Aug 2024 06:13:57 +0100 Subject: [PATCH 030/157] chore(NA): upgrade babel-loader --- package.json | 4 +- yarn.lock | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 103 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 02a1d2235bd4c..f07dcedb436bb 100644 --- a/package.json +++ b/package.json @@ -1632,7 +1632,7 @@ "autoprefixer": "^10.4.7", "axe-core": "^4.10.0", "babel-jest": "^29.7.0", - "babel-loader": "^8.2.5", + "babel-loader": "^9.1.3", "babel-plugin-add-module-exports": "^1.0.4", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-require-context-hook": "^1.0.0", @@ -1795,7 +1795,7 @@ "vinyl-fs": "^4.0.0", "watchpack": "^1.6.0", "web-streams-polyfill": "^4.0.0", - "webpack": "^5.93.0", + "webpack": "^5.94.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.0.4", diff --git a/yarn.lock b/yarn.lock index 1a0225868da0b..3f0ae3bd461be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12967,7 +12967,7 @@ babel-jest@^29.7.0: graceful-fs "^4.2.9" slash "^3.0.0" -babel-loader@^8.0.0, babel-loader@^8.2.5: +babel-loader@^8.0.0: version "8.2.5" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e" integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== @@ -12977,6 +12977,14 @@ babel-loader@^8.0.0, babel-loader@^8.2.5: make-dir "^3.1.0" schema-utils "^2.6.5" +babel-loader@^9.1.3: + version "9.1.3" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.3.tgz#3d0e01b4e69760cc694ee306fe16d358aa1c6f9a" + integrity sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw== + dependencies: + find-cache-dir "^4.0.0" + schema-utils "^4.0.0" + babel-plugin-add-module-exports@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz#6caa4ddbe1f578c6a5264d4d3e6c8a2720a7ca2b" @@ -16768,6 +16776,14 @@ enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enhanced-resolve@^5.17.1: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -18180,6 +18196,14 @@ find-cache-dir@^3.2.0, find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-cache-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-4.0.0.tgz#a30ee0448f81a3990708f6453633c733e2f6eec2" + integrity sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg== + dependencies: + common-path-prefix "^3.0.0" + pkg-dir "^7.0.0" + find-cypress-specs@^1.41.4: version "1.41.4" resolved "https://registry.yarnpkg.com/find-cypress-specs/-/find-cypress-specs-1.41.4.tgz#583595c502e785f7bb44dbb5a9ba2f09caf59e94" @@ -18251,6 +18275,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== + dependencies: + locate-path "^7.1.0" + path-exists "^5.0.0" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -22397,6 +22429,13 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +locate-path@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" + integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== + dependencies: + p-locate "^6.0.0" + lodash-es@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" @@ -24942,6 +24981,13 @@ p-limit@^3.0.1, p-limit@^3.0.2, p-limit@^3.1.0: dependencies: yocto-queue "^0.1.0" +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -24963,6 +25009,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" @@ -25241,6 +25294,11 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -25513,6 +25571,13 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" +pkg-dir@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-7.0.0.tgz#8f0c08d6df4476756c5ff29b3282d0bab7517d11" + integrity sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA== + dependencies: + find-up "^6.3.0" + pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -32416,7 +32481,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.93.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5: version "5.93.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== @@ -32446,6 +32511,35 @@ webpack@4: watchpack "^2.4.1" webpack-sources "^3.2.3" +webpack@^5.94.0: + version "5.94.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" + integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== + dependencies: + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-attributes "^1.9.5" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.17.1" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" @@ -33033,6 +33127,11 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +yocto-queue@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.1.1.tgz#fef65ce3ac9f8a32ceac5a634f74e17e5b232110" + integrity sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g== + z-schema@^5.0.1: version "5.0.2" resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.2.tgz#f410394b2c9fcb9edaf6a7511491c0bb4e89a504" From 05d91707f31f81939b3b06257df5e36a997f6473 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 27 Aug 2024 17:47:44 +0100 Subject: [PATCH 031/157] chore(NA): removes warnings for fitlers --- packages/kbn-optimizer-webpack-helpers/index.ts | 1 + packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts | 4 +--- packages/kbn-optimizer/src/common/bundle_cache.ts | 2 +- packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts | 2 +- packages/kbn-optimizer/src/worker/webpack.config.ts | 4 ++++ 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/kbn-optimizer-webpack-helpers/index.ts b/packages/kbn-optimizer-webpack-helpers/index.ts index 3da5a5ecc559f..239fc2aa306b8 100644 --- a/packages/kbn-optimizer-webpack-helpers/index.ts +++ b/packages/kbn-optimizer-webpack-helpers/index.ts @@ -16,6 +16,7 @@ export type { } from './src/webpack_helpers'; export { + STATS_WARNINGS_FILTER, isFailureStats, failedStatsToErrorMessage, getModulePath, diff --git a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts index 7238bc894875a..5c5d3a90bb43b 100644 --- a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts +++ b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts @@ -16,13 +16,12 @@ export function isFailureStats(stats: webpack.Stats) { const { warnings } = stats.toJson({ all: false, warnings: true, - warningsFilter: STATS_WARNINGS_FILTER, }); return warnings && warnings.length > 0; } -const STATS_WARNINGS_FILTER = new RegExp( +export const STATS_WARNINGS_FILTER = new RegExp( [ '(export .* was not found in)', '|(chunk .* \\[mini-css-extract-plugin\\]\\\nConflicting order between:)', @@ -33,7 +32,6 @@ export function failedStatsToErrorMessage(stats: webpack.Stats) { const details = stats.toString({ ...stats.compilation.createStatsOptions('minimal'), colors: true, - warningsFilter: STATS_WARNINGS_FILTER, errors: true, errorDetails: true, moduleTrace: true, diff --git a/packages/kbn-optimizer/src/common/bundle_cache.ts b/packages/kbn-optimizer/src/common/bundle_cache.ts index 8e246227eb7fe..731e77737dfbb 100644 --- a/packages/kbn-optimizer/src/common/bundle_cache.ts +++ b/packages/kbn-optimizer/src/common/bundle_cache.ts @@ -121,7 +121,7 @@ export class BundleCache { } } - public writeWebpackAsset(compilation: webpack.compilation.Compilation) { + public writeWebpackAsset(compilation: webpack.Compilation) { if (!this.path) { return; } diff --git a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts index 0ffb34a2f882a..97a4da2ec09ab 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remotes_plugin.ts @@ -114,7 +114,7 @@ export class BundleRemotesPlugin { compilation.hooks.finishModules.tapPromise( 'BundleRefsPlugin/finishModules', async (modules) => { - const usedBundleIds = (modules as any[]) + const usedBundleIds = (Array.from(modules) as any[]) .filter((m: any): m is BundleRemoteModule => m instanceof BundleRemoteModule) .map((m) => m.remote.bundleId); diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 2bbe0950eadd9..b9c62fe51765f 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -20,6 +20,7 @@ import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; // @ts-expect-error import VisualizerPlugin from 'webpack-visualizer-plugin2'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; +import { STATS_WARNINGS_FILTER } from '@kbn/optimizer-webpack-helpers'; import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common'; import { BundleRemotesPlugin } from './bundle_remotes_plugin'; @@ -322,6 +323,8 @@ export function getWebpackConfig( // and not for the webpack compilations performance itself hints: false, }, + + ignoreWarnings: [STATS_WARNINGS_FILTER], }; const nonDistributableConfig: webpack.Configuration = { @@ -353,6 +356,7 @@ export function getWebpackConfig( // usedExports: false, removeAvailableModules: false, removeEmptyChunks: false, + mergeDuplicateChunks: false, }, // resolve: { From e7f7d76cb7198973fa0a0bee2af1bbf3ad34cfe8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 28 Aug 2024 00:54:52 +0100 Subject: [PATCH 032/157] chore(NA): migrates bundle metrics plugin and populate bundle cache plugin without deprecations to v5 --- .../src/worker/bundle_metrics_plugin.ts | 150 ++++++------ .../worker/populate_bundle_cache_plugin.ts | 227 +++++++++--------- .../src/worker/webpack.config.ts | 8 +- 3 files changed, 201 insertions(+), 184 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts index b7a1532b271cf..96efa78b44300 100644 --- a/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts @@ -31,82 +31,90 @@ export class BundleMetricsPlugin { const { bundle } = this; - compiler.hooks.emit.tap('BundleMetricsPlugin', (compilation) => { - const assets = Object.entries(compilation.assets) - .map( - ([name, source]: [string, any]): Asset => ({ - name, - size: source.size(), - }) - ) - .filter((asset) => { - const filename = Path.basename(asset.name); - if (filename.startsWith('.')) { - return false; - } - - const ext = Path.extname(filename); - if (IGNORED_EXTNAME.includes(ext)) { - return false; + compiler.hooks.compilation.tap('BundleMetricsPlugin', (compilation) => { + compilation.hooks.processAssets.tap( + { + name: 'BundleMetricsPlugin', + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, + }, + () => { + const assets = Object.entries(compilation.assets) + .map( + ([name, source]: [string, any]): Asset => ({ + name, + size: source.size(), + }) + ) + .filter((asset) => { + const filename = Path.basename(asset.name); + if (filename.startsWith('.')) { + return false; + } + + const ext = Path.extname(filename); + if (IGNORED_EXTNAME.includes(ext)) { + return false; + } + + return true; + }); + + const entryName = `${bundle.id}.${bundle.type}.js`; + const entry = assets.find((a) => a.name === entryName); + if (!entry) { + throw new Error( + `Unable to find bundle entry named [${entryName}] in [${bundle.outputDir}]` + ); } - return true; - }); - - const entryName = `${bundle.id}.${bundle.type}.js`; - const entry = assets.find((a) => a.name === entryName); - if (!entry) { - throw new Error( - `Unable to find bundle entry named [${entryName}] in [${bundle.outputDir}]` - ); - } + const chunkPrefix = `${bundle.id}.chunk.`; + const asyncChunks = assets.filter((a) => a.name.startsWith(chunkPrefix)); + const miscFiles = assets.filter((a) => a !== entry && !asyncChunks.includes(a)); - const chunkPrefix = `${bundle.id}.chunk.`; - const asyncChunks = assets.filter((a) => a.name.startsWith(chunkPrefix)); - const miscFiles = assets.filter((a) => a !== entry && !asyncChunks.includes(a)); + const sumSize = (files: Asset[]) => files.reduce((acc: number, a) => acc + a.size, 0); - const sumSize = (files: Asset[]) => files.reduce((acc: number, a) => acc + a.size, 0); - - const moduleCount = bundle.cache.getModuleCount(); - if (moduleCount === undefined) { - throw new Error(`moduleCount wasn't populated by PopulateBundleCachePlugin`); - } - - const bundleMetrics: CiStatsMetric[] = [ - { - group: `@kbn/optimizer bundle module count`, - id: bundle.id, - value: moduleCount, - }, - { - group: `page load bundle size`, - id: bundle.id, - value: entry.size, - limit: bundle.pageLoadAssetSizeLimit, - limitConfigPath: `packages/kbn-optimizer/limits.yml`, - }, - { - group: `async chunks size`, - id: bundle.id, - value: sumSize(asyncChunks), - }, - { - group: `async chunk count`, - id: bundle.id, - value: asyncChunks.length, - }, - { - group: `miscellaneous assets size`, - id: bundle.id, - value: sumSize(miscFiles), - }, - ]; - - const metricsSource = new RawSource(JSON.stringify(bundleMetrics, null, 2)); + const moduleCount = bundle.cache.getModuleCount(); + if (moduleCount === undefined) { + throw new Error(`moduleCount wasn't populated by PopulateBundleCachePlugin`); + } - // see https://github.com/jantimon/html-webpack-plugin/blob/33d69f49e6e9787796402715d1b9cd59f80b628f/index.js#L266 - // @ts-expect-error undocumented, used to add assets to the output - compilation.emitAsset('metrics.json', metricsSource); + const bundleMetrics: CiStatsMetric[] = [ + { + group: `@kbn/optimizer bundle module count`, + id: bundle.id, + value: moduleCount, + }, + { + group: `page load bundle size`, + id: bundle.id, + value: entry.size, + limit: bundle.pageLoadAssetSizeLimit, + limitConfigPath: `packages/kbn-optimizer/limits.yml`, + }, + { + group: `async chunks size`, + id: bundle.id, + value: sumSize(asyncChunks), + }, + { + group: `async chunk count`, + id: bundle.id, + value: asyncChunks.length, + }, + { + group: `miscellaneous assets size`, + id: bundle.id, + value: sumSize(miscFiles), + }, + ]; + + const metricsSource = new RawSource(JSON.stringify(bundleMetrics, null, 2)); + + // see https://github.com/jantimon/html-webpack-plugin/blob/33d69f49e6e9787796402715d1b9cd59f80b628f/index.js#L266 + // @ts-expect-error undocumented, used to add assets to the output + compilation.emitAsset('metrics.json', metricsSource); + } + ); }); } } diff --git a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts index d51af46d27e84..9f7a126e56064 100644 --- a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts +++ b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts @@ -8,7 +8,7 @@ import Path from 'path'; import Fs from 'fs'; -import { inspect } from 'util'; +import { inspect, promisify } from 'util'; import webpack from 'webpack'; import { @@ -31,8 +31,12 @@ import { import { BundleRemoteModule } from './bundle_remote_module'; interface InputFileSystem { - readFileSync: (path: string, encoding?: null | undefined) => Buffer; - statSync: (path: string) => Fs.Stats; + readFile: ( + path: string, + encoding: null | undefined, + callback: (err: Error | null, stats: Buffer) => void + ) => void; + stat: (path: string, callback: (err: Error | null, stats: Fs.Stats) => void) => void; } /** @@ -57,121 +61,126 @@ export class PopulateBundleCachePlugin { if (!inputFs) { throw new Error('expected inputFs to be defined'); } - - compiler.hooks.emit.tap( - // { - // name: 'PopulateBundleCachePlugin', - // before: ['BundleMetricsPlugin'], - // }, - 'PopulateBundleCachePlugin', - (compilation) => { - const bundleRefExportIds: string[] = []; - let moduleCount = 0; - let workUnits = compilation.fileDependencies.size; - - const paths = new Set(); - const rawHashes = new Map(); - const addReferenced = (path: string) => { - if (paths.has(path)) { - return; - } - - paths.add(path); - let content: Buffer; - try { - content = inputFs.readFileSync(path); - } catch { - return rawHashes.set(path, null); - } - - return rawHashes.set(path, Hashes.hash(content)); - }; - - const dllRefKeys = new Set(); - - if (bundle.manifestPath) { - addReferenced(bundle.manifestPath); - } - - // add all files from the fileDependencies (which includes a bunch of directories) to the cache - for (const path of compilation.fileDependencies) { - const stat = inputFs.statSync(path); - if (!stat.isFile()) { - continue; - } - - addReferenced(path); - if (path.endsWith('.scss')) { - workUnits += EXTRA_SCSS_WORK_UNITS; - continue; - } - - const parsedPath = parseFilePath(path); - if (!parsedPath.dirs.includes('node_modules')) { - continue; - } - - const nmIndex = parsedPath.dirs.lastIndexOf('node_modules'); - const isScoped = parsedPath.dirs[nmIndex + 1].startsWith('@'); - const pkgJsonPath = Path.join( - parsedPath.root, - ...parsedPath.dirs.slice(0, nmIndex + 1 + (isScoped ? 2 : 1)), - 'package.json' - ); - addReferenced(pkgJsonPath); - continue; - } - - for (const module of compilation.modules) { - if (isNormalModule(module)) { - moduleCount += 1; - continue; + const readFile = promisify(inputFs.readFile); + const stat = promisify(inputFs.stat); + + compiler.hooks.compilation.tap('PopulateBundleCachePlugin', (compilation) => { + compilation.hooks.processAssets.tapAsync( + { + name: 'PopulateBundleCachePlugin', + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING, + }, + async (_, callback) => { + const bundleRefExportIds: string[] = []; + let moduleCount = 0; + let workUnits = compilation.fileDependencies.size; + + const paths = new Set(); + const rawHashes = new Map(); + const addReferenced = async (path: string) => { + if (paths.has(path)) { + return; + } + + paths.add(path); + let content: Buffer; + try { + content = await readFile(path, null); + } catch { + return rawHashes.set(path, null); + } + + return rawHashes.set(path, Hashes.hash(content)); + }; + + const dllRefKeys = new Set(); + + if (bundle.manifestPath) { + await addReferenced(bundle.manifestPath); } - if (module instanceof BundleRemoteModule) { - bundleRefExportIds.push(module.req.full); + // add all files from the fileDependencies (which includes a bunch of directories) to the cache + for (const path of compilation.fileDependencies) { + const cStat = await stat(path); + if (!cStat.isFile()) { + continue; + } + + await addReferenced(path); + if (path.endsWith('.scss')) { + workUnits += EXTRA_SCSS_WORK_UNITS; + continue; + } + + const parsedPath = parseFilePath(path); + if (!parsedPath.dirs.includes('node_modules')) { + continue; + } + + const nmIndex = parsedPath.dirs.lastIndexOf('node_modules'); + const isScoped = parsedPath.dirs[nmIndex + 1].startsWith('@'); + const pkgJsonPath = Path.join( + parsedPath.root, + ...parsedPath.dirs.slice(0, nmIndex + 1 + (isScoped ? 2 : 1)), + 'package.json' + ); + await addReferenced(pkgJsonPath); continue; } - if (isConcatenatedModule(module)) { - moduleCount += module.modules.length; - continue; + for (const module of compilation.modules) { + if (isNormalModule(module)) { + moduleCount += 1; + continue; + } + + if (module instanceof BundleRemoteModule) { + bundleRefExportIds.push(module.req.full); + continue; + } + + if (isConcatenatedModule(module)) { + moduleCount += module.modules.length; + continue; + } + + if (isDelegatedModule(module)) { + // delegated modules are the references to the ui-shared-deps-npm dll + dllRefKeys.add(module.userRequest); + continue; + } + + if (isExternalModule(module) || isIgnoredModule(module) || isRuntimeModule(module)) { + continue; + } + + throw new Error(`Unexpected module type: ${inspect(module)}`); } - if (isDelegatedModule(module)) { - // delegated modules are the references to the ui-shared-deps-npm dll - dllRefKeys.add(module.userRequest); - continue; - } + const referencedPaths = Array.from(paths).sort(ascending((p) => p)); + const sortedDllRefKeys = Array.from(dllRefKeys).sort(ascending((p) => p)); + + bundle.cache.set({ + remoteBundleImportReqs: bundleRefExportIds.sort(ascending((p) => p)), + optimizerCacheKey: workerConfig.optimizerCacheKey, + cacheKey: bundle.createCacheKey( + referencedPaths, + new Hashes(rawHashes), + this.dllManifest, + sortedDllRefKeys + ), + moduleCount, + workUnits, + referencedPaths, + dllRefKeys: sortedDllRefKeys, + }); - if (isExternalModule(module) || isIgnoredModule(module) || isRuntimeModule(module)) { - continue; - } + // write the cache to the compilation so that it isn't cleaned by clean-webpack-plugin + bundle.cache.writeWebpackAsset(compilation); - throw new Error(`Unexpected module type: ${inspect(module)}`); + callback(); } - - const referencedPaths = Array.from(paths).sort(ascending((p) => p)); - const sortedDllRefKeys = Array.from(dllRefKeys).sort(ascending((p) => p)); - - bundle.cache.set({ - remoteBundleImportReqs: bundleRefExportIds.sort(ascending((p) => p)), - optimizerCacheKey: workerConfig.optimizerCacheKey, - cacheKey: bundle.createCacheKey( - referencedPaths, - new Hashes(rawHashes), - this.dllManifest, - sortedDllRefKeys - ), - moduleCount, - workUnits, - referencedPaths, - dllRefKeys: sortedDllRefKeys, - }); - - // write the cache to the compilation so that it isn't cleaned by clean-webpack-plugin - bundle.cache.writeWebpackAsset(compilation); - } - ); + ); + }); } } diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index b9c62fe51765f..5fcbda8b80216 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -338,7 +338,7 @@ export function getWebpackConfig( output: { // xxhash64 or sha1: according to docs xxhash should be faster but for now sha1 looks faster - hashFunction: 'sha1', + hashFunction: 'xxhash64', // Setting this to false looks like it will boost performance by a little // pathinfo: false, }, @@ -346,7 +346,7 @@ export function getWebpackConfig( experiments: { cacheUnaffected: true, // TODO: enable this after converting all plugins to v5 - // backCompat: false, + backCompat: false, }, optimization: { @@ -356,7 +356,7 @@ export function getWebpackConfig( // usedExports: false, removeAvailableModules: false, removeEmptyChunks: false, - mergeDuplicateChunks: false, + // mergeDuplicateChunks: false, }, // resolve: { @@ -369,7 +369,7 @@ export function getWebpackConfig( unsafeCache: true, }, // NOTE: I'm not sure about this but it does seem like it is speeding up - parallelism: 5000, + // parallelism: 5000, // }; From af2136c5576e84d0556fcdf6257078c8de04bd07 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 28 Aug 2024 02:34:31 +0100 Subject: [PATCH 033/157] chore(NA): add some extra info to the migrations --- packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts | 2 +- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts index 5c5d3a90bb43b..000d1f78cd0c8 100644 --- a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts +++ b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts @@ -23,7 +23,7 @@ export function isFailureStats(stats: webpack.Stats) { export const STATS_WARNINGS_FILTER = new RegExp( [ - '(export .* was not found in)', + '(export .* was not found in)', // with reexportExportsPresence = false and importExportsPresence = false in the module parser this should not be necessary but looks like it affects performance '|(chunk .* \\[mini-css-extract-plugin\\]\\\nConflicting order between:)', ].join('') ); diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 5fcbda8b80216..73fe586cd12ef 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -368,7 +368,7 @@ export function getWebpackConfig( // This was default on webpack v4 unsafeCache: true, }, - // NOTE: I'm not sure about this but it does seem like it is speeding up + // NOTE: I'm not sure about this, but it does seem like it is speeding up // parallelism: 5000, // }; From c1dff0de961a95b03908ccd5769c66a7ca16b737 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 2 Oct 2024 22:53:21 +0100 Subject: [PATCH 034/157] fix(NA): jest raw loader; moduleIds on ui-shared-deps; resolutions on domain-browser --- package.json | 1 + .../src/worker/webpack.config.ts | 2 +- .../kbn-storybook/src/lib/default_config.ts | 4 +-- packages/kbn-test/src/jest/resolver.js | 25 +++++++++++++----- .../kbn-ui-shared-deps-npm/webpack.config.js | 1 + .../kbn-ui-shared-deps-src/webpack.config.js | 1 + yarn.lock | 26 +++++++++---------- 7 files changed, 38 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index f07dcedb436bb..56c94798aad82 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "**/@typescript-eslint/utils": "5.62.0", "**/chokidar": "^3.5.3", "**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1", + "**/domain-browser": "^4.22.0", "**/globule/minimatch": "^3.1.2", "**/hoist-non-react-statics": "^3.3.2", "**/isomorphic-fetch/node-fetch": "^2.6.7", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 73fe586cd12ef..ebb39915dd5d4 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -278,7 +278,7 @@ export function getWebpackConfig( }, // exports the source code of the asset. Previously achievable by using raw-loader. { - test: [/\.(html|md|txt|tmpl)$/], + test: /\.(html|md|txt|tmpl)$/, type: 'asset/source', }, { diff --git a/packages/kbn-storybook/src/lib/default_config.ts b/packages/kbn-storybook/src/lib/default_config.ts index 43fc979278e74..de879cdb91ff3 100644 --- a/packages/kbn-storybook/src/lib/default_config.ts +++ b/packages/kbn-storybook/src/lib/default_config.ts @@ -27,8 +27,8 @@ const IGNORE_GLOBS = [ '**/node_modules/**', '!**/node_modules/@kbn/**', '!**/node_modules/@kbn/*/**', - '!**/node_modules/@kbn/*/!(node_modules)/**' -] + '!**/node_modules/@kbn/*/!(node_modules)/**', +]; export const defaultConfig: StorybookConfig = { addons: ['@kbn/storybook/preset', '@storybook/addon-a11y', '@storybook/addon-essentials'], diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 655d2535f6bbb..478d86c813781 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -29,6 +29,18 @@ const STATIC_FILE_EXT = .split('|') .map((e) => `.${e}`); +/** + * @param {string} str + * @returns + */ +function parseRequestExtSuffix(str) { + const rawSuffix = '?raw'; + if (str.endsWith(rawSuffix)) { + return str.slice(0, -rawSuffix.length); + } + return str; +} + /** * @param {string} request * @param {import('resolve').SyncOpts} options @@ -56,25 +68,26 @@ module.exports = (request, options) => { const reqExt = Path.extname(request); if (reqExt) { - const reqBasename = Path.basename(request, reqExt); - if ((reqExt === '.css' || reqExt === '.scss') && reqBasename.endsWith('.module')) { + const pReqExt = parseRequestExtSuffix(reqExt); + const reqBasename = Path.basename(request, pReqExt); + if ((pReqExt === '.css' || pReqExt === '.scss') && reqBasename.endsWith('.module')) { return CSS_MODULE_MOCK; } - if (reqExt === '.css' || reqExt === '.less' || reqExt === '.scss') { + if (pReqExt === '.css' || pReqExt === '.less' || pReqExt === '.scss') { return STYLE_MOCK; } - if (STATIC_FILE_EXT.includes(reqExt)) { + if (STATIC_FILE_EXT.includes(pReqExt)) { return FILE_MOCK; } - if (reqExt === '.worker' && (reqBasename.endsWith('.ace') || reqBasename.endsWith('.editor'))) { + if (pReqExt === '.worker' && (reqBasename.endsWith('.ace') || reqBasename.endsWith('.editor'))) { return WORKER_MOCK; } } - if (req.endsWith('?asUrl')) { + if (request.endsWith('?asUrl')) { return FILE_MOCK; } diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 20a0a250a1cb8..13c157109d052 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -152,6 +152,7 @@ module.exports = (_, argv) => { }, optimization: { + moduleIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 5fa72ac4d1817..b83b846ed3ab0 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -124,6 +124,7 @@ module.exports = { }, optimization: { + moduleIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, diff --git a/yarn.lock b/yarn.lock index 3cfdc0005a5d3..3daedb46e6895 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13989,9 +13989,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001587: - version "1.0.30001597" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz#8be94a8c1d679de23b22fbd944232aa1321639e6" - integrity sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w== + version "1.0.30001666" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz" + integrity sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g== canvg@^3.0.9: version "3.0.9" @@ -16396,15 +16396,10 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -domain-browser@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-5.7.0.tgz#81b942459672e3c7ed8f721fe31135a5628f31cf" - integrity sha512-edTFu0M/7wO1pXY6GDxVNVW086uqwWYIHP98txhcPyV995X21JIH2DtYp33sQJOupYoXKe9RwTw2Ya2vWaquTQ== +domain-browser@^1.1.1, domain-browser@^4.22.0, domain-browser@^5.7.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.23.0.tgz#427ebb91efcb070f05cffdfb8a4e9a6c25f8c94b" + integrity sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA== domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: version "2.3.0" @@ -30994,11 +30989,16 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.18.2, type-fest@^4.9.0: +type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: version "4.25.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.25.0.tgz#b190374f969631866889bbdb01ece17ca424ee60" integrity sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw== +type-fest@^4.18.2: + version "4.26.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.26.1.tgz#a4a17fa314f976dd3e6d6675ef6c775c16d7955e" + integrity sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" From 5ec912985de104e84bfe294653800d30f2f8fe73 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 2 Oct 2024 22:58:33 +0100 Subject: [PATCH 035/157] fix(NA): stats undefined --- packages/kbn-plugin-helpers/src/tasks/optimize_worker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-plugin-helpers/src/tasks/optimize_worker.ts b/packages/kbn-plugin-helpers/src/tasks/optimize_worker.ts index 126d1d59397d8..75856d1bc84fb 100644 --- a/packages/kbn-plugin-helpers/src/tasks/optimize_worker.ts +++ b/packages/kbn-plugin-helpers/src/tasks/optimize_worker.ts @@ -41,7 +41,7 @@ process.on('message', (msg: any) => { return; } - if (stats.hasErrors()) { + if (stats?.hasErrors()) { send.call(process, { success: false, error: `Failed to compile with webpack:\n${stats.toString()}`, @@ -51,7 +51,7 @@ process.on('message', (msg: any) => { send.call(process, { success: true, - warnings: stats.hasWarnings() ? stats.toString() : '', + warnings: stats?.hasWarnings() ? stats.toString() : '', }); } ); From 5cafd4d61c0c3c9acbc1e876ce625c5bd5fbf09e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 2 Oct 2024 23:07:03 +0100 Subject: [PATCH 036/157] fix(NA): ignore_not_found_export_plugin for webpack v5 on kbn/storybook --- .../src/ignore_not_found_export_plugin.ts | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts b/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts index 18769416f43c1..3d54ce7f72cf7 100644 --- a/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts +++ b/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts @@ -16,21 +16,31 @@ import ModuleDependencyWarning from 'webpack/lib/ModuleDependencyWarning'; export class IgnoreNotFoundExportPlugin { apply(compiler: Compiler) { + // const messageRegExp = /export '.*'( \(reexported as '.*'\))? was not found in/; + // + // function doneHook(stats: Stats) { + // stats.compilation.warnings = stats.compilation.warnings.filter(function (warn) { + // if (warn instanceof ModuleDependencyWarning && messageRegExp.test(warn.message)) { + // return false; + // } + // return true; + // }); + // } + // + // if (compiler.hooks) { + // compiler.hooks.done.tap('IgnoreNotFoundExportPlugin', doneHook); + // } else { + // compiler.plugin('done', doneHook); + // } + // + // TODO: remove the upper part as this converts to webpack v5 const messageRegExp = /export '.*'( \(reexported as '.*'\))? was not found in/; + const doneHook = (stats: Stats) => + stats.compilation.warnings = stats.compilation.warnings.filter((warn: any) => + // Unfortunately webpack is not exporting ModuleDependencyWarning type, so I'm using constructor.name instead + warn.constructor.name === 'ModuleDependencyWarning' && !messageRegExp.test(warn.message) + ); - function doneHook(stats: Stats) { - stats.compilation.warnings = stats.compilation.warnings.filter(function (warn) { - if (warn instanceof ModuleDependencyWarning && messageRegExp.test(warn.message)) { - return false; - } - return true; - }); - } - - if (compiler.hooks) { - compiler.hooks.done.tap('IgnoreNotFoundExportPlugin', doneHook); - } else { - compiler.plugin('done', doneHook); - } + compiler.hooks.done.tap('IgnoreNotFoundExportPlugin', doneHook); } } From e53f5788d1c1319132c5136b207fe59a494b356d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 2 Oct 2024 23:17:51 +0100 Subject: [PATCH 037/157] fix(NA): stages on bundle metrics plugin and emit stats plugin --- packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts | 2 +- packages/kbn-optimizer/src/worker/emit_stats_plugin.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts index 96efa78b44300..2cd960806fdf9 100644 --- a/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_metrics_plugin.ts @@ -35,7 +35,7 @@ export class BundleMetricsPlugin { compilation.hooks.processAssets.tap( { name: 'BundleMetricsPlugin', - stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ANALYSE, }, () => { const assets = Object.entries(compilation.assets) diff --git a/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts b/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts index 5cb60344037fc..e24da2c5eec5c 100644 --- a/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts +++ b/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts @@ -21,7 +21,7 @@ export class EmitStatsPlugin { { name: 'EmitStatsPlugin', // run at the very end, ensure that it's after clean-webpack-plugin - stage: 10, + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, }, (stats) => { Fs.writeFileSync( From 8cf5787564598c990e70e68c66379b4229d4cdc7 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:43:50 +0000 Subject: [PATCH 038/157] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- yarn.lock | 85 ++++++++----------------------------------------------- 1 file changed, 12 insertions(+), 73 deletions(-) diff --git a/yarn.lock b/yarn.lock index fab8022082215..1a22387253772 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10406,22 +10406,6 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*", "@types/eslint@^8.44.2": - version "8.44.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" - integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - "@types/eslint@7 || 8": version "8.56.7" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.7.tgz#c33b5b5a9cfb66881beb7b5be6c34aa3e81d3366" @@ -10438,6 +10422,14 @@ "@types/estree" "*" "@types/json-schema" "*" +"@types/eslint@^8.44.2": + version "8.44.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" + integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + "@types/estree@*": version "0.0.50" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" @@ -16889,15 +16881,7 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.0: - version "5.17.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" - integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enhanced-resolve@^5.17.1: +enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== @@ -30596,17 +30580,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.15.1, terser@^5.31.6: - version "5.31.6" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" - integrity sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -terser@^5.26.0, terser@^5.3.4, terser@^5.9.0: +terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.31.6, terser@^5.9.0: version "5.33.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== @@ -31176,12 +31150,7 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: - version "4.25.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.25.0.tgz#b190374f969631866889bbdb01ece17ca424ee60" - integrity sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw== - -type-fest@^4.18.2: +type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.18.2, type-fest@^4.9.0: version "4.26.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.26.1.tgz#a4a17fa314f976dd3e6d6675ef6c775c16d7955e" integrity sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg== @@ -32668,37 +32637,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5: - version "5.93.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" - integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-attributes "^1.9.5" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.0" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - -webpack@^5.94.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.94.0: version "5.94.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== From eb99fd1bc75fee68c1a7396c7e562c5f40f51132 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 2 Oct 2024 23:59:51 +0100 Subject: [PATCH 039/157] fix(NA): domain-browser resolution --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6769ef06aaebf..f33edd818e508 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "**/@typescript-eslint/utils": "5.62.0", "**/chokidar": "^3.5.3", "**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1", - "**/domain-browser": "^4.22.0", + "**/domain-browser": "4.22.0", "**/globule/minimatch": "^3.1.2", "**/hoist-non-react-statics": "^3.3.2", "**/isomorphic-fetch/node-fetch": "^2.6.7", diff --git a/yarn.lock b/yarn.lock index fab8022082215..0a72df72169e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16517,10 +16517,10 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= -domain-browser@^1.1.1, domain-browser@^4.22.0, domain-browser@^5.7.0: - version "4.23.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.23.0.tgz#427ebb91efcb070f05cffdfb8a4e9a6c25f8c94b" - integrity sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA== +domain-browser@4.22.0, domain-browser@^1.1.1, domain-browser@^5.7.0: + version "4.22.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.22.0.tgz#6ddd34220ec281f9a65d3386d267ddd35c491f9f" + integrity sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw== domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: version "2.3.0" From e80c9c38ca8bdf0c8d631337caa6e58cee1e0ec4 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 01:20:11 +0100 Subject: [PATCH 040/157] fix(NA): parse_kbn_import_req to exclude raw-loader imports --- packages/kbn-optimizer/src/worker/webpack.config.ts | 6 ++++-- packages/kbn-repo-packages/modern/parse_kbn_import_req.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 8ed2503dd9c80..b070ee476cb40 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -159,6 +159,7 @@ export function getWebpackConfig( }, { test: /\.css$/, + resourceQuery: { not: /raw/ }, include: /node_modules/, use: [ { @@ -255,6 +256,7 @@ export function getWebpackConfig( }, { test: /\.(js|tsx?)$/, + resourceQuery: { not: /raw/ }, exclude: /node_modules/, use: { loader: 'babel-loader', @@ -279,11 +281,11 @@ export function getWebpackConfig( }, // exports the source code of the asset. Previously achievable by using raw-loader. { - test: /\.(html|md|txt|tmpl)$/, + resourceQuery: /raw/, type: 'asset/source', }, { - resourceQuery: '?raw', + test: /\.(html|md|txt|tmpl)$/, type: 'asset/source', }, // automatically chooses between exporting a data URI and emitting a separate file. Previously achievable by using url-loader with asset size limit. diff --git a/packages/kbn-repo-packages/modern/parse_kbn_import_req.js b/packages/kbn-repo-packages/modern/parse_kbn_import_req.js index b4f0da88898ab..35033b0029d6a 100644 --- a/packages/kbn-repo-packages/modern/parse_kbn_import_req.js +++ b/packages/kbn-repo-packages/modern/parse_kbn_import_req.js @@ -15,7 +15,8 @@ * @returns {import('./types').KbnImportReq | undefined} */ function parseKbnImportReq(importReq) { - if (!importReq.startsWith('@kbn/')) { + // TODO: evaluate if we want to keep excluding raw imports (as before) or just patch the bundle_remotes_plugin logic + if (!importReq.startsWith('@kbn/') || importReq.endsWith('?raw')) { return undefined; } From 9a4ebd3d26e57aa4d811401db9ba70ce58db7108 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:25:09 +0000 Subject: [PATCH 041/157] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../src/ignore_not_found_export_plugin.ts | 11 +++++------ packages/kbn-test/src/jest/resolver.js | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts b/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts index bf7687ed44a3f..4ba5d977136d5 100644 --- a/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts +++ b/packages/kbn-storybook/src/ignore_not_found_export_plugin.ts @@ -12,8 +12,6 @@ // This plugin suppresses the irritating TS-related warnings in Storybook HMR. import { Compiler, Stats } from 'webpack'; -// @ts-expect-error -import ModuleDependencyWarning from 'webpack/lib/ModuleDependencyWarning'; export class IgnoreNotFoundExportPlugin { apply(compiler: Compiler) { @@ -37,10 +35,11 @@ export class IgnoreNotFoundExportPlugin { // TODO: remove the upper part as this converts to webpack v5 const messageRegExp = /export '.*'( \(reexported as '.*'\))? was not found in/; const doneHook = (stats: Stats) => - stats.compilation.warnings = stats.compilation.warnings.filter((warn: any) => - // Unfortunately webpack is not exporting ModuleDependencyWarning type, so I'm using constructor.name instead - warn.constructor.name === 'ModuleDependencyWarning' && !messageRegExp.test(warn.message) - ); + (stats.compilation.warnings = stats.compilation.warnings.filter( + (warn: any) => + // Unfortunately webpack is not exporting ModuleDependencyWarning type, so I'm using constructor.name instead + warn.constructor.name === 'ModuleDependencyWarning' && !messageRegExp.test(warn.message) + )); compiler.hooks.done.tap('IgnoreNotFoundExportPlugin', doneHook); } diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 6c71f3e5e11e3..53aab756f3dda 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -83,7 +83,10 @@ module.exports = (request, options) => { return FILE_MOCK; } - if (pReqExt === '.worker' && (reqBasename.endsWith('.ace') || reqBasename.endsWith('.editor'))) { + if ( + pReqExt === '.worker' && + (reqBasename.endsWith('.ace') || reqBasename.endsWith('.editor')) + ) { return WORKER_MOCK; } } From 2e3a228715f6206385c1b36b239222c2f674a028 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 06:03:14 +0100 Subject: [PATCH 042/157] chore(NA): disable treeShaking --- package.json | 2 +- .../src/worker/webpack.config.ts | 4 +++ yarn.lock | 31 ++++++++++++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f33edd818e508..119af4d9fe96a 100644 --- a/package.json +++ b/package.json @@ -1827,7 +1827,7 @@ "vinyl-fs": "^4.0.0", "watchpack": "^1.6.0", "web-streams-polyfill": "^4.0.0", - "webpack": "^5.94.0", + "webpack": "^5.95.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.0.4", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index b070ee476cb40..6e217f4622634 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -399,6 +399,10 @@ export function getWebpackConfig( }, }), ], + // TODO: try to understand why usedExports is treeShaking code it shouldn't be + usedExports: false, + sideEffects: false, + // }, }; diff --git a/yarn.lock b/yarn.lock index 39b03a2860ca8..d84698be5ef03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32637,7 +32637,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.94.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5: version "5.94.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== @@ -32666,6 +32666,35 @@ webpack@4: watchpack "^2.4.1" webpack-sources "^3.2.3" +webpack@^5.95.0: + version "5.95.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" + integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== + dependencies: + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-attributes "^1.9.5" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.17.1" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" From 4765204d6cfd967e91f621dd796d4cbc8042a944 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 06:05:55 +0100 Subject: [PATCH 043/157] chore(NA): upgrade terser --- package.json | 2 +- yarn.lock | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 119af4d9fe96a..b9ea3a3029d26 100644 --- a/package.json +++ b/package.json @@ -1814,7 +1814,7 @@ "swagger-ui-express": "^5.0.1", "table": "^6.8.1", "tape": "^5.0.1", - "terser": "^5.31.6", + "terser": "^5.34.1", "terser-webpack-plugin": "^5.3.10", "tough-cookie": "^5.0.0", "tree-kill": "^1.2.2", diff --git a/yarn.lock b/yarn.lock index d84698be5ef03..94e069063becc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30580,7 +30580,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.31.6, terser@^5.9.0: +terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.9.0: version "5.33.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== @@ -30590,6 +30590,16 @@ terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.31.6, terser@^5.9.0: commander "^2.20.0" source-map-support "~0.5.20" +terser@^5.34.1: + version "5.34.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6" + integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From 098471400b3d01427dc7aacd110158ff286a9296 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 3 Oct 2024 05:19:47 +0000 Subject: [PATCH 044/157] [CI] Auto-commit changed files from 'node scripts/notice' --- yarn.lock | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/yarn.lock b/yarn.lock index 94e069063becc..e9537dd6c90a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30580,17 +30580,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.9.0: - version "5.33.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" - integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -terser@^5.34.1: +terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.34.1, terser@^5.9.0: version "5.34.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6" integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA== @@ -32647,36 +32637,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5: - version "5.94.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" - integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== - dependencies: - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-attributes "^1.9.5" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.1" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - -webpack@^5.95.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.95.0: version "5.95.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== From d1bc8826596ea444bea4a97e6d1794dc520b6825 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 19:41:46 +0100 Subject: [PATCH 045/157] test(NA): update snapshot for jest int test packages/kbn-plugin-helpers/src/integration_tests/build.test.ts --- .../kbn-plugin-helpers/src/integration_tests/build.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index b0149d0e53274..6ee025b0f93b3 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -106,8 +106,8 @@ it('builds a generated plugin into a viable archive', async () => { "kibana/fooTestPlugin/server/plugin.js", "kibana/fooTestPlugin/server/routes/index.js", "kibana/fooTestPlugin/server/types.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.1.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.1.js.br", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.660.js", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.660.js.br", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js.br", "kibana/fooTestPlugin/translations/ja-JP.json", From b5c7e22e38d8c7f81b29fa8b63c3706e8a43d2dd Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 20:22:16 +0100 Subject: [PATCH 046/157] fix(NA): polyfill cypress webpack config --- packages/kbn-cypress-config/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/kbn-cypress-config/index.ts b/packages/kbn-cypress-config/index.ts index a6ef563682ee2..d3e33136118dd 100644 --- a/packages/kbn-cypress-config/index.ts +++ b/packages/kbn-cypress-config/index.ts @@ -10,6 +10,7 @@ import { v4 as uuid } from 'uuid'; import { defineConfig } from 'cypress'; import wp from '@cypress/webpack-preprocessor'; +import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; export function defineCypressConfig(options?: Cypress.ConfigOptions) { return defineConfig({ @@ -43,6 +44,12 @@ export function defineCypressConfig(options?: Cypress.ConfigOptions) { }, ], }, + plugins: [ + // TODO: remove non needed polyfills + new NodePolyfillPlugin({ + additionalAliases: ['process'], + }), + ], }, })(file); }); From 4fa103ecb19bd756372c6da019492cfa0e464109 Mon Sep 17 00:00:00 2001 From: Brad White Date: Thu, 3 Oct 2024 13:36:17 -0600 Subject: [PATCH 047/157] fix loading raw ace worker --- packages/kbn-test/src/jest/resolver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 53aab756f3dda..ab642375ec8de 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -70,7 +70,7 @@ module.exports = (request, options) => { const reqExt = Path.extname(request); if (reqExt) { const pReqExt = parseRequestExtSuffix(reqExt); - const reqBasename = Path.basename(request, pReqExt); + const reqBasename = Path.basename(request.split('?')[0], pReqExt); if ((pReqExt === '.css' || pReqExt === '.scss') && reqBasename.endsWith('.module')) { return CSS_MODULE_MOCK; } From 931ad5a44b26d0e178aad2e9e276e4d18ae2608e Mon Sep 17 00:00:00 2001 From: Brad White Date: Thu, 3 Oct 2024 13:40:39 -0600 Subject: [PATCH 048/157] update snapshot --- .../kbn-plugin-helpers/src/integration_tests/build.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index b0149d0e53274..6ee025b0f93b3 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -106,8 +106,8 @@ it('builds a generated plugin into a viable archive', async () => { "kibana/fooTestPlugin/server/plugin.js", "kibana/fooTestPlugin/server/routes/index.js", "kibana/fooTestPlugin/server/types.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.1.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.1.js.br", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.660.js", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.660.js.br", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js.br", "kibana/fooTestPlugin/translations/ja-JP.json", From 4ee20f9787ac774854b74cc6383fdc97095255dd Mon Sep 17 00:00:00 2001 From: Brad White Date: Thu, 3 Oct 2024 15:04:38 -0600 Subject: [PATCH 049/157] fix type errors --- .../canvas/shareable_runtime/webpack/ci_stats_plugin.ts | 2 +- x-pack/plugins/canvas/storybook/canvas_webpack.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts b/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts index a0f6c8fe0e9bb..7bc0105ef13b9 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts +++ b/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts @@ -67,7 +67,7 @@ export class CiStatsPlugin { throw new Error(`Unable to find bundle entry named [${entryName}]`); } - const moduleCount = compilation.modules.reduce((acc, module) => { + const moduleCount = Array.from(compilation.modules).reduce((acc, module) => { if (isNormalModule(module)) { return acc + 1; } diff --git a/x-pack/plugins/canvas/storybook/canvas_webpack.ts b/x-pack/plugins/canvas/storybook/canvas_webpack.ts index db507748e2519..44f501e74b79b 100644 --- a/x-pack/plugins/canvas/storybook/canvas_webpack.ts +++ b/x-pack/plugins/canvas/storybook/canvas_webpack.ts @@ -8,15 +8,16 @@ import { resolve } from 'path'; import { defaultConfig, mergeWebpackFinal } from '@kbn/storybook'; import type { StorybookConfig } from '@kbn/storybook'; +import { Configuration } from 'webpack'; import { KIBANA_ROOT } from './constants'; -export const canvasWebpack = { +export const canvasWebpack: Configuration = { module: { rules: [ // Enable CSS Modules in Storybook (Shareable Runtime) { test: /\.module\.s(a|c)ss$/, - loader: [ + use: [ 'style-loader', { loader: 'css-loader', From 61daf93a91435127fec70142d0778428b7d44733 Mon Sep 17 00:00:00 2001 From: Brad White Date: Thu, 3 Oct 2024 15:12:40 -0600 Subject: [PATCH 050/157] add path-browserify fallback --- packages/kbn-optimizer/src/worker/webpack.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 6e217f4622634..e368458a9d28e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -317,6 +317,7 @@ export function getWebpackConfig( fallback: { child_process: false, fs: false, + path: require.resolve('path-browserify'), }, }, From 94762132f737d485969188029f9c224990f65f90 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 22:13:01 +0100 Subject: [PATCH 051/157] fix(NA): storybook webpack config migration --- package.json | 4 +- .../kbn-storybook/src/lib/default_config.ts | 3 + packages/kbn-storybook/src/webpack.config.ts | 8 +- src/dev/storybook/run_storybook_cli.ts | 1 + .../canvas/storybook/canvas_webpack.ts | 4 +- yarn.lock | 281 +++++++++++++++++- 6 files changed, 281 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index b9ea3a3029d26..75ede2b462888 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "serverless-security": "node scripts/kibana --dev --serverless=security", "spec_to_console": "node scripts/spec_to_console", "start": "node scripts/kibana --dev", - "storybook": "node --openssl-legacy-provider scripts/storybook", + "storybook": "node --openssl-legacy-provider --no-deprecation scripts/storybook", "test:ftr": "node scripts/functional_tests", "test:ftr:runner": "node scripts/functional_test_runner", "test:ftr:server": "node scripts/functional_tests_server", @@ -1498,11 +1498,13 @@ "@storybook/addon-storyshots": "^6.5.16", "@storybook/addons": "^6.5.16", "@storybook/api": "^6.5.16", + "@storybook/builder-webpack5": "^6.5.16", "@storybook/client-api": "^6.5.16", "@storybook/components": "^6.5.16", "@storybook/core": "^6.5.16", "@storybook/core-common": "^6.5.16", "@storybook/core-events": "^6.5.16", + "@storybook/manager-webpack5": "^6.5.16", "@storybook/node-logger": "^6.5.16", "@storybook/preview-web": "^6.5.16", "@storybook/react": "^6.5.16", diff --git a/packages/kbn-storybook/src/lib/default_config.ts b/packages/kbn-storybook/src/lib/default_config.ts index edf86d195ed8a..1c6ff42264a00 100644 --- a/packages/kbn-storybook/src/lib/default_config.ts +++ b/packages/kbn-storybook/src/lib/default_config.ts @@ -33,6 +33,9 @@ const IGNORE_GLOBS = [ export const defaultConfig: StorybookConfig = { addons: ['@kbn/storybook/preset', '@storybook/addon-a11y', '@storybook/addon-essentials'], + core: { + builder: 'webpack5', + }, stories: ['../**/*.stories.tsx', '../**/*.stories.mdx'], typescript: { reactDocgen: false, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 645a69a8f368b..1f34de9ced064 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -10,6 +10,7 @@ /* eslint-disable import/no-default-export */ import { externals } from '@kbn/ui-shared-deps-src'; import { resolve } from 'path'; +import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; import webpack, { Configuration } from 'webpack'; import { merge as webpackMerge } from 'webpack-merge'; import { REPO_ROOT } from './lib/constants'; @@ -137,7 +138,12 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { }, ], }, - plugins: [new IgnoreNotFoundExportPlugin()], + plugins: [ + new NodePolyfillPlugin({ + additionalAliases: ['process'], + }), + new IgnoreNotFoundExportPlugin() + ], resolve: { extensions: ['.js', '.ts', '.tsx', '.json', '.mdx'], mainFields: ['browser', 'main'], diff --git a/src/dev/storybook/run_storybook_cli.ts b/src/dev/storybook/run_storybook_cli.ts index 26369b6646196..dd9855bdbfdd9 100644 --- a/src/dev/storybook/run_storybook_cli.ts +++ b/src/dev/storybook/run_storybook_cli.ts @@ -41,6 +41,7 @@ run( log.verbose('Loading Storybook:', configDir); + // TODO: once storybook is upgraded into a newer version, --no-deprecation flag could be removed when invoking it through the package.json script runStorybookCli({ configDir, name: alias }); }, { diff --git a/x-pack/plugins/canvas/storybook/canvas_webpack.ts b/x-pack/plugins/canvas/storybook/canvas_webpack.ts index db507748e2519..eff5644d318c8 100644 --- a/x-pack/plugins/canvas/storybook/canvas_webpack.ts +++ b/x-pack/plugins/canvas/storybook/canvas_webpack.ts @@ -16,7 +16,7 @@ export const canvasWebpack = { // Enable CSS Modules in Storybook (Shareable Runtime) { test: /\.module\.s(a|c)ss$/, - loader: [ + use: [ 'style-loader', { loader: 'css-loader', @@ -51,7 +51,7 @@ export const canvasWebpack = { // Exclude large-dependency, troublesome or irrelevant modules. [resolve(KIBANA_ROOT, 'x-pack/plugins/canvas/public/components/embeddable_flyout')]: false, [resolve(KIBANA_ROOT, 'x-pack/plugins/reporting/public')]: false, - }, + } as { [key: string]: string | false }, }, }; diff --git a/yarn.lock b/yarn.lock index 94e069063becc..28592af615fc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9256,6 +9256,50 @@ webpack-hot-middleware "^2.25.1" webpack-virtual-modules "^0.2.2" +"@storybook/builder-webpack5@^6.5.16": + version "6.5.16" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack5/-/builder-webpack5-6.5.16.tgz#2f260e29fbc87f6f3bb3212459048ce37f3fb54e" + integrity sha512-kh8Sofm1sbijaHDWtm0sXabqACHVFjikU/fIkkW786kpjoPIPIec1a+hrLgDsZxMU3I7XapSOaCFzWt6FjVXjg== + dependencies: + "@babel/core" "^7.12.10" + "@storybook/addons" "6.5.16" + "@storybook/api" "6.5.16" + "@storybook/channel-postmessage" "6.5.16" + "@storybook/channels" "6.5.16" + "@storybook/client-api" "6.5.16" + "@storybook/client-logger" "6.5.16" + "@storybook/components" "6.5.16" + "@storybook/core-common" "6.5.16" + "@storybook/core-events" "6.5.16" + "@storybook/node-logger" "6.5.16" + "@storybook/preview-web" "6.5.16" + "@storybook/router" "6.5.16" + "@storybook/semver" "^7.3.2" + "@storybook/store" "6.5.16" + "@storybook/theming" "6.5.16" + "@types/node" "^14.0.10 || ^16.0.0" + babel-loader "^8.0.0" + babel-plugin-named-exports-order "^0.0.2" + browser-assert "^1.2.1" + case-sensitive-paths-webpack-plugin "^2.3.0" + core-js "^3.8.2" + css-loader "^5.0.1" + fork-ts-checker-webpack-plugin "^6.0.4" + glob "^7.1.6" + glob-promise "^3.4.0" + html-webpack-plugin "^5.0.0" + path-browserify "^1.0.1" + process "^0.11.10" + stable "^0.1.8" + style-loader "^2.0.0" + terser-webpack-plugin "^5.0.3" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack "^5.9.0" + webpack-dev-middleware "^4.1.0" + webpack-hot-middleware "^2.25.1" + webpack-virtual-modules "^0.4.1" + "@storybook/channel-postmessage@6.5.16": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.5.16.tgz#06167c0a66c06b2b5f8ff01d1dd436fff8119a15" @@ -9573,6 +9617,44 @@ webpack-dev-middleware "^3.7.3" webpack-virtual-modules "^0.2.2" +"@storybook/manager-webpack5@^6.5.16": + version "6.5.16" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack5/-/manager-webpack5-6.5.16.tgz#48b223557d9633614ff8c6e3227c01a57ab4eb55" + integrity sha512-OtxXv8JCe0r/0rE5HxaFicsNsXA+fqZxzokxquFFgrYf/1Jg4d7QX6/pG5wINF+5qInJfVkRG6xhPzv1s5bk9Q== + dependencies: + "@babel/core" "^7.12.10" + "@babel/plugin-transform-template-literals" "^7.12.1" + "@babel/preset-react" "^7.12.10" + "@storybook/addons" "6.5.16" + "@storybook/core-client" "6.5.16" + "@storybook/core-common" "6.5.16" + "@storybook/node-logger" "6.5.16" + "@storybook/theming" "6.5.16" + "@storybook/ui" "6.5.16" + "@types/node" "^14.0.10 || ^16.0.0" + babel-loader "^8.0.0" + case-sensitive-paths-webpack-plugin "^2.3.0" + chalk "^4.1.0" + core-js "^3.8.2" + css-loader "^5.0.1" + express "^4.17.1" + find-up "^5.0.0" + fs-extra "^9.0.1" + html-webpack-plugin "^5.0.0" + node-fetch "^2.6.7" + process "^0.11.10" + read-pkg-up "^7.0.1" + regenerator-runtime "^0.13.7" + resolve-from "^5.0.0" + style-loader "^2.0.0" + telejson "^6.0.8" + terser-webpack-plugin "^5.0.3" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack "^5.9.0" + webpack-dev-middleware "^4.1.0" + webpack-virtual-modules "^0.4.1" + "@storybook/mdx1-csf@^0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@storybook/mdx1-csf/-/mdx1-csf-0.0.1.tgz#d4184e3f6486fade9f7a6bfaf934d9bc07718d5b" @@ -10622,6 +10704,11 @@ resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.0.tgz#551a4589b6ee2cc9c1dff08056128aec29b94880" integrity sha512-iYCgjm1dGPRuo12+BStjd1HiVQqhlRhWDOQigNxn023HcjnhsiFz9pc6CzJj4HwDCSQca9bxTL4PxJDbkdm3PA== +"@types/html-minifier-terser@^6.0.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" + integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== + "@types/http-cache-semantics@*": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" @@ -13144,6 +13231,11 @@ babel-plugin-macros@^3.0.1, babel-plugin-macros@^3.1.0: cosmiconfig "^7.0.0" resolve "^1.19.0" +babel-plugin-named-exports-order@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-named-exports-order/-/babel-plugin-named-exports-order-0.0.2.tgz#ae14909521cf9606094a2048239d69847540cb09" + integrity sha512-OgOYHOLoRK+/mvXU9imKHlG6GkPLYrUCvFXG/CM93R/aNNO8pOOF4aS+S8CCHMDQoNSeiOYEZb/G6RwL95Jktw== + babel-plugin-polyfill-corejs2@^0.4.10: version "0.4.10" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz#276f41710b03a64f6467433cab72cbc2653c38b1" @@ -13657,6 +13749,11 @@ brotli@^1.2.0: dependencies: base64-js "^1.1.2" +browser-assert@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/browser-assert/-/browser-assert-1.2.1.tgz#9aaa5a2a8c74685c2ae05bfe46efd606f068c200" + integrity sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ== + browser-resolve@^1.8.1: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" @@ -14358,7 +14455,7 @@ clean-css@^4.2.3: dependencies: source-map "~0.6.0" -clean-css@~5.3.2: +clean-css@^5.2.2, clean-css@~5.3.2: version "5.3.3" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd" integrity sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg== @@ -14699,7 +14796,7 @@ commander@7, commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@8: +commander@8, commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== @@ -15229,6 +15326,22 @@ css-loader@^3.6.0: schema-utils "^2.7.0" semver "^6.3.0" +css-loader@^5.0.1: + version "5.2.7" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.7.tgz#9b9f111edf6fb2be5dc62525644cbc9c232064ae" + integrity sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg== + dependencies: + icss-utils "^5.1.0" + loader-utils "^2.0.0" + postcss "^8.2.15" + postcss-modules-extract-imports "^3.0.0" + postcss-modules-local-by-default "^4.0.0" + postcss-modules-scope "^3.0.0" + postcss-modules-values "^4.0.0" + postcss-value-parser "^4.1.0" + schema-utils "^3.0.0" + semver "^7.3.5" + css-loader@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.2.tgz#64671541c6efe06b0e22e750503106bdd86880f8" @@ -18710,6 +18823,11 @@ fs-monkey@^1.0.3: resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== +fs-monkey@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" + integrity sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg== + fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -19791,6 +19909,19 @@ html-minifier-terser@^5.0.1: relateurl "^0.2.7" terser "^4.6.3" +html-minifier-terser@^6.0.2: + version "6.1.0" + resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" + integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== + dependencies: + camel-case "^4.1.2" + clean-css "^5.2.2" + commander "^8.3.0" + he "^1.2.0" + param-case "^3.0.4" + relateurl "^0.2.7" + terser "^5.10.0" + html-minifier-terser@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz#18752e23a2f0ed4b0f550f217bb41693e975b942" @@ -19840,6 +19971,17 @@ html-webpack-plugin@^4.0.0: tapable "^1.1.3" util.promisify "1.0.0" +html-webpack-plugin@^5.0.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" + integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== + dependencies: + "@types/html-minifier-terser" "^6.0.0" + html-minifier-terser "^6.0.2" + lodash "^4.17.21" + pretty-error "^4.0.0" + tapable "^2.0.0" + html2canvas@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/html2canvas/-/html2canvas-1.4.1.tgz#7cef1888311b5011d507794a066041b14669a543" @@ -22899,6 +23041,13 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" +map-age-cleaner@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -23200,6 +23349,14 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +mem@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/mem/-/mem-8.1.1.tgz#cf118b357c65ab7b7e0817bdf00c8062297c0122" + integrity sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA== + dependencies: + map-age-cleaner "^0.1.3" + mimic-fn "^3.1.0" + memfs@^3.1.2: version "3.4.7" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.7.tgz#e5252ad2242a724f938cb937e3c4f7ceb1f70e5a" @@ -23207,6 +23364,13 @@ memfs@^3.1.2: dependencies: fs-monkey "^1.0.3" +memfs@^3.2.2: + version "3.6.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" + integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== + dependencies: + fs-monkey "^1.0.4" + memfs@^4.6.0: version "4.11.1" resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.11.1.tgz#9c9c8e65bf8ac72c0db8d0fbbbe29248cf51d56a" @@ -23419,6 +23583,11 @@ mime-db@1.51.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + "mime-db@>= 1.40.0 < 2", mime-db@^1.52.0: version "1.53.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" @@ -23431,6 +23600,13 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, dependencies: mime-db "1.51.0" +mime-types@^2.1.30: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -23446,6 +23622,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-3.1.0.tgz#65755145bbf3e36954b949c16450427451d5ca74" + integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== + mimic-function@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" @@ -25040,6 +25221,11 @@ p-cancelable@^2.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== + p-event@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-event/-/p-event-4.1.0.tgz#e92bb866d7e8e5b732293b1c8269d38e9982bf8e" @@ -25526,6 +25712,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.0, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -25938,7 +26129,7 @@ postcss-modules-extract-imports@^2.0.0: dependencies: postcss "^7.0.5" -postcss-modules-extract-imports@^3.1.0: +postcss-modules-extract-imports@^3.0.0, postcss-modules-extract-imports@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz#b4497cb85a9c0c4b5aabeb759bb25e8d89f15002" integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== @@ -25953,7 +26144,7 @@ postcss-modules-local-by-default@^3.0.2: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.0" -postcss-modules-local-by-default@^4.0.5: +postcss-modules-local-by-default@^4.0.0, postcss-modules-local-by-default@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz#f1b9bd757a8edf4d8556e8d0f4f894260e3df78f" integrity sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== @@ -25970,7 +26161,7 @@ postcss-modules-scope@^2.2.0: postcss "^7.0.6" postcss-selector-parser "^6.0.0" -postcss-modules-scope@^3.2.0: +postcss-modules-scope@^3.0.0, postcss-modules-scope@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz#a43d28289a169ce2c15c00c4e64c0858e43457d5" integrity sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== @@ -26152,6 +26343,15 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" +postcss@^8.2.15: + version "8.4.47" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" + integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== + dependencies: + nanoid "^3.3.7" + picocolors "^1.1.0" + source-map-js "^1.2.1" + postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: version "8.4.38" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" @@ -26249,6 +26449,14 @@ pretty-error@^2.1.1: lodash "^4.17.20" renderkid "^2.0.4" +pretty-error@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" + integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== + dependencies: + lodash "^4.17.20" + renderkid "^3.0.0" + pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" @@ -27949,6 +28157,17 @@ renderkid@^2.0.4: lodash "^4.17.21" strip-ansi "^3.0.1" +renderkid@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" + integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== + dependencies: + css-select "^4.1.3" + dom-converter "^0.2.0" + htmlparser2 "^6.1.0" + lodash "^4.17.21" + strip-ansi "^6.0.1" + repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" @@ -29294,6 +29513,11 @@ source-map-js@^1.0.2, source-map-js@^1.2.0: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" @@ -30019,6 +30243,14 @@ style-loader@^1.3.0: loader-utils "^2.0.0" schema-utils "^2.7.0" +style-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c" + integrity sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + style-loader@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-4.0.0.tgz#0ea96e468f43c69600011e0589cb05c44f3b17a5" @@ -30388,7 +30620,7 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: +tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== @@ -30560,7 +30792,7 @@ terser-webpack-plugin@^4.2.3: terser "^5.3.4" webpack-sources "^1.4.3" -terser-webpack-plugin@^5.3.10: +terser-webpack-plugin@^5.0.3, terser-webpack-plugin@^5.3.10: version "5.3.10" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== @@ -30580,20 +30812,20 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.9.0: - version "5.33.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" - integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== +terser@^5.10.0, terser@^5.34.1: + version "5.34.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6" + integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" commander "^2.20.0" source-map-support "~0.5.20" -terser@^5.34.1: - version "5.34.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6" - integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA== +terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.9.0: + version "5.33.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" + integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -32499,6 +32731,18 @@ webpack-dev-middleware@^3.7.3: range-parser "^1.2.1" webpack-log "^2.0.0" +webpack-dev-middleware@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-4.3.0.tgz#179cc40795882cae510b1aa7f3710cbe93c9333e" + integrity sha512-PjwyVY95/bhBh6VUqt6z4THplYcsvQ8YNNBTBM873xLVmw8FLeALn0qurHbs9EmcfhzQis/eoqypSnZeuUz26w== + dependencies: + colorette "^1.2.2" + mem "^8.1.1" + memfs "^3.2.2" + mime-types "^2.1.30" + range-parser "^1.2.1" + schema-utils "^3.0.0" + webpack-dev-middleware@^7.1.0: version "7.4.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-7.4.1.tgz#5fafc609c44b0fcda27bb4444376eb1dc9fc1fe3" @@ -32607,6 +32851,11 @@ webpack-virtual-modules@^0.2.2: dependencies: debug "^3.0.0" +webpack-virtual-modules@^0.4.1: + version "0.4.6" + resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.6.tgz#3e4008230731f1db078d9cb6f68baf8571182b45" + integrity sha512-5tyDlKLqPfMqjT3Q9TAqf2YqjwmnUleZwzJi1A5qXnlBCdj2AtOJ6wAWdglTIDOPgOiOrXeBeFcsQ8+aGQ6QbA== + webpack-visualizer-plugin2@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/webpack-visualizer-plugin2/-/webpack-visualizer-plugin2-1.1.0.tgz#247256978c12ee2a0ec22e5d170f7d0b1ef98146" @@ -32676,7 +32925,7 @@ webpack@4: watchpack "^2.4.1" webpack-sources "^3.2.3" -webpack@^5.95.0: +webpack@^5.9.0, webpack@^5.95.0: version "5.95.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== From c07dbdfb256fad6d95769d51f8ff95ae2a5545e1 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 3 Oct 2024 22:27:13 +0100 Subject: [PATCH 052/157] fix(NA): resolver request basename --- packages/kbn-test/src/jest/resolver.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 0a121b3a8d04e..2dd40a5628d8d 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -34,7 +34,7 @@ const STATIC_FILE_EXT = * @param {string} str * @returns */ -function parseRequestExtSuffix(str) { +function parseRequestOrExtSuffix(str) { const rawSuffix = '?raw'; if (str.endsWith(rawSuffix)) { return str.slice(0, -rawSuffix.length); @@ -69,9 +69,9 @@ module.exports = (request, options) => { const reqExt = Path.extname(request); if (reqExt) { - const pReqExt = parseRequestExtSuffix(reqExt); - // const reqBasename = Path.basename(request.split('?')[0], pReqExt); - const reqBasename = Path.basename(request, pReqExt); + const pRequest = parseRequestOrExtSuffix(request); + const pReqExt = parseRequestOrExtSuffix(reqExt); + const reqBasename = Path.basename(pRequest, pReqExt); if ((pReqExt === '.css' || pReqExt === '.scss') && reqBasename.endsWith('.module')) { return CSS_MODULE_MOCK; } From fd59c9a4dbeb7fe66f1f4eca2bf1e7cc2d3aeec6 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 3 Oct 2024 21:39:41 +0000 Subject: [PATCH 053/157] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- yarn.lock | 53 +++++------------------------------------------------ 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3c0c557eb777d..72f54e0f333d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18818,11 +18818,6 @@ fs-mkdirp-stream@^2.0.1: graceful-fs "^4.2.8" streamx "^2.12.0" -fs-monkey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - fs-monkey@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" @@ -23357,14 +23352,7 @@ mem@^8.1.1: map-age-cleaner "^0.1.3" mimic-fn "^3.1.0" -memfs@^3.1.2: - version "3.4.7" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.7.tgz#e5252ad2242a724f938cb937e3c4f7ceb1f70e5a" - integrity sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw== - dependencies: - fs-monkey "^1.0.3" - -memfs@^3.2.2: +memfs@^3.1.2, memfs@^3.2.2: version "3.6.0" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== @@ -23578,11 +23566,6 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -23593,14 +23576,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== - dependencies: - mime-db "1.51.0" - -mime-types@^2.1.30: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -25707,12 +25683,7 @@ picocolors@^0.2.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picocolors@^1.1.0: +picocolors@^1.0.0, picocolors@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== @@ -26343,7 +26314,7 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.15: +postcss@^8.2.15, postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: version "8.4.47" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== @@ -26352,15 +26323,6 @@ postcss@^8.2.15: picocolors "^1.1.0" source-map-js "^1.2.1" -postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: - version "8.4.38" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" - integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== - dependencies: - nanoid "^3.3.7" - picocolors "^1.0.0" - source-map-js "^1.2.0" - potpack@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/potpack/-/potpack-2.0.0.tgz#61f4dd2dc4b3d5e996e3698c0ec9426d0e169104" @@ -29508,12 +29470,7 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^1.0.2, source-map-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" - integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== - -source-map-js@^1.2.1: +source-map-js@^1.0.2, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== From a798996fe1add4fb1c59ae045576495e724af70a Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:36:08 +0000 Subject: [PATCH 054/157] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- packages/kbn-storybook/src/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 1f34de9ced064..ab45902ac1bee 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -142,7 +142,7 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { new NodePolyfillPlugin({ additionalAliases: ['process'], }), - new IgnoreNotFoundExportPlugin() + new IgnoreNotFoundExportPlugin(), ], resolve: { extensions: ['.js', '.ts', '.tsx', '.json', '.mdx'], From 1e53307d4ecd9e0ce7e845331512c25dd9a134e0 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 02:18:04 +0100 Subject: [PATCH 055/157] fix(NA): remove asUrl --- package.json | 2 +- packages/kbn-ambient-ui-types/index.d.ts | 6 -- packages/kbn-mapbox-gl/index.ts | 8 ++- packages/kbn-mapbox-gl/tsconfig.json | 2 +- .../src/worker/webpack.config.ts | 2 +- packages/kbn-test/src/jest/resolver.js | 2 +- yarn.lock | 64 +++++++++++-------- 7 files changed, 46 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index 75ede2b462888..360d36ab6d2d7 100644 --- a/package.json +++ b/package.json @@ -1830,7 +1830,7 @@ "watchpack": "^1.6.0", "web-streams-polyfill": "^4.0.0", "webpack": "^5.95.0", - "webpack-bundle-analyzer": "^4.5.0", + "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.0.4", "webpack-merge": "^6.0.1", diff --git a/packages/kbn-ambient-ui-types/index.d.ts b/packages/kbn-ambient-ui-types/index.d.ts index 9aa1876e1bc23..a7c61d9877b1c 100644 --- a/packages/kbn-ambient-ui-types/index.d.ts +++ b/packages/kbn-ambient-ui-types/index.d.ts @@ -37,12 +37,6 @@ declare module '*.mdx' { export default MDXComponent; } -declare module '*?asUrl' { - const content: string; - // eslint-disable-next-line import/no-default-export - export default string; -} - declare module '*?raw' { const content: string; // eslint-disable-next-line import/no-default-export diff --git a/packages/kbn-mapbox-gl/index.ts b/packages/kbn-mapbox-gl/index.ts index 7721b98cfa3b4..205b6207df3ef 100644 --- a/packages/kbn-mapbox-gl/index.ts +++ b/packages/kbn-mapbox-gl/index.ts @@ -33,8 +33,12 @@ import type { // @ts-expect-error import maplibreglDist from 'maplibre-gl/dist/maplibre-gl-csp'; -import mbRtlPlugin from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js?asUrl'; -import mbWorkerUrl from 'maplibre-gl/dist/maplibre-gl-csp-worker?asUrl'; +// Files loaded as url resources in webpack +// @ts-expect-error +import mbRtlPlugin from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js'; +// @ts-expect-error +import mbWorkerUrl from 'maplibre-gl/dist/maplibre-gl-csp-worker'; +// import 'maplibre-gl/dist/maplibre-gl.css'; const maplibregl: any = maplibreglDist; diff --git a/packages/kbn-mapbox-gl/tsconfig.json b/packages/kbn-mapbox-gl/tsconfig.json index 295b6cb8147c8..225d37d8136ea 100644 --- a/packages/kbn-mapbox-gl/tsconfig.json +++ b/packages/kbn-mapbox-gl/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "types": ["@kbn/ambient-ui-types"] + "types": [] }, "include": [ "**/*.ts", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 6e217f4622634..f49af5c7b69f5 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -273,7 +273,7 @@ export function getWebpackConfig( }, // emits a separate file and exports the URL. Previously achievable by using file-loader. { - test: [ + include: [ require.resolve('@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js'), require.resolve('maplibre-gl/dist/maplibre-gl-csp-worker'), ], diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 2dd40a5628d8d..9d079ce6ba796 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -92,7 +92,7 @@ module.exports = (request, options) => { } } - if (request.endsWith('?asUrl')) { + if (request.startsWith('@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js') || request.startsWith('maplibre-gl/dist/maplibre-gl-csp-worker')) { return FILE_MOCK; } diff --git a/yarn.lock b/yarn.lock index 3c0c557eb777d..2f59e1bbf4319 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1571,7 +1571,7 @@ gonzales-pe "^4.3.0" node-source-walk "^6.0.1" -"@discoveryjs/json-ext@^0.5.0", "@discoveryjs/json-ext@^0.5.3", "@discoveryjs/json-ext@^0.5.7": +"@discoveryjs/json-ext@0.5.7", "@discoveryjs/json-ext@^0.5.0", "@discoveryjs/json-ext@^0.5.3", "@discoveryjs/json-ext@^0.5.7": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== @@ -8337,10 +8337,10 @@ schema-utils "^3.0.0" source-map "^0.7.3" -"@polka/url@^1.0.0-next.20": - version "1.0.0-next.21" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" - integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== +"@polka/url@^1.0.0-next.24": + version "1.0.0-next.28" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.28.tgz#d45e01c4a56f143ee69c54dd6b12eade9e270a73" + integrity sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw== "@popperjs/core@^2.11.8", "@popperjs/core@^2.5.4": version "2.11.8" @@ -15976,6 +15976,11 @@ dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== +debounce@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" + integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -19883,7 +19888,7 @@ html-entities@^2.1.0, html-entities@^2.4.0: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== -html-escaper@^2.0.0: +html-escaper@^2.0.0, html-escaper@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== @@ -24105,10 +24110,10 @@ mri@1.1.4: resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a" integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w== -mrmime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.0.tgz#14d387f0585a5233d291baba339b063752a2398b" - integrity sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ== +mrmime@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" + integrity sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw== ms-chromium-edge-driver@^0.5.1: version "0.5.1" @@ -29290,14 +29295,14 @@ sinon@^7.4.2: nise "^1.5.2" supports-color "^5.5.0" -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== +sirv@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" + integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" - totalist "^1.0.0" + "@polka/url" "^1.0.0-next.24" + mrmime "^2.0.0" + totalist "^3.0.0" sisteransi@^1.0.5: version "1.0.5" @@ -31099,10 +31104,10 @@ topojson-client@^3.1.0: dependencies: commander "2" -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== +totalist@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== tough-cookie@^4.1.2, tough-cookie@^4.1.3, tough-cookie@^4.1.4: version "4.1.4" @@ -32676,19 +32681,22 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== -webpack-bundle-analyzer@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz#1b0eea2947e73528754a6f9af3e91b2b6e0f79d5" - integrity sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ== +webpack-bundle-analyzer@^4.10.2: + version "4.10.2" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd" + integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw== dependencies: + "@discoveryjs/json-ext" "0.5.7" acorn "^8.0.4" acorn-walk "^8.0.0" - chalk "^4.1.0" commander "^7.2.0" + debounce "^1.2.1" + escape-string-regexp "^4.0.0" gzip-size "^6.0.0" - lodash "^4.17.20" + html-escaper "^2.0.2" opener "^1.5.2" - sirv "^1.0.7" + picocolors "^1.0.0" + sirv "^2.0.3" ws "^7.3.1" webpack-cli@^5.1.4: From 424606434dc12159ad62f8bffc633553cfbb2476 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 04:15:01 +0100 Subject: [PATCH 056/157] fix(NA): profiling plugins --- .../kbn-optimizer-webpack-helpers/index.ts | 1 + .../src/webpack_helpers.ts | 15 +++++++++++++++ .../src/worker/emit_stats_plugin.ts | 6 +++--- .../kbn-optimizer/src/worker/webpack.config.ts | 18 ++++++++++-------- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/packages/kbn-optimizer-webpack-helpers/index.ts b/packages/kbn-optimizer-webpack-helpers/index.ts index c2b4720c07f0a..53d78dd588044 100644 --- a/packages/kbn-optimizer-webpack-helpers/index.ts +++ b/packages/kbn-optimizer-webpack-helpers/index.ts @@ -18,6 +18,7 @@ export type { export { STATS_WARNINGS_FILTER, + STATS_OPTIONS_DEFAULT_USEFUL_FILTER, isFailureStats, failedStatsToErrorMessage, getModulePath, diff --git a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts index 88dcfea679e96..2f0a97c935be2 100644 --- a/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts +++ b/packages/kbn-optimizer-webpack-helpers/src/webpack_helpers.ts @@ -41,6 +41,21 @@ export function failedStatsToErrorMessage(stats: webpack.Stats) { return `Optimizations failure.\n${details.split('\n').join('\n ')}`; } +export const STATS_OPTIONS_DEFAULT_USEFUL_FILTER = { + all: false, + hash: true, + version: true, + timings: true, + assets: true, + modules: true, + reasons: true, + chunks: true, + chunkModules: true, + errorDetails: false, + entrypoints: true, + ids: true, +}; + export interface WebpackResolveData { /** compilation context */ context: string; diff --git a/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts b/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts index fee08bd4e2fa9..39232495963cc 100644 --- a/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts +++ b/packages/kbn-optimizer/src/worker/emit_stats_plugin.ts @@ -11,7 +11,7 @@ import Fs from 'fs'; import Path from 'path'; import webpack from 'webpack'; - +import { STATS_OPTIONS_DEFAULT_USEFUL_FILTER } from '@kbn/optimizer-webpack-helpers'; import { Bundle } from '../common'; export class EmitStatsPlugin { @@ -22,12 +22,12 @@ export class EmitStatsPlugin { { name: 'EmitStatsPlugin', // run at the very end, ensure that it's after clean-webpack-plugin - stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, + // stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, }, (stats) => { Fs.writeFileSync( Path.resolve(this.bundle.outputDir, 'stats.json'), - JSON.stringify(stats.toJson(), null, 2) + JSON.stringify(stats.toJson(STATS_OPTIONS_DEFAULT_USEFUL_FILTER), null, 2) ); } ); diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index f49af5c7b69f5..c4e549a1a2a2e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -21,7 +21,10 @@ import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; // @ts-expect-error import VisualizerPlugin from 'webpack-visualizer-plugin2'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; -import { STATS_WARNINGS_FILTER } from '@kbn/optimizer-webpack-helpers'; +import { + STATS_WARNINGS_FILTER, + STATS_OPTIONS_DEFAULT_USEFUL_FILTER, +} from '@kbn/optimizer-webpack-helpers'; import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common'; import { BundleRemotesPlugin } from './bundle_remotes_plugin'; @@ -96,24 +99,23 @@ export function getWebpackConfig( context: worker.repoRoot, manifest: DLL_MANIFEST, }), - // @ts-ignore something is wrong with the StatoscopeWebpackPlugin type. ...(worker.profileWebpack ? [ new EmitStatsPlugin(bundle), - new StatoscopeWebpackPlugin({ - open: false, - saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, - }), - new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), new BundleAnalyzerPlugin({ analyzerMode: 'static', reportFilename: `${bundle.id}.analyzer.html`, openAnalyzer: false, logLevel: 'silent', }), + new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), + new StatoscopeWebpackPlugin({ + open: false, + saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, + statsOptions: STATS_OPTIONS_DEFAULT_USEFUL_FILTER, + }), ] : []), - // @ts-ignore something is wrong with the StatoscopeWebpackPlugin type. ...(bundle.banner ? [new webpack.BannerPlugin({ banner: bundle.banner, raw: true })] : []), ], From d149400fecce799401ba75a0d16405e8796a70f2 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 04:31:48 +0100 Subject: [PATCH 057/157] fix(NA): get back asUrl resourceQuery for previous inline file-loader --- packages/kbn-ambient-ui-types/index.d.ts | 6 ++++++ packages/kbn-mapbox-gl/index.ts | 8 ++------ packages/kbn-mapbox-gl/tsconfig.json | 2 +- packages/kbn-test/src/jest/resolver.js | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/kbn-ambient-ui-types/index.d.ts b/packages/kbn-ambient-ui-types/index.d.ts index a7c61d9877b1c..9aa1876e1bc23 100644 --- a/packages/kbn-ambient-ui-types/index.d.ts +++ b/packages/kbn-ambient-ui-types/index.d.ts @@ -37,6 +37,12 @@ declare module '*.mdx' { export default MDXComponent; } +declare module '*?asUrl' { + const content: string; + // eslint-disable-next-line import/no-default-export + export default string; +} + declare module '*?raw' { const content: string; // eslint-disable-next-line import/no-default-export diff --git a/packages/kbn-mapbox-gl/index.ts b/packages/kbn-mapbox-gl/index.ts index 205b6207df3ef..7721b98cfa3b4 100644 --- a/packages/kbn-mapbox-gl/index.ts +++ b/packages/kbn-mapbox-gl/index.ts @@ -33,12 +33,8 @@ import type { // @ts-expect-error import maplibreglDist from 'maplibre-gl/dist/maplibre-gl-csp'; -// Files loaded as url resources in webpack -// @ts-expect-error -import mbRtlPlugin from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js'; -// @ts-expect-error -import mbWorkerUrl from 'maplibre-gl/dist/maplibre-gl-csp-worker'; -// +import mbRtlPlugin from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js?asUrl'; +import mbWorkerUrl from 'maplibre-gl/dist/maplibre-gl-csp-worker?asUrl'; import 'maplibre-gl/dist/maplibre-gl.css'; const maplibregl: any = maplibreglDist; diff --git a/packages/kbn-mapbox-gl/tsconfig.json b/packages/kbn-mapbox-gl/tsconfig.json index 225d37d8136ea..295b6cb8147c8 100644 --- a/packages/kbn-mapbox-gl/tsconfig.json +++ b/packages/kbn-mapbox-gl/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "types": [] + "types": ["@kbn/ambient-ui-types"] }, "include": [ "**/*.ts", diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index 9d079ce6ba796..2dd40a5628d8d 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -92,7 +92,7 @@ module.exports = (request, options) => { } } - if (request.startsWith('@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js') || request.startsWith('maplibre-gl/dist/maplibre-gl-csp-worker')) { + if (request.endsWith('?asUrl')) { return FILE_MOCK; } From 0f4b2483fbbafe0606b4981eb083502d49f72eb0 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 04:51:46 +0100 Subject: [PATCH 058/157] chore(NA): test by removing statoscope --- .../kbn-optimizer/src/worker/webpack.config.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index c4e549a1a2a2e..43d8881e2334d 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -17,13 +17,13 @@ import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm'; import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src'; -import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; +// import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; // @ts-expect-error import VisualizerPlugin from 'webpack-visualizer-plugin2'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { STATS_WARNINGS_FILTER, - STATS_OPTIONS_DEFAULT_USEFUL_FILTER, + // STATS_OPTIONS_DEFAULT_USEFUL_FILTER, } from '@kbn/optimizer-webpack-helpers'; import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common'; @@ -109,11 +109,11 @@ export function getWebpackConfig( logLevel: 'silent', }), new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), - new StatoscopeWebpackPlugin({ - open: false, - saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, - statsOptions: STATS_OPTIONS_DEFAULT_USEFUL_FILTER, - }), + // new StatoscopeWebpackPlugin({ + // open: false, + // saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, + // statsOptions: STATS_OPTIONS_DEFAULT_USEFUL_FILTER, + // }), ] : []), ...(bundle.banner ? [new webpack.BannerPlugin({ banner: bundle.banner, raw: true })] : []), From 00b4776882833f1a7783ddb1c88ffe389d596f68 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 04:55:56 +0100 Subject: [PATCH 059/157] chore(NA): upgrades webpack_bundle_analyzer to machineType n2-standard-8 --- .buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml b/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml index 6b265c3146a63..d14bcfa8fee58 100644 --- a/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml +++ b/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml @@ -2,7 +2,7 @@ steps: - command: .buildkite/scripts/steps/webpack_bundle_analyzer/build_and_upload.sh label: 'Build Webpack Bundle Analyzer reports' agents: - machineType: n2-standard-4 + machineType: n2-standard-8 preemptible: true key: webpack_bundle_analyzer timeout_in_minutes: 60 From c791f0f7fc78c3eefb293119a0bae1552f1de79a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 05:58:47 +0100 Subject: [PATCH 060/157] chore(NA): turn on Statoscope plugin again --- .../kbn-optimizer/src/worker/webpack.config.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 43d8881e2334d..c4e549a1a2a2e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -17,13 +17,13 @@ import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm'; import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src'; -// import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; +import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; // @ts-expect-error import VisualizerPlugin from 'webpack-visualizer-plugin2'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { STATS_WARNINGS_FILTER, - // STATS_OPTIONS_DEFAULT_USEFUL_FILTER, + STATS_OPTIONS_DEFAULT_USEFUL_FILTER, } from '@kbn/optimizer-webpack-helpers'; import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common'; @@ -109,11 +109,11 @@ export function getWebpackConfig( logLevel: 'silent', }), new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), - // new StatoscopeWebpackPlugin({ - // open: false, - // saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, - // statsOptions: STATS_OPTIONS_DEFAULT_USEFUL_FILTER, - // }), + new StatoscopeWebpackPlugin({ + open: false, + saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, + statsOptions: STATS_OPTIONS_DEFAULT_USEFUL_FILTER, + }), ] : []), ...(bundle.banner ? [new webpack.BannerPlugin({ banner: bundle.banner, raw: true })] : []), From 62b812357ba9cc104e3c912ac49aeeb613463627 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 06:03:15 +0100 Subject: [PATCH 061/157] chore(NA): disable webpack-visualizer-plugin2 plugin --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index c4e549a1a2a2e..d49b59d790fe0 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -108,7 +108,7 @@ export function getWebpackConfig( openAnalyzer: false, logLevel: 'silent', }), - new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), + // new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), new StatoscopeWebpackPlugin({ open: false, saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, From 8d0460c0da337fb3a72c5b2561d0b84b77cc0eaf Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 14:51:54 +0100 Subject: [PATCH 062/157] fix(NA): quick checks eslint failure --- packages/kbn-optimizer/src/worker/webpack.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index d49b59d790fe0..aea705aff29e5 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -18,8 +18,8 @@ import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm'; import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src'; import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; -// @ts-expect-error -import VisualizerPlugin from 'webpack-visualizer-plugin2'; +// ts-expect-error +// import VisualizerPlugin from 'webpack-visualizer-plugin2'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { STATS_WARNINGS_FILTER, From 0353e6250021e31986621dc2d3c5e6e472dfc421 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 15:49:31 +0100 Subject: [PATCH 063/157] fix(NA): removing the webpack visualizer plugin --- package.json | 1 - .../kbn-optimizer/src/worker/webpack.config.ts | 3 --- yarn.lock | 17 +++-------------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 360d36ab6d2d7..8bec4cda746cd 100644 --- a/package.json +++ b/package.json @@ -1835,7 +1835,6 @@ "webpack-dev-server": "^5.0.4", "webpack-merge": "^6.0.1", "webpack-sources": "^3.2.3", - "webpack-visualizer-plugin2": "^1.1.0", "xml-crypto": "^6.0.0", "xmlbuilder": "13.0.2", "yargs": "^15.4.1", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index aea705aff29e5..dbf7443ebd22f 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -18,8 +18,6 @@ import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm'; import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src'; import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; -// ts-expect-error -// import VisualizerPlugin from 'webpack-visualizer-plugin2'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { STATS_WARNINGS_FILTER, @@ -108,7 +106,6 @@ export function getWebpackConfig( openAnalyzer: false, logLevel: 'silent', }), - // new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }), new StatoscopeWebpackPlugin({ open: false, saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`, diff --git a/yarn.lock b/yarn.lock index dd7d6c7e84b29..80d9cc88573db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15872,7 +15872,7 @@ d3-transition@3, d3-transition@^3.0.1: d3-interpolate "1 - 3" d3-timer "1 - 3" -d3@3.5.17, d3@^3.5.6: +d3@3.5.17: version "3.5.17" resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= @@ -27030,7 +27030,7 @@ react-docgen@^5.0.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-dom@^17.0.1, react-dom@^17.0.2: +react-dom@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== @@ -27529,7 +27529,7 @@ react-window@^1.8.10: dependencies: loose-envify "^1.1.0" -react@^17.0.1, react@^17.0.2: +react@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== @@ -32811,17 +32811,6 @@ webpack-virtual-modules@^0.4.1: resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.6.tgz#3e4008230731f1db078d9cb6f68baf8571182b45" integrity sha512-5tyDlKLqPfMqjT3Q9TAqf2YqjwmnUleZwzJi1A5qXnlBCdj2AtOJ6wAWdglTIDOPgOiOrXeBeFcsQ8+aGQ6QbA== -webpack-visualizer-plugin2@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/webpack-visualizer-plugin2/-/webpack-visualizer-plugin2-1.1.0.tgz#247256978c12ee2a0ec22e5d170f7d0b1ef98146" - integrity sha512-pB2Z9a12m+LwjrfptyR4ReEPc0llOjsb2lXVLEJ4yOnRCBtLeWW+TZrZihUZhJDSW9tc60UXnj9/orgyagLOkg== - dependencies: - d3 "^3.5.6" - mkdirp "^0.5.1" - prop-types "^15.7.2" - react "^17.0.1" - react-dom "^17.0.1" - webpack@4: version "4.46.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" From d0f61841ae92cb3abcf7c08d822c09f4e95c4a27 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 23:30:54 +0100 Subject: [PATCH 064/157] fix(NA): remove polyfill all integration from webpack --- package.json | 6 ++++++ packages/kbn-cypress-config/index.ts | 10 +++------- packages/kbn-optimizer/src/worker/webpack.config.ts | 9 +++++---- packages/kbn-storybook/src/webpack.config.ts | 9 +++++---- packages/kbn-ui-shared-deps-npm/webpack.config.js | 6 +----- packages/kbn-ui-shared-deps-src/webpack.config.js | 4 ---- yarn.lock | 4 ++-- 7 files changed, 22 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 8bec4cda746cd..87807e19541f1 100644 --- a/package.json +++ b/package.json @@ -1681,8 +1681,10 @@ "clean-webpack-plugin": "^4.0.0", "cli-progress": "^3.12.0", "cli-table3": "^0.6.1", + "constants-browserify": "^1.0.0", "content-security-policy-parser": "^0.6.0", "cpy": "^8.1.1", + "crypto-browserify": "^3.12.0", "css-loader": "^7.1.2", "cssnano": "^5.1.12", "cssnano-preset-default": "^5.2.12", @@ -1775,7 +1777,9 @@ "nyc": "^15.1.0", "oboe": "^2.1.4", "openapi-types": "^10.0.0", + "os-browserify": "^0.3.0", "p-reflect": "2.1.0", + "path-browserify": "^1.0.1", "pbf": "3.2.1", "peggy": "^1.2.0", "picomatch": "^2.3.1", @@ -1805,6 +1809,7 @@ "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.4", + "stream-browserify": "^3.0.0", "string-replace-loader": "^3.1.0", "style-loader": "^4.0.0", "stylelint": "^14.9.1", @@ -1818,6 +1823,7 @@ "tape": "^5.0.1", "terser": "^5.34.1", "terser-webpack-plugin": "^5.3.10", + "timers-browserify": "^2.0.12", "tough-cookie": "^5.0.0", "tree-kill": "^1.2.2", "ts-morph": "^15.1.0", diff --git a/packages/kbn-cypress-config/index.ts b/packages/kbn-cypress-config/index.ts index d3e33136118dd..722163efd9366 100644 --- a/packages/kbn-cypress-config/index.ts +++ b/packages/kbn-cypress-config/index.ts @@ -10,7 +10,6 @@ import { v4 as uuid } from 'uuid'; import { defineConfig } from 'cypress'; import wp from '@cypress/webpack-preprocessor'; -import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; export function defineCypressConfig(options?: Cypress.ConfigOptions) { return defineConfig({ @@ -27,6 +26,9 @@ export function defineCypressConfig(options?: Cypress.ConfigOptions) { webpackOptions: { resolve: { extensions: ['.ts', '.tsx', '.js'], + fallback: { + path: require.resolve('path-browserify'), + }, }, module: { rules: [ @@ -44,12 +46,6 @@ export function defineCypressConfig(options?: Cypress.ConfigOptions) { }, ], }, - plugins: [ - // TODO: remove non needed polyfills - new NodePolyfillPlugin({ - additionalAliases: ['process'], - }), - ], }, })(file); }); diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index dbf7443ebd22f..3ac0ff9114323 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -11,7 +11,6 @@ import Path from 'path'; import Fs from 'fs'; import webpack from 'webpack'; -import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin'; import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; @@ -86,9 +85,6 @@ export function getWebpackConfig( }, plugins: [ - new NodePolyfillPlugin({ - additionalAliases: ['process'], - }), new CleanWebpackPlugin(), new BundleRemotesPlugin(bundle, bundleRemotes), new PopulateBundleCachePlugin(worker, bundle, parseDllManifest(DLL_MANIFEST)), @@ -315,7 +311,12 @@ export function getWebpackConfig( }, fallback: { child_process: false, + crypto: require.resolve('crypto-browserify'), fs: false, + os: require.resolve('os-browserify/browser'), + path: require.resolve('path-browserify'), + stream: require.resolve('stream-browserify'), + timers: require.resolve('timers-browserify'), }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index ab45902ac1bee..a54d0df0e04dd 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -10,7 +10,6 @@ /* eslint-disable import/no-default-export */ import { externals } from '@kbn/ui-shared-deps-src'; import { resolve } from 'path'; -import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; import webpack, { Configuration } from 'webpack'; import { merge as webpackMerge } from 'webpack-merge'; import { REPO_ROOT } from './lib/constants'; @@ -139,9 +138,6 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { ], }, plugins: [ - new NodePolyfillPlugin({ - additionalAliases: ['process'], - }), new IgnoreNotFoundExportPlugin(), ], resolve: { @@ -152,6 +148,11 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { core_styles: resolve(REPO_ROOT, 'src/core/public/index.scss'), vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), }, + fallback: { + constants: require.resolve('constants-browserify'), + stream: require.resolve('stream-browserify'), + timers: require.resolve('timers-browserify'), + }, }, stats: 'errors-only', }; diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 390571bb9c9b4..b2a62100f2c07 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -9,7 +9,6 @@ const Path = require('path'); const webpack = require('webpack'); -const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -143,7 +142,7 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], - mainFields: ['browser', 'main'], + // mainFields: ['browser', 'main'], // conditionNames: ['require', 'default', 'node', 'module', 'import'], fallback: { child_process: false, @@ -166,9 +165,6 @@ module.exports = (_, argv) => { }, plugins: [ - new NodePolyfillPlugin({ - additionalAliases: ['process'], - }), new CleanWebpackPlugin({ protectWebpackAssets: false, cleanAfterEveryBuildPatterns: [ diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 959f86067a84c..8560c5a6bf4dd 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -13,7 +13,6 @@ require('@kbn/babel-register').install(); const Path = require('path'); const webpack = require('webpack'); -const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const UiSharedDepsNpm = require('@kbn/ui-shared-deps-npm'); @@ -139,9 +138,6 @@ module.exports = { }, plugins: [ - new NodePolyfillPlugin({ - additionalAliases: ['process'], - }), new MiniCssExtractPlugin({ filename: '[name].css', }), diff --git a/yarn.lock b/yarn.lock index 80d9cc88573db..bf265ec23195a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14966,7 +14966,7 @@ console.table@^0.10.0: constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== constate@^3.3.2: version "3.3.2" @@ -25145,7 +25145,7 @@ original-url@^1.2.3: os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== os-homedir@^1.0.0: version "1.0.2" From 2471dd323ec6d5f047f8cb315e6279611c5c9f23 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 23:47:51 +0100 Subject: [PATCH 065/157] fix(NA): including buffer on ui-shared-deps --- package.json | 2 +- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 2 +- .../kbn-ui-shared-deps-npm/webpack.config.js | 4 + packages/kbn-ui-shared-deps-src/BUILD.bazel | 1 - yarn.lock | 80 ++----------------- 5 files changed, 14 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 87807e19541f1..3994dda7b2e80 100644 --- a/package.json +++ b/package.json @@ -1674,6 +1674,7 @@ "babel-plugin-transform-typescript-metadata": "^0.3.2", "backport": "^8.9.8", "blob-polyfill": "^7.0.20220408", + "buffer": "^6.0.3", "buildkite-test-collector": "^1.7.0", "callsites": "^3.1.0", "chance": "1.0.18", @@ -1773,7 +1774,6 @@ "mutation-observer": "^1.0.3", "native-hdr-histogram": "^1.0.0", "nock": "12.0.3", - "node-polyfill-webpack-plugin": "^4.0.0", "nyc": "^15.1.0", "oboe": "^2.1.4", "openapi-types": "^10.0.0", diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 80d6bd04e6e93..d44463073104a 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -45,6 +45,7 @@ RUNTIME_DEPS = [ "@npm//@hello-pangea/dnd", "@npm//@tanstack/react-query", "@npm//@tanstack/react-query-devtools", + "@npm//buffer", "@npm//classnames", "@npm//fflate", "@npm//fastest-levenshtein", @@ -78,7 +79,6 @@ webpack_cli( ":webpack.config.js", "@npm//webpack", - "@npm//node-polyfill-webpack-plugin", "@npm//clean-webpack-plugin", "@npm//mini-css-extract-plugin", "@npm//moment", diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index b2a62100f2c07..bf68258b5ed8e 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -145,6 +145,7 @@ module.exports = (_, argv) => { // mainFields: ['browser', 'main'], // conditionNames: ['require', 'default', 'node', 'module', 'import'], fallback: { + buffer: require.resolve('buffer/'), child_process: false, fs: false, }, @@ -165,6 +166,9 @@ module.exports = (_, argv) => { }, plugins: [ + new webpack.ProvidePlugin({ + Buffer: [require.resolve('buffer/'), 'Buffer'], + }), new CleanWebpackPlugin({ protectWebpackAssets: false, cleanAfterEveryBuildPatterns: [ diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index d7b7d416e2eb0..d13421f8b2f03 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -11,7 +11,6 @@ webpack_cli( data = SRCS + [ "//:.browserslistrc", "@npm//webpack", - "@npm//node-polyfill-webpack-plugin", "@npm//mini-css-extract-plugin", "@npm//moment", "@npm//babel-loader", diff --git a/yarn.lock b/yarn.lock index bf265ec23195a..b19937a14464b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12920,17 +12920,6 @@ assert@^1.1.1: object-assign "^4.1.1" util "0.10.3" -assert@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" - integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== - dependencies: - call-bind "^1.0.2" - is-nan "^1.3.2" - object-is "^1.1.5" - object.assign "^4.1.4" - util "^0.12.5" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -14941,7 +14930,7 @@ connect-history-api-fallback@^2.0.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== -console-browserify@^1.1.0, console-browserify@^1.2.0: +console-browserify@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== @@ -16627,7 +16616,7 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= -domain-browser@4.22.0, domain-browser@^1.1.1, domain-browser@^5.7.0: +domain-browser@4.22.0, domain-browser@^1.1.1: version "4.22.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.22.0.tgz#6ddd34220ec281f9a65d3386d267ddd35c491f9f" integrity sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw== @@ -20819,14 +20808,6 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== -is-nan@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - is-native@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-native/-/is-native-1.0.1.tgz#cd18cc162e8450d683b5babe79ac99c145449675" @@ -24517,36 +24498,6 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-polyfill-webpack-plugin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-4.0.0.tgz#99c4e4a0b41073b65aa8c584b0d195798aed2c76" - integrity sha512-WLk77vLpbcpmTekRj6s6vYxk30XoyaY5MDZ4+9g8OaKoG3Ij+TjOqhpQjVUlfDZBPBgpNATDltaQkzuXSnnkwg== - dependencies: - assert "^2.1.0" - browserify-zlib "^0.2.0" - buffer "^6.0.3" - console-browserify "^1.2.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.12.0" - domain-browser "^5.7.0" - events "^3.3.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "^1.0.1" - process "^0.11.10" - punycode "^2.3.1" - querystring-es3 "^0.2.1" - readable-stream "^4.5.2" - stream-browserify "^3.0.0" - stream-http "^3.2.0" - string_decoder "^1.3.0" - timers-browserify "^2.0.12" - tty-browserify "^0.0.1" - type-fest "^4.18.2" - url "^0.11.3" - util "^0.12.5" - vm-browserify "^1.1.2" - node-preload@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" @@ -26737,7 +26688,7 @@ punycode@^1.2.4, punycode@^1.4.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1: +punycode@^2.1.0, punycode@^2.1.1: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== @@ -26794,7 +26745,7 @@ query-string@^6.13.2: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -querystring-es3@^0.2.0, querystring-es3@^0.2.1: +querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= @@ -27631,7 +27582,7 @@ read-pkg@^5.2.0: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^4.0.0, readable-stream@^4.5.2: +readable-stream@^4.0.0: version "4.5.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== @@ -29934,16 +29885,6 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" -stream-http@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" - integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" @@ -31273,11 +31214,6 @@ tty-browserify@0.0.0: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= -tty-browserify@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -31344,7 +31280,7 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.18.2, type-fest@^4.9.0: +type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: version "4.26.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.26.1.tgz#a4a17fa314f976dd3e6d6675ef6c775c16d7955e" integrity sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg== @@ -31817,7 +31753,7 @@ url-template@^2.0.8: resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" integrity sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw== -url@^0.11.0, url@^0.11.3, url@^0.11.4: +url@^0.11.0, url@^0.11.4: version "0.11.4" resolved "https://registry.yarnpkg.com/url/-/url-0.11.4.tgz#adca77b3562d56b72746e76b330b7f27b6721f3c" integrity sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg== @@ -32490,7 +32426,7 @@ vinyl@^3.0.0: replace-ext "^2.0.0" teex "^1.0.1" -vm-browserify@^1.0.1, vm-browserify@^1.1.2: +vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== From 4fcb4e5548b7bda0f6c2b21147828321c5be167a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 4 Oct 2024 23:49:07 +0100 Subject: [PATCH 066/157] fix(NA): eslint on packages/kbn-storybook/src/webpack.config.ts --- packages/kbn-storybook/src/webpack.config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index a54d0df0e04dd..d8a5ebe64e14d 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -137,9 +137,7 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { }, ], }, - plugins: [ - new IgnoreNotFoundExportPlugin(), - ], + plugins: [new IgnoreNotFoundExportPlugin()], resolve: { extensions: ['.js', '.ts', '.tsx', '.json', '.mdx'], mainFields: ['browser', 'main'], From ab021b63efaf195f9dd9045c592e70b505d236a8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 5 Oct 2024 01:55:42 +0100 Subject: [PATCH 067/157] fix(NA): add missing polyfills on process and buffer --- package.json | 1 + packages/kbn-optimizer/src/worker/webpack.config.ts | 4 ++++ packages/kbn-ui-shared-deps-npm/BUILD.bazel | 1 + packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 ++ packages/kbn-ui-shared-deps-src/webpack.config.js | 4 ++++ yarn.lock | 2 +- 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3994dda7b2e80..645e8e094a5a5 100644 --- a/package.json +++ b/package.json @@ -1795,6 +1795,7 @@ "postcss-prefix-selector": "^1.16.0", "postcss-scss": "^4.0.4", "prettier": "^2.8.8", + "process": "^0.11.10", "proxy": "^2.1.1", "react-test-renderer": "^17.0.2", "recast": "^0.23.9", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 3ac0ff9114323..0aadc7d5b11f3 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -85,6 +85,9 @@ export function getWebpackConfig( }, plugins: [ + new webpack.ProvidePlugin({ + process: require.resolve('process/browser'), + }), new CleanWebpackPlugin(), new BundleRemotesPlugin(bundle, bundleRemotes), new PopulateBundleCachePlugin(worker, bundle, parseDllManifest(DLL_MANIFEST)), @@ -315,6 +318,7 @@ export function getWebpackConfig( fs: false, os: require.resolve('os-browserify/browser'), path: require.resolve('path-browserify'), + process: require.resolve('process/browser'), stream: require.resolve('stream-browserify'), timers: require.resolve('timers-browserify'), }, diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index d44463073104a..5bafc3ddbc277 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -53,6 +53,7 @@ RUNTIME_DEPS = [ "@npm//jquery", "@npm//lodash", "@npm//moment-timezone", + "@npm//process", "@npm//react-ace", "@npm//react-dom", "@npm//react-router-dom", diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index bf68258b5ed8e..c8f1e5e138c8c 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -148,6 +148,7 @@ module.exports = (_, argv) => { buffer: require.resolve('buffer/'), child_process: false, fs: false, + process: require.resolve('process/browser'), }, }, @@ -168,6 +169,7 @@ module.exports = (_, argv) => { plugins: [ new webpack.ProvidePlugin({ Buffer: [require.resolve('buffer/'), 'Buffer'], + process: require.resolve('process/browser'), }), new CleanWebpackPlugin({ protectWebpackAssets: false, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 8560c5a6bf4dd..98d89a5a6da42 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -118,6 +118,7 @@ module.exports = { 'scheduler/tracing': 'scheduler/tracing-profiling', }, fallback: { + buffer: require.resolve('buffer/'), child_process: false, fs: false, }, @@ -138,6 +139,9 @@ module.exports = { }, plugins: [ + new webpack.ProvidePlugin({ + Buffer: [require.resolve('buffer/'), 'Buffer'], + }), new MiniCssExtractPlugin({ filename: '[name].css', }), diff --git a/yarn.lock b/yarn.lock index b19937a14464b..cdf18810ab37c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26460,7 +26460,7 @@ process-warning@^2.0.0: process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== progress@^1.1.8: version "1.1.8" From ebe83d6f5c6b6661fbfde1634c770ec4c9e3afd4 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 5 Oct 2024 02:12:17 +0100 Subject: [PATCH 068/157] fix(NA): add process polyfill into ui-shared-deps-src --- packages/kbn-ui-shared-deps-src/webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 98d89a5a6da42..77b0506d7c340 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -121,6 +121,7 @@ module.exports = { buffer: require.resolve('buffer/'), child_process: false, fs: false, + process: require.resolve('process/browser'), }, }, @@ -141,6 +142,7 @@ module.exports = { plugins: [ new webpack.ProvidePlugin({ Buffer: [require.resolve('buffer/'), 'Buffer'], + process: require.resolve('process/browser'), }), new MiniCssExtractPlugin({ filename: '[name].css', From e0f6b3fdd968d137c2398f9d165907b0ee276320 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 5 Oct 2024 03:59:09 +0100 Subject: [PATCH 069/157] fix(NA): include Buffer polyfill in @kbn/optimizer worker confifg --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 0aadc7d5b11f3..d4f29eaa51c76 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -86,6 +86,7 @@ export function getWebpackConfig( plugins: [ new webpack.ProvidePlugin({ + Buffer: [require.resolve('buffer/'), 'Buffer'], process: require.resolve('process/browser'), }), new CleanWebpackPlugin(), @@ -313,6 +314,7 @@ export function getWebpackConfig( fs: false, }, fallback: { + buffer: require.resolve('buffer/'), child_process: false, crypto: require.resolve('crypto-browserify'), fs: false, From 1bb0882c10af9aa1c79b55564ab5d88a850f2b89 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 5 Oct 2024 04:18:02 +0100 Subject: [PATCH 070/157] chore(NA): remove targets and mainFields --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 +- packages/kbn-ui-shared-deps-src/webpack.config.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index d4f29eaa51c76..8b092d25dd16e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -48,7 +48,7 @@ export function getWebpackConfig( devtool: worker.dist ? false : 'cheap-source-map', profile: worker.profileWebpack, - target: 'web', + // target: 'web', output: { // TODO: remove this commented line if xxhash64 is faster diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index c8f1e5e138c8c..ca11514400267 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -101,7 +101,7 @@ module.exports = (_, argv) => { }, context: __dirname, devtool: 'cheap-source-map', - target: 'web', + // target: 'web', output: { path: outputPath, filename: '[name].dll.js', diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 77b0506d7c340..009c3768a1812 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -33,7 +33,7 @@ module.exports = { }, context: __dirname, devtool: 'cheap-source-map', - target: 'web', + // target: 'web', output: { path: UiSharedDepsSrcDistDir, filename: '[name].js', @@ -107,7 +107,7 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], - mainFields: ['browser', 'main'], + // mainFields: ['browser', 'main'], // conditionNames: ['require', 'default', 'node', 'module', 'import'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', From a289ab6044a44a9251f239934cd99f2ad61fda94 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 5 Oct 2024 04:21:50 +0100 Subject: [PATCH 071/157] fix(NA): add target web back --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 +- packages/kbn-ui-shared-deps-src/webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 8b092d25dd16e..d4f29eaa51c76 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -48,7 +48,7 @@ export function getWebpackConfig( devtool: worker.dist ? false : 'cheap-source-map', profile: worker.profileWebpack, - // target: 'web', + target: 'web', output: { // TODO: remove this commented line if xxhash64 is faster diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index ca11514400267..c8f1e5e138c8c 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -101,7 +101,7 @@ module.exports = (_, argv) => { }, context: __dirname, devtool: 'cheap-source-map', - // target: 'web', + target: 'web', output: { path: outputPath, filename: '[name].dll.js', diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 009c3768a1812..b23cebd577611 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -33,7 +33,7 @@ module.exports = { }, context: __dirname, devtool: 'cheap-source-map', - // target: 'web', + target: 'web', output: { path: UiSharedDepsSrcDistDir, filename: '[name].js', From 5952c3faee2ff9fda0eb9fc8043fa4dafcfcd64e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 5 Oct 2024 05:09:21 +0100 Subject: [PATCH 072/157] chore(NA): same old polyfill versions --- package.json | 10 +++++----- yarn.lock | 18 +++++------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 645e8e094a5a5..f3122a0a821da 100644 --- a/package.json +++ b/package.json @@ -1674,7 +1674,7 @@ "babel-plugin-transform-typescript-metadata": "^0.3.2", "backport": "^8.9.8", "blob-polyfill": "^7.0.20220408", - "buffer": "^6.0.3", + "buffer": "^4.3.0", "buildkite-test-collector": "^1.7.0", "callsites": "^3.1.0", "chance": "1.0.18", @@ -1685,7 +1685,7 @@ "constants-browserify": "^1.0.0", "content-security-policy-parser": "^0.6.0", "cpy": "^8.1.1", - "crypto-browserify": "^3.12.0", + "crypto-browserify": "^3.11.0", "css-loader": "^7.1.2", "cssnano": "^5.1.12", "cssnano-preset-default": "^5.2.12", @@ -1779,7 +1779,7 @@ "openapi-types": "^10.0.0", "os-browserify": "^0.3.0", "p-reflect": "2.1.0", - "path-browserify": "^1.0.1", + "path-browserify": "^0.0.1", "pbf": "3.2.1", "peggy": "^1.2.0", "picomatch": "^2.3.1", @@ -1810,7 +1810,7 @@ "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.4", - "stream-browserify": "^3.0.0", + "stream-browserify": "^2.0.1", "string-replace-loader": "^3.1.0", "style-loader": "^4.0.0", "stylelint": "^14.9.1", @@ -1824,7 +1824,7 @@ "tape": "^5.0.1", "terser": "^5.34.1", "terser-webpack-plugin": "^5.3.10", - "timers-browserify": "^2.0.12", + "timers-browserify": "^2.0.4", "tough-cookie": "^5.0.0", "tree-kill": "^1.2.2", "ts-morph": "^15.1.0", diff --git a/yarn.lock b/yarn.lock index cdf18810ab37c..eacb163a836c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15237,7 +15237,7 @@ crypt@0.0.2: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: +crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== @@ -20318,7 +20318,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -25472,7 +25472,7 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-browserify@0.0.1: +path-browserify@0.0.1, path-browserify@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== @@ -27563,7 +27563,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -29844,14 +29844,6 @@ stream-browserify@^2.0.1: inherits "~2.0.1" readable-stream "^2.0.2" -stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - stream-chopper@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/stream-chopper/-/stream-chopper-3.0.1.tgz#73791ae7bf954c297d6683aec178648efc61dd75" @@ -30841,7 +30833,7 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= -timers-browserify@^2.0.12, timers-browserify@^2.0.4: +timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== From 81f1952d1abb9573d4ce2f95a871a25d487aead9 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 7 Oct 2024 18:01:48 +0100 Subject: [PATCH 073/157] chore(NA): introduce old node-libs-browser polyfills --- package.json | 9 +-------- packages/kbn-cypress-config/index.ts | 4 +++- .../src/worker/webpack.config.ts | 20 ++++++++++--------- packages/kbn-storybook/src/webpack.config.ts | 8 +++++--- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 3 +-- .../kbn-ui-shared-deps-npm/webpack.config.js | 10 ++++++---- .../kbn-ui-shared-deps-src/webpack.config.js | 10 ++++++---- yarn.lock | 2 +- 8 files changed, 34 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index f3122a0a821da..b4950d4b40e1b 100644 --- a/package.json +++ b/package.json @@ -1674,7 +1674,6 @@ "babel-plugin-transform-typescript-metadata": "^0.3.2", "backport": "^8.9.8", "blob-polyfill": "^7.0.20220408", - "buffer": "^4.3.0", "buildkite-test-collector": "^1.7.0", "callsites": "^3.1.0", "chance": "1.0.18", @@ -1682,10 +1681,8 @@ "clean-webpack-plugin": "^4.0.0", "cli-progress": "^3.12.0", "cli-table3": "^0.6.1", - "constants-browserify": "^1.0.0", "content-security-policy-parser": "^0.6.0", "cpy": "^8.1.1", - "crypto-browserify": "^3.11.0", "css-loader": "^7.1.2", "cssnano": "^5.1.12", "cssnano-preset-default": "^5.2.12", @@ -1774,12 +1771,11 @@ "mutation-observer": "^1.0.3", "native-hdr-histogram": "^1.0.0", "nock": "12.0.3", + "node-libs-browser": "^2.2.1", "nyc": "^15.1.0", "oboe": "^2.1.4", "openapi-types": "^10.0.0", - "os-browserify": "^0.3.0", "p-reflect": "2.1.0", - "path-browserify": "^0.0.1", "pbf": "3.2.1", "peggy": "^1.2.0", "picomatch": "^2.3.1", @@ -1795,7 +1791,6 @@ "postcss-prefix-selector": "^1.16.0", "postcss-scss": "^4.0.4", "prettier": "^2.8.8", - "process": "^0.11.10", "proxy": "^2.1.1", "react-test-renderer": "^17.0.2", "recast": "^0.23.9", @@ -1810,7 +1805,6 @@ "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.4", - "stream-browserify": "^2.0.1", "string-replace-loader": "^3.1.0", "style-loader": "^4.0.0", "stylelint": "^14.9.1", @@ -1824,7 +1818,6 @@ "tape": "^5.0.1", "terser": "^5.34.1", "terser-webpack-plugin": "^5.3.10", - "timers-browserify": "^2.0.4", "tough-cookie": "^5.0.0", "tree-kill": "^1.2.2", "ts-morph": "^15.1.0", diff --git a/packages/kbn-cypress-config/index.ts b/packages/kbn-cypress-config/index.ts index 722163efd9366..352bb244346fd 100644 --- a/packages/kbn-cypress-config/index.ts +++ b/packages/kbn-cypress-config/index.ts @@ -10,6 +10,8 @@ import { v4 as uuid } from 'uuid'; import { defineConfig } from 'cypress'; import wp from '@cypress/webpack-preprocessor'; +//@ts-expect-error +import nodeLibsBrowser from 'node-libs-browser'; export function defineCypressConfig(options?: Cypress.ConfigOptions) { return defineConfig({ @@ -27,7 +29,7 @@ export function defineCypressConfig(options?: Cypress.ConfigOptions) { resolve: { extensions: ['.ts', '.tsx', '.js'], fallback: { - path: require.resolve('path-browserify'), + path: nodeLibsBrowser.path, }, }, module: { diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index d4f29eaa51c76..87458e585be65 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -11,6 +11,8 @@ import Path from 'path'; import Fs from 'fs'; import webpack from 'webpack'; +//@ts-expect-error +import nodeLibsBrowser from 'node-libs-browser'; import TerserPlugin from 'terser-webpack-plugin'; import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; @@ -86,8 +88,8 @@ export function getWebpackConfig( plugins: [ new webpack.ProvidePlugin({ - Buffer: [require.resolve('buffer/'), 'Buffer'], - process: require.resolve('process/browser'), + Buffer: [nodeLibsBrowser.buffer, 'Buffer'], + process: nodeLibsBrowser.process, }), new CleanWebpackPlugin(), new BundleRemotesPlugin(bundle, bundleRemotes), @@ -314,15 +316,15 @@ export function getWebpackConfig( fs: false, }, fallback: { - buffer: require.resolve('buffer/'), + buffer: nodeLibsBrowser.buffer, child_process: false, - crypto: require.resolve('crypto-browserify'), + crypto: nodeLibsBrowser.crypto, fs: false, - os: require.resolve('os-browserify/browser'), - path: require.resolve('path-browserify'), - process: require.resolve('process/browser'), - stream: require.resolve('stream-browserify'), - timers: require.resolve('timers-browserify'), + os: nodeLibsBrowser.os, + path: nodeLibsBrowser.path, + process: nodeLibsBrowser.process, + stream: nodeLibsBrowser.stream, + timers: nodeLibsBrowser.timers, }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index d8a5ebe64e14d..f9b61627134ff 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -14,6 +14,8 @@ import webpack, { Configuration } from 'webpack'; import { merge as webpackMerge } from 'webpack-merge'; import { REPO_ROOT } from './lib/constants'; import { IgnoreNotFoundExportPlugin } from './ignore_not_found_export_plugin'; +//@ts-expect-error +import nodeLibsBrowser from 'node-libs-browser'; type Preset = string | [string, Record] | Record; @@ -147,9 +149,9 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), }, fallback: { - constants: require.resolve('constants-browserify'), - stream: require.resolve('stream-browserify'), - timers: require.resolve('timers-browserify'), + constants: nodeLibsBrowser.path, + stream: nodeLibsBrowser.path, + timers: nodeLibsBrowser.path, }, }, stats: 'errors-only', diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 5bafc3ddbc277..4203d84e6db6e 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -45,7 +45,6 @@ RUNTIME_DEPS = [ "@npm//@hello-pangea/dnd", "@npm//@tanstack/react-query", "@npm//@tanstack/react-query-devtools", - "@npm//buffer", "@npm//classnames", "@npm//fflate", "@npm//fastest-levenshtein", @@ -53,7 +52,7 @@ RUNTIME_DEPS = [ "@npm//jquery", "@npm//lodash", "@npm//moment-timezone", - "@npm//process", + "@npm//node-libs-browser", "@npm//react-ace", "@npm//react-dom", "@npm//react-router-dom", diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index c8f1e5e138c8c..488afe9fb3f45 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -9,6 +9,8 @@ const Path = require('path'); const webpack = require('webpack'); +//@ts-expect-error +const nodeLibsBrowser = require('node-libs-browser'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -145,10 +147,10 @@ module.exports = (_, argv) => { // mainFields: ['browser', 'main'], // conditionNames: ['require', 'default', 'node', 'module', 'import'], fallback: { - buffer: require.resolve('buffer/'), + buffer: nodeLibsBrowser.buffer, child_process: false, fs: false, - process: require.resolve('process/browser'), + process: nodeLibsBrowser.process, }, }, @@ -168,8 +170,8 @@ module.exports = (_, argv) => { plugins: [ new webpack.ProvidePlugin({ - Buffer: [require.resolve('buffer/'), 'Buffer'], - process: require.resolve('process/browser'), + Buffer: [nodeLibsBrowser.buffer, 'Buffer'], + process: nodeLibsBrowser.process, }), new CleanWebpackPlugin({ protectWebpackAssets: false, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index b23cebd577611..94fd043d3d1bc 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -13,6 +13,8 @@ require('@kbn/babel-register').install(); const Path = require('path'); const webpack = require('webpack'); +//@ts-expect-error +const nodeLibsBrowser = require('node-libs-browser'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const UiSharedDepsNpm = require('@kbn/ui-shared-deps-npm'); @@ -118,10 +120,10 @@ module.exports = { 'scheduler/tracing': 'scheduler/tracing-profiling', }, fallback: { - buffer: require.resolve('buffer/'), + buffer: nodeLibsBrowser.buffer, child_process: false, fs: false, - process: require.resolve('process/browser'), + process: nodeLibsBrowser.process, }, }, @@ -141,8 +143,8 @@ module.exports = { plugins: [ new webpack.ProvidePlugin({ - Buffer: [require.resolve('buffer/'), 'Buffer'], - process: require.resolve('process/browser'), + Buffer: [nodeLibsBrowser.buffer, 'Buffer'], + process: nodeLibsBrowser.process, }), new MiniCssExtractPlugin({ filename: '[name].css', diff --git a/yarn.lock b/yarn.lock index eacb163a836c2..50ff9f7989b1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25472,7 +25472,7 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-browserify@0.0.1, path-browserify@^0.0.1: +path-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== From 8c4a6d45efa7b0698f48f4fa54358c72b3e07e08 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 7 Oct 2024 22:34:29 +0100 Subject: [PATCH 074/157] fix(NA): quick-checks --- packages/kbn-cypress-config/index.ts | 2 +- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- packages/kbn-storybook/src/webpack.config.ts | 4 ++-- packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 +- packages/kbn-ui-shared-deps-src/webpack.config.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/kbn-cypress-config/index.ts b/packages/kbn-cypress-config/index.ts index 352bb244346fd..b66a5de024fb7 100644 --- a/packages/kbn-cypress-config/index.ts +++ b/packages/kbn-cypress-config/index.ts @@ -10,7 +10,7 @@ import { v4 as uuid } from 'uuid'; import { defineConfig } from 'cypress'; import wp from '@cypress/webpack-preprocessor'; -//@ts-expect-error +// @ts-expect-error import nodeLibsBrowser from 'node-libs-browser'; export function defineCypressConfig(options?: Cypress.ConfigOptions) { diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 87458e585be65..63ba299f72bb8 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -11,7 +11,7 @@ import Path from 'path'; import Fs from 'fs'; import webpack from 'webpack'; -//@ts-expect-error +// @ts-expect-error import nodeLibsBrowser from 'node-libs-browser'; import TerserPlugin from 'terser-webpack-plugin'; import { merge as webpackMerge } from 'webpack-merge'; diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index f9b61627134ff..f14998c6784f9 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -12,10 +12,10 @@ import { externals } from '@kbn/ui-shared-deps-src'; import { resolve } from 'path'; import webpack, { Configuration } from 'webpack'; import { merge as webpackMerge } from 'webpack-merge'; +// @ts-expect-error +import nodeLibsBrowser from 'node-libs-browser'; import { REPO_ROOT } from './lib/constants'; import { IgnoreNotFoundExportPlugin } from './ignore_not_found_export_plugin'; -//@ts-expect-error -import nodeLibsBrowser from 'node-libs-browser'; type Preset = string | [string, Record] | Record; diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 488afe9fb3f45..578d4019f7757 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -9,7 +9,7 @@ const Path = require('path'); const webpack = require('webpack'); -//@ts-expect-error +// @ts-expect-error const nodeLibsBrowser = require('node-libs-browser'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 94fd043d3d1bc..7c8d86d2e1a6d 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -13,7 +13,7 @@ require('@kbn/babel-register').install(); const Path = require('path'); const webpack = require('webpack'); -//@ts-expect-error +// @ts-expect-error const nodeLibsBrowser = require('node-libs-browser'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const UiSharedDepsNpm = require('@kbn/ui-shared-deps-npm'); From 84c6eeedf800b998910e6b9b4c75d8cf8e94cf81 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 8 Oct 2024 03:32:00 +0100 Subject: [PATCH 075/157] chore(NA): properly export transient dependencies on dll manifest --- packages/kbn-ui-shared-deps-npm/webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 578d4019f7757..0e6981ac56700 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -185,6 +185,7 @@ module.exports = (_, argv) => { }), new webpack.DllPlugin({ context: REPO_ROOT, + entryOnly: false, path: Path.resolve(outputPath, '[name]-manifest.json'), name: '__kbnSharedDeps_npm__', }), From 37b891d1991c44b28b7a84d0957ac5fc07d934d8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 8 Oct 2024 18:12:20 +0100 Subject: [PATCH 076/157] chore(NA): try to use sideEffects --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 63ba299f72bb8..664b2709ae506 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -409,7 +409,7 @@ export function getWebpackConfig( ], // TODO: try to understand why usedExports is treeShaking code it shouldn't be usedExports: false, - sideEffects: false, + // sideEffects: false, // }, }; From 22748856f20206db0527cf32c63d4b41d5ce5723 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 8 Oct 2024 19:53:02 +0100 Subject: [PATCH 077/157] fix(NA: mute sass warnings again) --- packages/kbn-optimizer/src/worker/webpack.config.ts | 12 ++++++++++++ packages/kbn-storybook/src/webpack.config.ts | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 16121b36b3555..664b2709ae506 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -229,6 +229,18 @@ export function getWebpackConfig( includePaths: [Path.resolve(worker.repoRoot, 'node_modules')], sourceMap: true, quietDeps: true, + logger: { + warn: (message: string, warning: any) => { + // Muted - see https://github.com/elastic/kibana/issues/190345 for tracking remediation + if (warning?.deprecationType?.id === 'mixed-decls') return; + + if (warning.deprecation) + return process.stderr.write( + `DEPRECATION WARNING: ${message}\n${warning.stack}` + ); + process.stderr.write('WARNING: ' + message); + }, + }, }, }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index b9925c5cd96f5..f14998c6784f9 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -120,6 +120,18 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { sassOptions: { includePaths: [resolve(REPO_ROOT, 'node_modules')], quietDeps: true, + logger: { + warn: (message: string, warning: any) => { + // Muted - see https://github.com/elastic/kibana/issues/190345 for tracking remediation + if (warning?.deprecationType?.id === 'mixed-decls') return; + + if (warning.deprecation) + return process.stderr.write( + `DEPRECATION WARNING: ${message}\n${warning.stack}` + ); + process.stderr.write('WARNING: ' + message); + }, + }, }, }, }, From 58dce59545a1b8cf7fc6ab7a57f55e90be3d7db5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 8 Oct 2024 19:53:45 +0100 Subject: [PATCH 078/157] fix(NA): plugin helpers jest integration tests snapshots --- .../kbn-plugin-helpers/src/integration_tests/build.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index 6ee025b0f93b3..4bf8486c45878 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -106,8 +106,8 @@ it('builds a generated plugin into a viable archive', async () => { "kibana/fooTestPlugin/server/plugin.js", "kibana/fooTestPlugin/server/routes/index.js", "kibana/fooTestPlugin/server/types.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.660.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.660.js.br", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.122.js", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.122.js.br", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js.br", "kibana/fooTestPlugin/translations/ja-JP.json", From 56d1e4c3f620408c7e6eaadd0ceeb803fc24cc2a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 8 Oct 2024 20:19:46 +0100 Subject: [PATCH 079/157] fix(NA): revert sass-loader into v10 --- package.json | 2 +- packages/kbn-optimizer/src/worker/webpack.config.ts | 12 ------------ packages/kbn-storybook/src/webpack.config.ts | 12 ------------ .../public/components/doc_viewer_table/table.scss | 2 +- .../public/filter_bar/filter_item/filter_item.scss | 2 +- yarn.lock | 12 ++++++++---- 6 files changed, 11 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index e9dfa1fb1d264..aaf99d9226b51 100644 --- a/package.json +++ b/package.json @@ -1802,7 +1802,7 @@ "resolve": "^1.22.0", "rxjs-marbles": "^7.0.1", "sass-embedded": "^1.78.0", - "sass-loader": "^16.0.1", + "sass-loader": "^10.5.2", "selenium-webdriver": "^4.25.0", "sharp": "0.32.6", "simple-git": "^3.16.0", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 664b2709ae506..16121b36b3555 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -229,18 +229,6 @@ export function getWebpackConfig( includePaths: [Path.resolve(worker.repoRoot, 'node_modules')], sourceMap: true, quietDeps: true, - logger: { - warn: (message: string, warning: any) => { - // Muted - see https://github.com/elastic/kibana/issues/190345 for tracking remediation - if (warning?.deprecationType?.id === 'mixed-decls') return; - - if (warning.deprecation) - return process.stderr.write( - `DEPRECATION WARNING: ${message}\n${warning.stack}` - ); - process.stderr.write('WARNING: ' + message); - }, - }, }, }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index f14998c6784f9..b9925c5cd96f5 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -120,18 +120,6 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { sassOptions: { includePaths: [resolve(REPO_ROOT, 'node_modules')], quietDeps: true, - logger: { - warn: (message: string, warning: any) => { - // Muted - see https://github.com/elastic/kibana/issues/190345 for tracking remediation - if (warning?.deprecationType?.id === 'mixed-decls') return; - - if (warning.deprecation) - return process.stderr.write( - `DEPRECATION WARNING: ${message}\n${warning.stack}` - ); - process.stderr.write('WARNING: ' + message); - }, - }, }, }, }, diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss index 19d556b0b142a..64e700c73fca5 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss @@ -90,7 +90,7 @@ } & [data-gridcell-column-id='pin_field'] .euiDataGridRowCell__content { - padding: $euiSizeXS / 2 0 0 $euiSizeXS; + padding: calc($euiSizeXS / 2) 0 0 $euiSizeXS; } .kbnDocViewer__fieldsGrid__pinAction { diff --git a/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.scss b/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.scss index 7a14dd3a64ef3..85c5b6bb9278f 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.scss +++ b/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.scss @@ -7,7 +7,7 @@ .globalFilterItem { line-height: $euiSize; color: $euiTextColor; - padding-block: $euiSizeM / 2; + padding-block: calc($euiSizeM / 2); white-space: normal; /* 1 */ &:not(.globalFilterItem-isDisabled) { diff --git a/yarn.lock b/yarn.lock index c30f92f7eaf17..908a881600ba8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28754,12 +28754,16 @@ sass-embedded@^1.78.0: sass-embedded-win32-ia32 "1.78.0" sass-embedded-win32-x64 "1.78.0" -sass-loader@^16.0.1: - version "16.0.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.1.tgz#57049c1787076e923b21a1dccc612546ecaf4295" - integrity sha512-xACl1ToTsKnL9Ce5yYpRxrLj9QUDCnwZNhzpC7tKiFyA8zXsd3Ap+HGVnbCgkdQcm43E+i6oKAWBsvGA6ZoiMw== +sass-loader@^10.5.2: + version "10.5.2" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.5.2.tgz#1ca30534fff296417b853c7597ca3b0bbe8c37d0" + integrity sha512-vMUoSNOUKJILHpcNCCyD23X34gve1TS7Rjd9uXHeKqhvBG39x6XbswFDtpbTElj6XdMFezoWhkh5vtKudf2cgQ== dependencies: + klona "^2.0.4" + loader-utils "^2.0.0" neo-async "^2.6.2" + schema-utils "^3.0.0" + semver "^7.3.2" sass-lookup@^5.0.1: version "5.0.1" From 93432453dc1c5da910cbf9b0803ea36f497d991b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 9 Oct 2024 05:23:21 +0100 Subject: [PATCH 080/157] chore(NA): disable usedExports on ui-shared-deps builds --- packages/kbn-ui-shared-deps-npm/webpack.config.js | 1 + packages/kbn-ui-shared-deps-src/webpack.config.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 0e6981ac56700..3bbe4e47ab4e6 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -159,6 +159,7 @@ module.exports = (_, argv) => { chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, + usedExports: false, }, performance: { diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 7c8d86d2e1a6d..248aea20a2d37 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -132,6 +132,7 @@ module.exports = { chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, + usedExports: false, }, performance: { From ee7a6f35ff35b847dc6fae5df8edb145bd12f1cd Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 9 Oct 2024 05:47:00 +0100 Subject: [PATCH 081/157] fix(NA): polyfill resolution on bundles --- package.json | 2 - packages/kbn-ui-shared-deps-npm/BUILD.bazel | 1 - packages/kbn-ui-shared-deps-src/BUILD.bazel | 1 - yarn.lock | 45 ++++++++------------- 4 files changed, 16 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index aaf99d9226b51..de974a7979ebc 100644 --- a/package.json +++ b/package.json @@ -1827,8 +1827,6 @@ "ts-morph": "^15.1.0", "tsd": "^0.31.1", "typescript": "5.1.6", - "url": "^0.11.4", - "util": "^0.12.5", "val-loader": "^6.0.0", "vinyl-fs": "^4.0.0", "watchpack": "^1.6.0", diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 4203d84e6db6e..865504d583399 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -62,7 +62,6 @@ RUNTIME_DEPS = [ "@npm//rxjs", "@npm//styled-components", "@npm//tslib", - "@npm//util", "@npm//uuid", "@npm//io-ts", "@npm//@reduxjs/toolkit", diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index d13421f8b2f03..88aaa29bb350b 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -15,7 +15,6 @@ webpack_cli( "@npm//moment", "@npm//babel-loader", "@npm//css-loader", - "@npm//url", "@npm//@babel/plugin-transform-numeric-separator", "//packages/kbn-ui-shared-deps-npm", "//packages/kbn-babel-register", diff --git a/yarn.lock b/yarn.lock index 908a881600ba8..6a59900e76dd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20829,13 +20829,6 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.0.0.tgz#038c31b774709641bda678b1f06a4e3227c10b3e" integrity sha512-elzyIdM7iKoFHzcrndIqjYomImhxrFRnGP3galODoII4TB9gI7mZ+FnlLQmmjf27SxHS2gKEeyhX5/+YRS6H9g== -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - is-glob@^3.0.0, is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -21103,7 +21096,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.1" -is-typed-array@^1.1.13, is-typed-array@^1.1.3: +is-typed-array@^1.1.13: version "1.1.13" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== @@ -26763,7 +26756,12 @@ punycode.js@^2.3.1: resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== -punycode@^1.2.4, punycode@^1.4.1: +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -26809,7 +26807,7 @@ qs@6.10.4: dependencies: side-channel "^1.0.4" -qs@6.13.0, qs@^6.10.0, qs@^6.11.0, qs@^6.12.3, qs@^6.7.0: +qs@6.13.0, qs@^6.10.0, qs@^6.11.0, qs@^6.7.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== @@ -26830,7 +26828,7 @@ querystring-es3@^0.2.0: resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= -querystring@^0.2.0: +querystring@0.2.0, querystring@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= @@ -31834,13 +31832,13 @@ url-template@^2.0.8: resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" integrity sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw== -url@^0.11.0, url@^0.11.4: - version "0.11.4" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.4.tgz#adca77b3562d56b72746e76b330b7f27b6721f3c" - integrity sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg== +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= dependencies: - punycode "^1.4.1" - qs "^6.12.3" + punycode "1.3.2" + querystring "0.2.0" urlpattern-polyfill@10.0.0: version "10.0.0" @@ -31930,17 +31928,6 @@ util@^0.11.0: dependencies: inherits "2.0.3" -util@^0.12.5: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" @@ -32990,7 +32977,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: +which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== From 0a235155d85640532d893c5486c4203f2157362e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 9 Oct 2024 17:41:36 +0100 Subject: [PATCH 082/157] fix(NA): remove usedExports from ui-shared-deps --- packages/kbn-ui-shared-deps-npm/webpack.config.js | 1 - packages/kbn-ui-shared-deps-src/webpack.config.js | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 3bbe4e47ab4e6..0e6981ac56700 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -159,7 +159,6 @@ module.exports = (_, argv) => { chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, - usedExports: false, }, performance: { diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 248aea20a2d37..7c8d86d2e1a6d 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -132,7 +132,6 @@ module.exports = { chunkIds: process.env.NODE_ENV === 'production' ? 'deterministic' : 'natural', minimize: false, emitOnErrors: false, - usedExports: false, }, performance: { From 3b1b64616e67526d399fe9fea29ec601ba4b7abe Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 9 Oct 2024 20:14:42 +0100 Subject: [PATCH 083/157] chore(NA): add libs-browser-webpack-polyfill and mainFields,conditionNames --- package.json | 1 + packages/kbn-cypress-config/index.ts | 7 +- packages/kbn-monaco/BUILD.bazel | 1 + packages/kbn-monaco/webpack.config.js | 2 + .../BUILD.bazel | 40 ++++++++++ .../README.md | 3 + .../index.js | 74 +++++++++++++++++++ .../jest.config.js | 14 ++++ .../kibana.jsonc | 5 ++ .../package.json | 7 ++ .../tsconfig.json | 18 +++++ .../src/worker/webpack.config.ts | 24 ++---- packages/kbn-storybook/src/webpack.config.ts | 10 +-- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 1 + .../kbn-ui-shared-deps-npm/webpack.config.js | 18 +---- .../kbn-ui-shared-deps-src/webpack.config.js | 18 +---- tsconfig.base.json | 2 + yarn.lock | 10 ++- 18 files changed, 192 insertions(+), 63 deletions(-) create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/BUILD.bazel create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/README.md create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/index.js create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/jest.config.js create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/kibana.jsonc create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/package.json create mode 100644 packages/kbn-node-libs-browser-webpack-plugin/tsconfig.json diff --git a/package.json b/package.json index de974a7979ebc..dfcc23f61d6ec 100644 --- a/package.json +++ b/package.json @@ -676,6 +676,7 @@ "@kbn/newsfeed-plugin": "link:src/plugins/newsfeed", "@kbn/newsfeed-test-plugin": "link:test/common/plugins/newsfeed", "@kbn/no-data-page-plugin": "link:src/plugins/no_data_page", + "@kbn/node-libs-browser-webpack-plugin": "link:packages/kbn-node-libs-browser-webpack-plugin", "@kbn/notifications-plugin": "link:x-pack/plugins/notifications", "@kbn/object-versioning": "link:packages/kbn-object-versioning", "@kbn/object-versioning-utils": "link:packages/kbn-object-versioning-utils", diff --git a/packages/kbn-cypress-config/index.ts b/packages/kbn-cypress-config/index.ts index b66a5de024fb7..425f9d4fced3f 100644 --- a/packages/kbn-cypress-config/index.ts +++ b/packages/kbn-cypress-config/index.ts @@ -10,8 +10,7 @@ import { v4 as uuid } from 'uuid'; import { defineConfig } from 'cypress'; import wp from '@cypress/webpack-preprocessor'; -// @ts-expect-error -import nodeLibsBrowser from 'node-libs-browser'; +import { NodeLibsBrowserPlugin } from '@kbn/node-libs-browser-webpack-plugin'; export function defineCypressConfig(options?: Cypress.ConfigOptions) { return defineConfig({ @@ -28,9 +27,6 @@ export function defineCypressConfig(options?: Cypress.ConfigOptions) { webpackOptions: { resolve: { extensions: ['.ts', '.tsx', '.js'], - fallback: { - path: nodeLibsBrowser.path, - }, }, module: { rules: [ @@ -48,6 +44,7 @@ export function defineCypressConfig(options?: Cypress.ConfigOptions) { }, ], }, + plugins: [new NodeLibsBrowserPlugin()], }, })(file); }); diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 9b15dbd024cc4..90e29761dbbf6 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -28,6 +28,7 @@ SHARED_DEPS = [ "//packages/kbn-ui-theme", "//packages/kbn-esql-validation-autocomplete", "//packages/kbn-esql-ast", + "//packages/kbn-node-libs-browser-webpack-plugin", "@npm//antlr4", "@npm//monaco-editor", "@npm//monaco-yaml", diff --git a/packages/kbn-monaco/webpack.config.js b/packages/kbn-monaco/webpack.config.js index e543e6be96d18..2f4914bd49e85 100644 --- a/packages/kbn-monaco/webpack.config.js +++ b/packages/kbn-monaco/webpack.config.js @@ -8,6 +8,7 @@ */ const path = require('path'); +const { NodeLibsBrowserPlugin } = require('@kbn/node-libs-browser-webpack-plugin'); const getWorkerEntry = (language) => { switch (language) { @@ -47,6 +48,7 @@ const workerConfig = (languages) => ({ buffer: require.resolve('buffer'), }, }, + plugins: [new NodeLibsBrowserPlugin()], stats: 'errors-only', module: { rules: [ diff --git a/packages/kbn-node-libs-browser-webpack-plugin/BUILD.bazel b/packages/kbn-node-libs-browser-webpack-plugin/BUILD.bazel new file mode 100644 index 0000000000000..b01c5a4c56766 --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/BUILD.bazel @@ -0,0 +1,40 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "pkg_npm", "ts_project") + +SRCS = glob( + [ + "**/*.js", + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +BUNDLER_DEPS = [ + "@npm//node-libs-browser", +] + +filegroup( + name = 'root_pkg_json', + srcs = ["//:package.json"] +) + +js_library( + name = "kbn-node-libs-browser-webpack-plugin", + package_name = "@kbn/node-libs-browser-webpack-plugin", + srcs = ["package.json"] + SRCS, + deps = BUNDLER_DEPS, + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-node-libs-browser-webpack-plugin/README.md b/packages/kbn-node-libs-browser-webpack-plugin/README.md new file mode 100644 index 0000000000000..97a3a76998a97 --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/README.md @@ -0,0 +1,3 @@ +# @kbn/node-libs-browser-webpack-plugin + +Empty package generated by @kbn/generate diff --git a/packages/kbn-node-libs-browser-webpack-plugin/index.js b/packages/kbn-node-libs-browser-webpack-plugin/index.js new file mode 100644 index 0000000000000..578ebec6183cb --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/index.js @@ -0,0 +1,74 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +/** @typedef {import('webpack').Compiler} WebpackCompiler */ + +// @ts-expect-error +const nodeLibsBrowser = require('node-libs-browser'); + +const NodeLibsBrowserPlugin = class NodeLibsBrowserPlugin { + /** + * @param {WebpackCompiler} compiler + */ + apply(compiler) { + compiler.options.plugins.push( + new compiler.webpack.ProvidePlugin({ + Buffer: [nodeLibsBrowser.buffer, 'Buffer'], + console: nodeLibsBrowser.console, + process: nodeLibsBrowser.process, + }) + ); + + compiler.options.resolve.fallback = { + assert: nodeLibsBrowser.assert, + buffer: nodeLibsBrowser.buffer, + child_process: false, + cluster: false, + console: nodeLibsBrowser.console, + constants: nodeLibsBrowser.constants, + crypto: nodeLibsBrowser.crypto, + dgram: false, + dns: false, + domain: nodeLibsBrowser.domain, + events: nodeLibsBrowser.events, + fs: false, + http: nodeLibsBrowser.http, + https: nodeLibsBrowser.https, + module: false, + net: false, + os: nodeLibsBrowser.os, + path: nodeLibsBrowser.path, + punycode: nodeLibsBrowser.punycode, + process: nodeLibsBrowser.process, + querystring: nodeLibsBrowser.querystring, + readline: false, + repl: false, + stream: nodeLibsBrowser.stream, + _stream_duplex: nodeLibsBrowser._stream_duplex, + _stream_passthrough: nodeLibsBrowser._stream_passthrough, + _stream_readable: nodeLibsBrowser._stream_readable, + _stream_transform: nodeLibsBrowser._stream_transform, + _stream_writable: nodeLibsBrowser._stream_writable, + string_decoder: nodeLibsBrowser.string_decoder, + sys: nodeLibsBrowser.sys, + timers: nodeLibsBrowser.timers, + tls: false, + tty: nodeLibsBrowser.tty, + url: nodeLibsBrowser.url, + util: nodeLibsBrowser.util, + vm: nodeLibsBrowser.vm, + zlib: nodeLibsBrowser.zlib, + ...compiler.options.resolve.fallback, + }; + } +}; + +module.exports = { + NodeLibsBrowserPlugin, +}; diff --git a/packages/kbn-node-libs-browser-webpack-plugin/jest.config.js b/packages/kbn-node-libs-browser-webpack-plugin/jest.config.js new file mode 100644 index 0000000000000..839f7a449020f --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/jest.config.js @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-node-libs-browser-webpack-plugin'], +}; diff --git a/packages/kbn-node-libs-browser-webpack-plugin/kibana.jsonc b/packages/kbn-node-libs-browser-webpack-plugin/kibana.jsonc new file mode 100644 index 0000000000000..69acaf05df176 --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/node-libs-browser-webpack-plugin", + "owner": "@elastic/kibana-operations" +} diff --git a/packages/kbn-node-libs-browser-webpack-plugin/package.json b/packages/kbn-node-libs-browser-webpack-plugin/package.json new file mode 100644 index 0000000000000..bee6eb1db67de --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/node-libs-browser-webpack-plugin", + "devOnly": true, + "private": true, + "version": "1.0.0", + "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0" +} diff --git a/packages/kbn-node-libs-browser-webpack-plugin/tsconfig.json b/packages/kbn-node-libs-browser-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000000..3bbf05e134ce1 --- /dev/null +++ b/packages/kbn-node-libs-browser-webpack-plugin/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "checkJs": true, + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "index.js", + "types.ts" + ], + "exclude": [ + "target/**/*", + ] +} diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 16121b36b3555..d1496929c9d89 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -11,8 +11,6 @@ import Path from 'path'; import Fs from 'fs'; import webpack from 'webpack'; -// @ts-expect-error -import nodeLibsBrowser from 'node-libs-browser'; import TerserPlugin from 'terser-webpack-plugin'; import { merge as webpackMerge } from 'webpack-merge'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; @@ -24,6 +22,7 @@ import { STATS_WARNINGS_FILTER, STATS_OPTIONS_DEFAULT_USEFUL_FILTER, } from '@kbn/optimizer-webpack-helpers'; +import { NodeLibsBrowserPlugin } from '@kbn/node-libs-browser-webpack-plugin'; import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common'; import { BundleRemotesPlugin } from './bundle_remotes_plugin'; @@ -68,6 +67,7 @@ export function getWebpackConfig( }, optimization: { + avoidEntryIife: true, moduleIds: worker.dist ? 'deterministic' : 'natural', chunkIds: worker.dist ? 'deterministic' : 'natural', emitOnErrors: false, @@ -87,10 +87,7 @@ export function getWebpackConfig( }, plugins: [ - new webpack.ProvidePlugin({ - Buffer: [nodeLibsBrowser.buffer, 'Buffer'], - process: nodeLibsBrowser.process, - }), + new NodeLibsBrowserPlugin(), new CleanWebpackPlugin(), new BundleRemotesPlugin(bundle, bundleRemotes), new PopulateBundleCachePlugin(worker, bundle, parseDllManifest(DLL_MANIFEST)), @@ -292,8 +289,8 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], - mainFields: ['browser', 'main'], - // conditionNames: ['require', 'default', 'node', 'module', 'import'], + mainFields: ['browser', 'main', 'module'], + conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { core_app_image_assets: Path.resolve( worker.repoRoot, @@ -303,17 +300,6 @@ export function getWebpackConfig( child_process: false, fs: false, }, - fallback: { - buffer: nodeLibsBrowser.buffer, - child_process: false, - crypto: nodeLibsBrowser.crypto, - fs: false, - os: nodeLibsBrowser.os, - path: nodeLibsBrowser.path, - process: nodeLibsBrowser.process, - stream: nodeLibsBrowser.stream, - timers: nodeLibsBrowser.timers, - }, }, performance: { diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index b9925c5cd96f5..347476332ec12 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -12,8 +12,7 @@ import { externals } from '@kbn/ui-shared-deps-src'; import { resolve } from 'path'; import webpack, { Configuration } from 'webpack'; import { merge as webpackMerge } from 'webpack-merge'; -// @ts-expect-error -import nodeLibsBrowser from 'node-libs-browser'; +import { NodeLibsBrowserPlugin } from '@kbn/node-libs-browser-webpack-plugin'; import { REPO_ROOT } from './lib/constants'; import { IgnoreNotFoundExportPlugin } from './ignore_not_found_export_plugin'; @@ -127,7 +126,7 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { }, ], }, - plugins: [new IgnoreNotFoundExportPlugin()], + plugins: [new NodeLibsBrowserPlugin(), new IgnoreNotFoundExportPlugin()], resolve: { extensions: ['.js', '.ts', '.tsx', '.json', '.mdx'], mainFields: ['browser', 'main'], @@ -136,11 +135,6 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { core_styles: resolve(REPO_ROOT, 'src/core/public/index.scss'), vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), }, - fallback: { - constants: nodeLibsBrowser.path, - stream: nodeLibsBrowser.path, - timers: nodeLibsBrowser.path, - }, }, stats: 'errors-only', }; diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 865504d583399..b4b8da5106ec2 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -27,6 +27,7 @@ RUNTIME_DEPS = [ "@npm//babel-loader", "@npm//@babel/plugin-proposal-optional-chaining", "@npm//val-loader", + "//packages/kbn-node-libs-browser-webpack-plugin", "//packages/kbn-repo-info", # deps in the dll need to be included in the sandbox for consumers # of this DLL (ui-shared-deps-src) because webpack won't actually diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 0e6981ac56700..9e294943488aa 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -9,8 +9,7 @@ const Path = require('path'); const webpack = require('webpack'); -// @ts-expect-error -const nodeLibsBrowser = require('node-libs-browser'); +const { NodeLibsBrowserPlugin } = require('@kbn/node-libs-browser-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -144,14 +143,8 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], - // mainFields: ['browser', 'main'], - // conditionNames: ['require', 'default', 'node', 'module', 'import'], - fallback: { - buffer: nodeLibsBrowser.buffer, - child_process: false, - fs: false, - process: nodeLibsBrowser.process, - }, + mainFields: ['browser', 'main', 'module'], + conditionNames: ['require', 'node', 'module', 'import', 'default'], }, optimization: { @@ -169,10 +162,7 @@ module.exports = (_, argv) => { }, plugins: [ - new webpack.ProvidePlugin({ - Buffer: [nodeLibsBrowser.buffer, 'Buffer'], - process: nodeLibsBrowser.process, - }), + new NodeLibsBrowserPlugin(), new CleanWebpackPlugin({ protectWebpackAssets: false, cleanAfterEveryBuildPatterns: [ diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 7c8d86d2e1a6d..f1f7b72c48711 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -13,8 +13,7 @@ require('@kbn/babel-register').install(); const Path = require('path'); const webpack = require('webpack'); -// @ts-expect-error -const nodeLibsBrowser = require('node-libs-browser'); +const { NodeLibsBrowserPlugin } = require('@kbn/node-libs-browser-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const UiSharedDepsNpm = require('@kbn/ui-shared-deps-npm'); @@ -109,8 +108,8 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], - // mainFields: ['browser', 'main'], - // conditionNames: ['require', 'default', 'node', 'module', 'import'], + mainFields: ['browser', 'main', 'module'], + conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', moment: MOMENT_SRC, @@ -119,12 +118,6 @@ module.exports = { 'react-dom$': 'react-dom/profiling', 'scheduler/tracing': 'scheduler/tracing-profiling', }, - fallback: { - buffer: nodeLibsBrowser.buffer, - child_process: false, - fs: false, - process: nodeLibsBrowser.process, - }, }, optimization: { @@ -142,10 +135,7 @@ module.exports = { }, plugins: [ - new webpack.ProvidePlugin({ - Buffer: [nodeLibsBrowser.buffer, 'Buffer'], - process: nodeLibsBrowser.process, - }), + new NodeLibsBrowserPlugin(), new MiniCssExtractPlugin({ filename: '[name].css', }), diff --git a/tsconfig.base.json b/tsconfig.base.json index 3df30d9cf8c30..1d986250901e4 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1274,6 +1274,8 @@ "@kbn/newsfeed-test-plugin/*": ["test/common/plugins/newsfeed/*"], "@kbn/no-data-page-plugin": ["src/plugins/no_data_page"], "@kbn/no-data-page-plugin/*": ["src/plugins/no_data_page/*"], + "@kbn/node-libs-browser-webpack-plugin": ["packages/kbn-node-libs-browser-webpack-plugin"], + "@kbn/node-libs-browser-webpack-plugin/*": ["packages/kbn-node-libs-browser-webpack-plugin/*"], "@kbn/notifications-plugin": ["x-pack/plugins/notifications"], "@kbn/notifications-plugin/*": ["x-pack/plugins/notifications/*"], "@kbn/object-versioning": ["packages/kbn-object-versioning"], diff --git a/yarn.lock b/yarn.lock index 6a59900e76dd6..d804730aa7766 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5851,6 +5851,10 @@ version "0.0.0" uid "" +"@kbn/node-libs-browser-webpack-plugin@link:packages/kbn-node-libs-browser-webpack-plugin": + version "0.0.0" + uid "" + "@kbn/notifications-plugin@link:x-pack/plugins/notifications": version "0.0.0" uid "" @@ -26767,9 +26771,9 @@ punycode@^1.2.4: integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= punycode@^2.1.0, punycode@^2.1.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== puppeteer-core@23.3.1: version "23.3.1" From 9754a0b7d608385868eb5a18ec473203c1a02f15 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 9 Oct 2024 19:25:49 +0000 Subject: [PATCH 084/157] [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs' --- .github/CODEOWNERS | 1 + packages/kbn-cypress-config/tsconfig.json | 4 +++- packages/kbn-optimizer/tsconfig.json | 1 + packages/kbn-storybook/tsconfig.json | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d4c8f52704e96..b6739e6a41f89 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -640,6 +640,7 @@ src/plugins/navigation @elastic/appex-sharedux src/plugins/newsfeed @elastic/kibana-core test/common/plugins/newsfeed @elastic/kibana-core src/plugins/no_data_page @elastic/appex-sharedux +packages/kbn-node-libs-browser-webpack-plugin @elastic/kibana-operations x-pack/plugins/notifications @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux packages/kbn-object-versioning-utils @elastic/appex-sharedux diff --git a/packages/kbn-cypress-config/tsconfig.json b/packages/kbn-cypress-config/tsconfig.json index 2f9ddddbeea23..4a36f2ecdf6a5 100644 --- a/packages/kbn-cypress-config/tsconfig.json +++ b/packages/kbn-cypress-config/tsconfig.json @@ -13,5 +13,7 @@ "exclude": [ "target/**/*" ], - "kbn_references": [] + "kbn_references": [ + "@kbn/node-libs-browser-webpack-plugin", + ] } diff --git a/packages/kbn-optimizer/tsconfig.json b/packages/kbn-optimizer/tsconfig.json index f8cb993537be7..dd7d881433119 100644 --- a/packages/kbn-optimizer/tsconfig.json +++ b/packages/kbn-optimizer/tsconfig.json @@ -29,5 +29,6 @@ "@kbn/dev-cli-runner", "@kbn/jest-serializers", "@kbn/repo-packages", + "@kbn/node-libs-browser-webpack-plugin", ] } diff --git a/packages/kbn-storybook/tsconfig.json b/packages/kbn-storybook/tsconfig.json index ab513c1d02c0c..8f120043dc5d7 100644 --- a/packages/kbn-storybook/tsconfig.json +++ b/packages/kbn-storybook/tsconfig.json @@ -22,6 +22,7 @@ "@kbn/core-i18n-browser", "@kbn/react-kibana-context-root", "@kbn/core-analytics-browser", + "@kbn/node-libs-browser-webpack-plugin", ], "exclude": [ "target/**/*", From aaff027118f52296509629de3f0326a25c53258f Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 9 Oct 2024 20:26:00 +0100 Subject: [PATCH 085/157] fix(NA): remove avoid iife option from optimize --- packages/kbn-optimizer/src/worker/webpack.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index d1496929c9d89..57c330b36199c 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -67,7 +67,6 @@ export function getWebpackConfig( }, optimization: { - avoidEntryIife: true, moduleIds: worker.dist ? 'deterministic' : 'natural', chunkIds: worker.dist ? 'deterministic' : 'natural', emitOnErrors: false, From 1568ef86a7a41f9af0316934cb49304d6bfff6da Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 9 Oct 2024 21:43:27 +0100 Subject: [PATCH 086/157] fix(NA): stop setting conditionNames --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 2 +- packages/kbn-ui-shared-deps-src/webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 57c330b36199c..846adf3a619c0 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -289,7 +289,7 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], mainFields: ['browser', 'main', 'module'], - conditionNames: ['require', 'node', 'module', 'import', 'default'], + // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { core_app_image_assets: Path.resolve( worker.repoRoot, diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 9e294943488aa..8e2b37b185461 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -144,7 +144,7 @@ module.exports = (_, argv) => { }, extensions: ['.js', '.ts'], mainFields: ['browser', 'main', 'module'], - conditionNames: ['require', 'node', 'module', 'import', 'default'], + // conditionNames: ['require', 'node', 'module', 'import', 'default'], }, optimization: { diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index f1f7b72c48711..c704f452e9fa7 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -109,7 +109,7 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], mainFields: ['browser', 'main', 'module'], - conditionNames: ['require', 'node', 'module', 'import', 'default'], + // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', moment: MOMENT_SRC, From ab6dacd13e40339a8eff2dde4c6ebb882971ea84 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 10 Oct 2024 08:21:16 +0100 Subject: [PATCH 087/157] chore(NA): update resolutions on ui-shared-deps --- packages/kbn-ui-shared-deps-npm/webpack.config.js | 6 ++++-- packages/kbn-ui-shared-deps-src/webpack.config.js | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 8e2b37b185461..35834cdd1f4c8 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -143,8 +143,10 @@ module.exports = (_, argv) => { 'scheduler/tracing': 'scheduler/tracing-profiling', }, extensions: ['.js', '.ts'], - mainFields: ['browser', 'main', 'module'], - // conditionNames: ['require', 'node', 'module', 'import', 'default'], + mainFields: ['browser', 'module', 'main'], + conditionNames: ['browser', 'module', 'import', 'require', 'default'], + // mainFields: ['browser', 'main', 'module'], + // // conditionNames: ['require', 'node', 'module', 'import', 'default'], }, optimization: { diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index c704f452e9fa7..fab18fdba0fc8 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -108,8 +108,11 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], - mainFields: ['browser', 'main', 'module'], - // conditionNames: ['require', 'node', 'module', 'import', 'default'], + // mainFields: ['browser', 'main', 'module'], + mainFields: ['browser', 'module', 'main'], + conditionNames: ['browser', 'module', 'import', 'require', 'default'], + // mainFields: ['browser', 'main', 'module'], + // // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', moment: MOMENT_SRC, From 189f21c0b9f0e019f94b11ebfef4a9079c5b91c3 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 10 Oct 2024 08:26:06 +0100 Subject: [PATCH 088/157] chore(NA): clean unused code on webpack configs --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 -- packages/kbn-ui-shared-deps-src/webpack.config.js | 1 - 2 files changed, 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 846adf3a619c0..ce5e4ca3ecf4b 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -296,8 +296,6 @@ export function getWebpackConfig( 'src/core/public/styles/core_app/images' ), vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'), - child_process: false, - fs: false, }, }, diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index fab18fdba0fc8..60cc7db522147 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -108,7 +108,6 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'], - // mainFields: ['browser', 'main', 'module'], mainFields: ['browser', 'module', 'main'], conditionNames: ['browser', 'module', 'import', 'require', 'default'], // mainFields: ['browser', 'main', 'module'], From 62fe582da81b62b2dcc64f6ab08bb7bb9a3d3163 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 10 Oct 2024 08:54:36 +0100 Subject: [PATCH 089/157] fix(NA): eslint at packages/kbn-node-libs-browser-webpack-plugin/index.js --- packages/kbn-node-libs-browser-webpack-plugin/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/kbn-node-libs-browser-webpack-plugin/index.js b/packages/kbn-node-libs-browser-webpack-plugin/index.js index 578ebec6183cb..351c62d8acf51 100644 --- a/packages/kbn-node-libs-browser-webpack-plugin/index.js +++ b/packages/kbn-node-libs-browser-webpack-plugin/index.js @@ -9,6 +9,7 @@ /** @typedef {import('webpack').Compiler} WebpackCompiler */ +/* eslint-disable import/no-extraneous-dependencies */ // @ts-expect-error const nodeLibsBrowser = require('node-libs-browser'); From 7945db79b88bed890d4d85e056525793c6892805 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 10 Oct 2024 15:54:38 +0100 Subject: [PATCH 090/157] fix(NA): add same mainField resolution to worker webpack config --- packages/kbn-optimizer/src/worker/webpack.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index ce5e4ca3ecf4b..90193084c7d49 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -288,8 +288,11 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], - mainFields: ['browser', 'main', 'module'], - // conditionNames: ['require', 'node', 'module', 'import', 'default'], + mainFields: ['browser', 'module', 'main'], + conditionNames: ['browser', 'module', 'import', 'require', 'default'], + // + // mainFields: ['browser', 'main', 'module'], + // // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { core_app_image_assets: Path.resolve( worker.repoRoot, From 54f1462c20813fb03df0d80b447879901bef581c Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 10 Oct 2024 18:43:29 +0100 Subject: [PATCH 091/157] fix(NA): remove conditionNames from worker config --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 90193084c7d49..1f3b3f27e31f7 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -289,7 +289,7 @@ export function getWebpackConfig( resolve: { extensions: ['.js', '.ts', '.tsx', '.json'], mainFields: ['browser', 'module', 'main'], - conditionNames: ['browser', 'module', 'import', 'require', 'default'], + // conditionNames: ['browser', 'module', 'import', 'require', 'default'], // // mainFields: ['browser', 'main', 'module'], // // conditionNames: ['require', 'node', 'module', 'import', 'default'], From 18855571a8ca10abd67ec6b298ea49ead7c3d18e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 04:35:12 +0100 Subject: [PATCH 092/157] fix(NA): being able to prioritize module on mainFields over main --- package.json | 3 ++- packages/kbn-babel-preset/BUILD.bazel | 1 + packages/kbn-babel-preset/webpack_preset.js | 19 +++++++++++++- .../src/worker/webpack.config.ts | 25 ++++++++++--------- yarn.lock | 5 ++++ 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index dfcc23f61d6ec..399473aa1d43e 100644 --- a/package.json +++ b/package.json @@ -1676,6 +1676,7 @@ "babel-plugin-require-context-hook": "^1.0.0", "babel-plugin-styled-components": "^2.1.4", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", + "babel-plugin-transform-require-default": "^0.1.7", "babel-plugin-transform-typescript-metadata": "^0.3.2", "backport": "^8.9.8", "blob-polyfill": "^7.0.20220408", @@ -1845,4 +1846,4 @@ "zod-to-json-schema": "^3.23.0" }, "packageManager": "yarn@1.22.21" -} \ No newline at end of file +} diff --git a/packages/kbn-babel-preset/BUILD.bazel b/packages/kbn-babel-preset/BUILD.bazel index 37a07ed15d77f..32e642d5742d5 100644 --- a/packages/kbn-babel-preset/BUILD.bazel +++ b/packages/kbn-babel-preset/BUILD.bazel @@ -41,6 +41,7 @@ RUNTIME_DEPS = [ "@npm//babel-plugin-styled-components", "@npm//babel-plugin-transform-react-remove-prop-types", "@npm//babel-plugin-transform-typescript-metadata", + "@npm//babel-plugin-transform-require-default", ] js_library( diff --git a/packages/kbn-babel-preset/webpack_preset.js b/packages/kbn-babel-preset/webpack_preset.js index 78a1b23232287..143026ed37bba 100644 --- a/packages/kbn-babel-preset/webpack_preset.js +++ b/packages/kbn-babel-preset/webpack_preset.js @@ -10,7 +10,12 @@ const { USES_STYLED_COMPONENTS } = require('./styled_components_files'); /** @type {import('@babel/core').ConfigFunction} */ -module.exports = (api, options = {}) => { +module.exports = ( + api, + options = { + useTransformRequireDefault: false, + } +) => { return { presets: [ [ @@ -27,6 +32,18 @@ module.exports = (api, options = {}) => { ], [require('./common_preset'), options], ], + plugins: [ + // Conditionally include babel-plugin-transform-require-default + // + // We need to include this plugin in the main worker webpack config that handles our + // non node modules code base in order to support resolving esm + // as a priority over cjs (if that's defined in the mainFields). Without that we might run into + // cases where we have a repo wide cjs code that requires an esm module (coming from the ui-shared-deps that also prioritizes esm) + // which will not be applying the .default key in the require itself. + ...(options.useTransformRequireDefault + ? [require.resolve('babel-plugin-transform-require-default')] + : []), + ], env: { production: { plugins: [ diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 1f3b3f27e31f7..92f3751189d57 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -248,7 +248,7 @@ export function getWebpackConfig( options: { babelrc: false, envName: worker.dist ? 'production' : 'development', - presets: [BABEL_PRESET], + presets: [[BABEL_PRESET, { useTransformRequireDefault: true }]], }, }, }, @@ -370,17 +370,18 @@ export function getWebpackConfig( ], optimization: { - minimizer: [ - new TerserPlugin({ - extractComments: false, - parallel: false, - terserOptions: { - compress: { passes: 2 }, - keep_classnames: true, - mangle: true, - }, - }), - ], + minimize: false, + // minimizer: [ + // new TerserPlugin({ + // extractComments: false, + // parallel: false, + // terserOptions: { + // compress: { passes: 2 }, + // keep_classnames: true, + // mangle: true, + // }, + // }), + // ], // TODO: try to understand why usedExports is treeShaking code it shouldn't be usedExports: false, // sideEffects: false, diff --git a/yarn.lock b/yarn.lock index d804730aa7766..51957ca909db8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13321,6 +13321,11 @@ babel-plugin-transform-react-remove-prop-types@^0.4.24: resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a" integrity sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA== +babel-plugin-transform-require-default@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-require-default/-/babel-plugin-transform-require-default-0.1.7.tgz#fa97c97e52c30d70f8a505b7fffc5503dfa84a88" + integrity sha512-eoH8Tm/fVtkRluI6UDc8B/TdsbjuvQwd5BPaw4yShHV0USsKoFHgGJsVCcFPhsPVyoBKbTlisiEc4sBpbtUldA== + babel-plugin-transform-typescript-metadata@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/babel-plugin-transform-typescript-metadata/-/babel-plugin-transform-typescript-metadata-0.3.2.tgz#7a327842d8c36ffe07ee1b5276434e56c297c9b7" From b92d24f492087beca168c3474c506419ed12f27c Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 04:36:24 +0100 Subject: [PATCH 093/157] fix(NA): enable minimizer --- .../src/worker/webpack.config.ts | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 92f3751189d57..a93a869d8079b 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -370,18 +370,17 @@ export function getWebpackConfig( ], optimization: { - minimize: false, - // minimizer: [ - // new TerserPlugin({ - // extractComments: false, - // parallel: false, - // terserOptions: { - // compress: { passes: 2 }, - // keep_classnames: true, - // mangle: true, - // }, - // }), - // ], + minimizer: [ + new TerserPlugin({ + extractComments: false, + parallel: false, + terserOptions: { + compress: { passes: 2 }, + keep_classnames: true, + mangle: true, + }, + }), + ], // TODO: try to understand why usedExports is treeShaking code it shouldn't be usedExports: false, // sideEffects: false, From 7ecf7f897d0786818c6b3b60b0dac7ca02b41b6d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 04:51:29 +0100 Subject: [PATCH 094/157] fix(NA): package.json format --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 399473aa1d43e..5029e1bc90db4 100644 --- a/package.json +++ b/package.json @@ -1846,4 +1846,4 @@ "zod-to-json-schema": "^3.23.0" }, "packageManager": "yarn@1.22.21" -} +} \ No newline at end of file From 5f315628d9f0dd4d299c5f4fd49e2025a26ef220 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 18:12:32 +0100 Subject: [PATCH 095/157] chore(NA): remove openssl_legacy_provider from webpack configs --- package.json | 2 +- packages/kbn-monaco/BUILD.bazel | 2 -- packages/kbn-optimizer/src/optimizer/observe_worker.ts | 1 - .../kbn-plugin-helpers/src/integration_tests/build.test.ts | 6 ------ packages/kbn-plugin-helpers/src/tasks/optimize.ts | 2 +- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 2 -- packages/kbn-ui-shared-deps-src/BUILD.bazel | 2 -- x-pack/plugins/canvas/scripts/shareable_runtime.js | 2 -- 8 files changed, 2 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 6011e14b0ec97..c3565c79781c6 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "serverless-security": "node scripts/kibana --dev --serverless=security", "spec_to_console": "node scripts/spec_to_console", "start": "node scripts/kibana --dev", - "storybook": "node --openssl-legacy-provider --no-deprecation scripts/storybook", + "storybook": "node --no-deprecation scripts/storybook", "test:ftr": "node scripts/functional_tests", "test:ftr:runner": "node scripts/functional_test_runner", "test:ftr:server": "node scripts/functional_tests_server", diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 90e29761dbbf6..b0ddb98c4eb5d 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -59,11 +59,9 @@ webpack_cli( env = select({ "//:dist": { "NODE_ENV": "production", - "NODE_OPTIONS": "--openssl-legacy-provider", }, "//conditions:default": { "NODE_ENV": "development", - "NODE_OPTIONS": "--openssl-legacy-provider", }, }), visibility = ["//visibility:public"], diff --git a/packages/kbn-optimizer/src/optimizer/observe_worker.ts b/packages/kbn-optimizer/src/optimizer/observe_worker.ts index ff14af5944908..c3a53b7a9036d 100644 --- a/packages/kbn-optimizer/src/optimizer/observe_worker.ts +++ b/packages/kbn-optimizer/src/optimizer/observe_worker.ts @@ -62,7 +62,6 @@ function usingWorkerProc(config: OptimizerConfig, fn: (proc: ChildProcess) => const proc = fork(require.resolve('../worker/run_worker'), [], { execArgv: [ `--require=@kbn/babel-register/install`, - '--openssl-legacy-provider', ...(inspectFlag && config.inspectWorkers ? [`${inspectFlag}=${inspectPortCounter++}`] : []), diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index 4bf8486c45878..d038a2f4508dc 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -40,9 +40,6 @@ it('builds a generated plugin into a viable archive', async () => { process.execPath, ['scripts/generate_plugin', '-y', '--name', 'fooTestPlugin'], { - env: { - NODE_OPTIONS: '--openssl-legacy-provider', - }, cwd: REPO_ROOT, all: true, } @@ -66,9 +63,6 @@ it('builds a generated plugin into a viable archive', async () => { process.execPath, ['../../scripts/plugin_helpers', 'build', '--kibana-version', '7.5.0'], { - env: { - NODE_OPTIONS: '--openssl-legacy-provider', - }, cwd: PLUGIN_DIR, all: true, } diff --git a/packages/kbn-plugin-helpers/src/tasks/optimize.ts b/packages/kbn-plugin-helpers/src/tasks/optimize.ts index 1ef238665879f..cdb622438be08 100644 --- a/packages/kbn-plugin-helpers/src/tasks/optimize.ts +++ b/packages/kbn-plugin-helpers/src/tasks/optimize.ts @@ -64,7 +64,7 @@ export async function optimize({ const proc = fork(require.resolve('./optimize_worker'), { cwd: REPO_ROOT, - execArgv: ['--require=@kbn/babel-register/install', '--openssl-legacy-provider'], + execArgv: ['--require=@kbn/babel-register/install'], stdio: ['ignore', 'pipe', 'pipe', 'ipc'], }); diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 3d9e4eb218580..268005f8e0027 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -95,11 +95,9 @@ webpack_cli( env = select({ "//:dist": { "NODE_ENV": "production", - "NODE_OPTIONS": "--openssl-legacy-provider", }, "//conditions:default": { "NODE_ENV": "development", - "NODE_OPTIONS": "--openssl-legacy-provider", }, }) ) diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index 88aaa29bb350b..19bd33c8c9556 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -50,11 +50,9 @@ webpack_cli( env = select({ "//:dist": { "NODE_ENV": "production", - "NODE_OPTIONS": "--openssl-legacy-provider", }, "//conditions:default": { "NODE_ENV": "development", - "NODE_OPTIONS": "--openssl-legacy-provider", }, }), visibility = ["//visibility:public"], diff --git a/x-pack/plugins/canvas/scripts/shareable_runtime.js b/x-pack/plugins/canvas/scripts/shareable_runtime.js index f3e1e66c1744a..a0b8421f8da01 100644 --- a/x-pack/plugins/canvas/scripts/shareable_runtime.js +++ b/x-pack/plugins/canvas/scripts/shareable_runtime.js @@ -55,7 +55,6 @@ run( execa.sync( process.execPath, [ - '--openssl-legacy-provider', require.resolve('webpack-dev-server/bin/webpack-dev-server'), '--config', webpackConfig, @@ -89,7 +88,6 @@ run( execa.sync( process.execPath, [ - '--openssl-legacy-provider', require.resolve('webpack/bin/webpack'), '--config', webpackConfig, From ef358cc8a524561f2d3f92e20a1d43e0c201416d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 18:13:29 +0100 Subject: [PATCH 096/157] fix(NA): eslint at packages/kbn-test/src/jest/resolver.js --- packages/kbn-test/src/jest/resolver.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/kbn-test/src/jest/resolver.js b/packages/kbn-test/src/jest/resolver.js index e62df15ecd3f6..05ad0b5b27dc3 100644 --- a/packages/kbn-test/src/jest/resolver.js +++ b/packages/kbn-test/src/jest/resolver.js @@ -84,9 +84,7 @@ module.exports = (request, options) => { return FILE_MOCK; } - if ( - pReqExt === '.worker' && reqBasename.endsWith('.editor') - ) { + if (pReqExt === '.worker' && reqBasename.endsWith('.editor')) { return WORKER_MOCK; } } From d0365dab2977ca848b526173b67370a959c4ce8f Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 19:00:49 +0100 Subject: [PATCH 097/157] chore(NA): remove remaining NODE_OPTIONS=--openssl-legacy-provider --- .../scripts/steps/functional/profiling_cypress.sh | 4 ++-- x-pack/plugins/fleet/package.json | 4 ++-- .../observability_solution/apm/scripts/test/e2e.js | 1 - .../observability_onboarding/scripts/test/e2e.js | 1 - .../profiling/scripts/test/e2e.js | 1 - x-pack/plugins/osquery/package.json | 6 +++--- x-pack/plugins/security_solution/package.json | 8 ++++---- x-pack/test/security_solution_cypress/package.json | 12 ++++++------ .../test_suites/observability/cypress/package.json | 8 ++++---- .../test_suites/security/cypress/package.json | 6 +++--- 10 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.buildkite/scripts/steps/functional/profiling_cypress.sh b/.buildkite/scripts/steps/functional/profiling_cypress.sh index daad169069ae3..643d4f03be453 100644 --- a/.buildkite/scripts/steps/functional/profiling_cypress.sh +++ b/.buildkite/scripts/steps/functional/profiling_cypress.sh @@ -13,5 +13,5 @@ echo "--- Profiling Cypress Tests" cd "$XPACK_DIR" -NODE_OPTIONS=--openssl-legacy-provider node plugins/observability_solution/profiling/scripts/test/e2e.js \ - --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ \ No newline at end of file +node plugins/observability_solution/profiling/scripts/test/e2e.js \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ diff --git a/x-pack/plugins/fleet/package.json b/x-pack/plugins/fleet/package.json index dc0bc6a6bcacb..83656010774f3 100644 --- a/x-pack/plugins/fleet/package.json +++ b/x-pack/plugins/fleet/package.json @@ -5,11 +5,11 @@ "private": true, "license": "Elastic License 2.0", "scripts": { - "cypress_space_awareness": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel --config-file ../fleet/cypress.config.space_awareness.ts --ftr-config-file ../../../x-pack/test/fleet_cypress/cli_config.space_awareness", + "cypress_space_awareness": "node ../security_solution/scripts/start_cypress_parallel --config-file ../fleet/cypress.config.space_awareness.ts --ftr-config-file ../../../x-pack/test/fleet_cypress/cli_config.space_awareness", "cypress_space_awareness:open": "yarn cypress_space_awareness open", "cypress_space_awareness:run": "yarn cypress_space_awareness run", "cypress_space_awareness:run:reporter": "yarn cypress_space_awareness run --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=../fleet/cypress/reporter_config.json", - "cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel --config-file ../fleet/cypress.config.ts --ftr-config-file ../../../x-pack/test/fleet_cypress/cli_config", + "cypress": "node ../security_solution/scripts/start_cypress_parallel --config-file ../fleet/cypress.config.ts --ftr-config-file ../../../x-pack/test/fleet_cypress/cli_config", "cypress:open": "yarn cypress open", "cypress:run": "yarn cypress run", "cypress:run:reporter": "yarn cypress run --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=../fleet/cypress/reporter_config.json", diff --git a/x-pack/plugins/observability_solution/apm/scripts/test/e2e.js b/x-pack/plugins/observability_solution/apm/scripts/test/e2e.js index 02cba1343fd4e..a70d13b877159 100644 --- a/x-pack/plugins/observability_solution/apm/scripts/test/e2e.js +++ b/x-pack/plugins/observability_solution/apm/scripts/test/e2e.js @@ -73,7 +73,6 @@ function runTests() { env: { ...process.env, CYPRESS_CLI_ARGS: JSON.stringify(cypressCliArgs), - NODE_OPTIONS: '--openssl-legacy-provider', }, encoding: 'utf8', stdio: 'inherit', diff --git a/x-pack/plugins/observability_solution/observability_onboarding/scripts/test/e2e.js b/x-pack/plugins/observability_solution/observability_onboarding/scripts/test/e2e.js index fd2da7b56fb68..e5c7901bb869e 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/scripts/test/e2e.js +++ b/x-pack/plugins/observability_solution/observability_onboarding/scripts/test/e2e.js @@ -80,7 +80,6 @@ function runTests() { env: { ...process.env, CYPRESS_CLI_ARGS: JSON.stringify(cypressCliArgs), - NODE_OPTIONS: '--openssl-legacy-provider', }, encoding: 'utf8', stdio: 'inherit', diff --git a/x-pack/plugins/observability_solution/profiling/scripts/test/e2e.js b/x-pack/plugins/observability_solution/profiling/scripts/test/e2e.js index fd2da7b56fb68..e5c7901bb869e 100644 --- a/x-pack/plugins/observability_solution/profiling/scripts/test/e2e.js +++ b/x-pack/plugins/observability_solution/profiling/scripts/test/e2e.js @@ -80,7 +80,6 @@ function runTests() { env: { ...process.env, CYPRESS_CLI_ARGS: JSON.stringify(cypressCliArgs), - NODE_OPTIONS: '--openssl-legacy-provider', }, encoding: 'utf8', stdio: 'inherit', diff --git a/x-pack/plugins/osquery/package.json b/x-pack/plugins/osquery/package.json index f6dac0fd15c02..4eb947030af9c 100644 --- a/x-pack/plugins/osquery/package.json +++ b/x-pack/plugins/osquery/package.json @@ -7,13 +7,13 @@ "scripts": { "cypress:burn": "yarn cypress:run --env burn=2 --headed", "cypress:changed-specs-only": "yarn cypress:run --changed-specs-only --env burn=2", - "cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel --config-file ../osquery/cypress/cypress.config.ts --ftr-config-file ../../../x-pack/test/osquery_cypress/cli_config", + "cypress": "node ../security_solution/scripts/start_cypress_parallel --config-file ../osquery/cypress/cypress.config.ts --ftr-config-file ../../../x-pack/test/osquery_cypress/cli_config", "cypress:open": "yarn cypress open", "cypress:run": "yarn cypress run", - "cypress:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel --config-file ../osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../x-pack/test/osquery_cypress/serverless_cli_config", + "cypress:serverless": "node ../security_solution/scripts/start_cypress_parallel --config-file ../osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../x-pack/test/osquery_cypress/serverless_cli_config", "cypress:serverless:open": "yarn cypress:serverless open", "cypress:serverless:run": "yarn cypress:serverless run", - "cypress:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel_serverless --config-file ../osquery/cypress/serverless_cypress_qa.config.ts --onBeforeHook ../../test/osquery_cypress/runner_qa.ts", + "cypress:qa:serverless": "node ../security_solution/scripts/start_cypress_parallel_serverless --config-file ../osquery/cypress/serverless_cypress_qa.config.ts --onBeforeHook ../../test/osquery_cypress/runner_qa.ts", "cypress:qa:serverless:run": "yarn cypress:qa:serverless run", "nyc": "../../../node_modules/.bin/nyc report --reporter=text-summary", "junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-osquery/cypress/results/mochawesome*.json > ../../../target/kibana-osquery/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-osquery/cypress/results/output.json --reportDir ../../../target/kibana-osquery/cypress/results && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-osquery/cypress/results/*.xml ../../../target/junit/", diff --git a/x-pack/plugins/security_solution/package.json b/x-pack/plugins/security_solution/package.json index 62a406960ceeb..f178b79d5136c 100644 --- a/x-pack/plugins/security_solution/package.json +++ b/x-pack/plugins/security_solution/package.json @@ -7,16 +7,16 @@ "scripts": { "extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js && node ../../../scripts/eslint ./public/detections/mitre/mitre_tactics_techniques.ts --fix", "build-beat-doc": "node scripts/beat_docs/build.js && node ../../../scripts/eslint ../timelines/server/utils/beat_schema/fields.ts --fix", - "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", + "cypress": "../../../node_modules/.bin/cypress", "cypress:burn": "yarn cypress:dw run --env burn=2 --headed", "cypress:changed-specs-only": "yarn cypress:dw run --changed-specs-only --env burn=2", - "cypress:dw": "NODE_OPTIONS=--openssl-legacy-provider node ./scripts/start_cypress_parallel --config-file ./public/management/cypress/cypress.config.ts --ftr-config-file ../../test/defend_workflows_cypress/cli_config", + "cypress:dw": "node ./scripts/start_cypress_parallel --config-file ./public/management/cypress/cypress.config.ts --ftr-config-file ../../test/defend_workflows_cypress/cli_config", "cypress:dw:open": "yarn cypress:dw open", "cypress:dw:run": "yarn cypress:dw run", - "cypress:dw:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ./scripts/start_cypress_parallel --config-file ./public/management/cypress/cypress_serverless.config.ts --ftr-config-file ../../test/defend_workflows_cypress/serverless_config", + "cypress:dw:serverless": "node ./scripts/start_cypress_parallel --config-file ./public/management/cypress/cypress_serverless.config.ts --ftr-config-file ../../test/defend_workflows_cypress/serverless_config", "cypress:dw:serverless:open": "yarn cypress:dw:serverless open", "cypress:dw:serverless:run": "yarn cypress:dw:serverless run", - "cypress:dw:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ./scripts/start_cypress_parallel_serverless --config-file ./public/management/cypress/cypress_serverless_qa.config.ts", + "cypress:dw:qa:serverless": "node ./scripts/start_cypress_parallel_serverless --config-file ./public/management/cypress/cypress_serverless_qa.config.ts", "cypress:dw:qa:serverless:run": "yarn cypress:dw:qa:serverless run", "cypress:dw:serverless:changed-specs-only": "yarn cypress:dw:serverless run --changed-specs-only --env burn=2", "cypress:dw:endpoint": "echo '\n** WARNING **: Run script `cypress:dw:endpoint` no longer valid! Use `cypress:dw` instead\n'", diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index 5f7fc4fadf2bf..f59ac9f6e3b3e 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -5,11 +5,11 @@ "private": true, "license": "Elastic License 2.0", "scripts": { - "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", - "cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", + "cypress": "../../../node_modules/.bin/cypress", + "cypress:open:ess": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:entity_analytics:run:ess": "yarn cypress:ess --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", - "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", + "cypress:ess": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", "cypress:rule_management:prebuilt_rules:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:detection_engine:run:ess":"yarn cypress:ess --spec './cypress/e2e/detection_response/detection_engine/!(exceptions)/**/*.cy.ts'", @@ -22,8 +22,8 @@ "cypress:burn:ess": "yarn cypress:ess --env burn=5", "junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-security-solution/cypress/results/mochawesome*.json > ../../../target/kibana-security-solution/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../target/kibana-security-solution/cypress/results && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-security-solution/cypress/results/*.xml ../../../target/junit/", "junit:transform": "node ../../plugins/security_solution/scripts/junit_transformer --pathPattern '../../../target/kibana-security-solution/cypress/results/*.xml' --rootDirectory ../../../ --reportName 'Security Solution Cypress' --writeInPlace", - "cypress:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless.config.ts --ftr-config-file ../../test/security_solution_cypress/serverless_config", - "cypress:cloud:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", + "cypress:serverless": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless.config.ts --ftr-config-file ../../test/security_solution_cypress/serverless_config", + "cypress:cloud:serverless": "TZ=UTC NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", "cypress:open:cloud:serverless": "yarn cypress:cloud:serverless open --config-file ./cypress/cypress_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", "cypress:entity_analytics:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", @@ -36,7 +36,7 @@ "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", "cypress:changed-specs-only:serverless": "yarn cypress:serverless --changed-specs-only --env burn=5", "cypress:burn:serverless": "yarn cypress:serverless --env burn=2", - "cypress:qa:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless_qa.config.ts", + "cypress:qa:serverless": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless_qa.config.ts", "cypress:open:qa:serverless": "yarn cypress:qa:serverless open", "cypress:run:qa:serverless:entity_analytics": "yarn cypress:qa:serverless --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:run:qa:serverless:investigations": "yarn cypress:qa:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json b/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json index bf0dad8dd01e6..d50d6e5ab8a36 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json +++ b/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json @@ -5,9 +5,9 @@ "private": true, "license": "Elastic License 2.0", "scripts": { - "cypress:open": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../../node_modules/.bin/cypress open --config-file ./cypress.config.ts", - "cypress:run": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../../node_modules/.bin/cypress run --browser chrome --config-file ./cypress.config.ts", - "cypress:serverless:open": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../../scripts/functional_tests --config ./config_runner.ts", - "cypress:serverless:run": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../../scripts/functional_tests --config ./config_server.ts" + "cypress:open": "node ../../../../../../node_modules/.bin/cypress open --config-file ./cypress.config.ts", + "cypress:run": "node ../../../../../../node_modules/.bin/cypress run --browser chrome --config-file ./cypress.config.ts", + "cypress:serverless:open": "node ../../../../../../scripts/functional_tests --config ./config_runner.ts", + "cypress:serverless:run": "node ../../../../../../scripts/functional_tests --config ./config_server.ts" } } \ No newline at end of file diff --git a/x-pack/test_serverless/functional/test_suites/security/cypress/package.json b/x-pack/test_serverless/functional/test_suites/security/cypress/package.json index ef8534585d4d0..1bc5d299b8771 100644 --- a/x-pack/test_serverless/functional/test_suites/security/cypress/package.json +++ b/x-pack/test_serverless/functional/test_suites/security/cypress/package.json @@ -5,9 +5,9 @@ "private": true, "license": "Elastic License 2.0", "scripts": { - "cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../../node_modules/.bin/cypress", - "cypress:open": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../plugins/security_solution/scripts/start_cypress_parallel open --config-file ../../../x-pack/test_serverless/functional/test_suites/security/cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test_serverless/functional/test_suites/security/cypress/security_config", - "cypress:run": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../../plugins/security_solution/scripts/start_cypress_parallel run --browser chrome --config-file ../../../x-pack/test_serverless/functional/test_suites/security/cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test_serverless/functional/test_suites/security/cypress/security_config --reporter ../../../../../../node_modules/cypress-multi-reporters --reporter-options configFile=./reporter_config.json; status=$?; yarn junit:merge && exit $status", + "cypress": "node ../../../../../../node_modules/.bin/cypress", + "cypress:open": "node ../../../../../plugins/security_solution/scripts/start_cypress_parallel open --config-file ../../../x-pack/test_serverless/functional/test_suites/security/cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test_serverless/functional/test_suites/security/cypress/security_config", + "cypress:run": "node ../../../../../plugins/security_solution/scripts/start_cypress_parallel run --browser chrome --config-file ../../../x-pack/test_serverless/functional/test_suites/security/cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test_serverless/functional/test_suites/security/cypress/security_config --reporter ../../../../../../node_modules/cypress-multi-reporters --reporter-options configFile=./reporter_config.json; status=$?; yarn junit:merge && exit $status", "junit:merge": "../../../../../../node_modules/.bin/mochawesome-merge ../../../../../../target/kibana-security-serverless/cypress/results/mochawesome*.json > ../../../../../../target/kibana-security-serverless/cypress/results/output.json && ../../../../../../node_modules/.bin/marge ../../../../../../target/kibana-security-serverless/cypress/results/output.json --reportDir ../../../../../../target/kibana-security-serverless/cypress/results && mkdir -p ../../../../../../target/junit && cp ../../../../../../target/kibana-security-serverless/cypress/results/*.xml ../../../../../../target/junit/" } } \ No newline at end of file From 659b050885ee20b2eeadaeb6a135293d318e3192 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 19:18:40 +0100 Subject: [PATCH 098/157] chore(NA): add webpack group into renovate --- renovate.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/renovate.json b/renovate.json index ff7ee4b0aaafa..66973a21410d2 100644 --- a/renovate.json +++ b/renovate.json @@ -20,6 +20,15 @@ "matchDepPatterns": [".*"], "enabled": false }, + { + "groupName": "webpack", + "matchDepNames": ["webpack", "@types/webpack", "webpack-cli", "webpack-dev-server", "webpack-merge"], + "reviewers": ["team:kibana-operations"], + "matchBaseBranches": ["main"], + "labels": ["Team:Operations", "backport:all-open", "release_note:skip", "ci:build-webpack-bundle-analyzer"], + "minimumReleaseAge": "7 days", + "enabled": true + }, { "groupName": "devcontainer", "reviewers": ["team:kibana-operations"], From a3d75fe8d41ecd4d0fbf12d92fe5644ebc0d1c5e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 19:21:08 +0100 Subject: [PATCH 099/157] fix(NA): minimumReleaseAge to 30days for webpack group --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 66973a21410d2..52cda7854e546 100644 --- a/renovate.json +++ b/renovate.json @@ -26,7 +26,7 @@ "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip", "ci:build-webpack-bundle-analyzer"], - "minimumReleaseAge": "7 days", + "minimumReleaseAge": "30 days", "enabled": true }, { From 73c4d080f3eed91b2e83e24f9b8bdf5af182d1a0 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 11 Oct 2024 20:17:04 +0100 Subject: [PATCH 100/157] fix(NA): snapshot for packages/kbn-plugin-helpers/src/integration_tests/build.test.ts jest integration tests --- .../kbn-plugin-helpers/src/integration_tests/build.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index d038a2f4508dc..92525c1169353 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -52,8 +52,7 @@ it('builds a generated plugin into a viable archive', async () => { }; expect(filterLogs(generateProc.all)).toMatchInlineSnapshot(` - "Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/current/production.html#openssl-legacy-provider - succ 🎉 + " succ 🎉 Your plugin has been created in plugins/foo_test_plugin " @@ -69,8 +68,7 @@ it('builds a generated plugin into a viable archive', async () => { ); expect(filterLogs(buildProc.all)).toMatchInlineSnapshot(` - "Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/current/production.html#openssl-legacy-provider - info deleting the build and target directories + " info deleting the build and target directories info run bazel and build required artifacts for the optimizer succ bazel run successfully and artifacts were created info running @kbn/optimizer From 96185f79a2b73b5f12ed3028a913ea1f6fdcab41 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 12 Oct 2024 21:04:16 +0100 Subject: [PATCH 101/157] chore(NA): try not to use not: raw --- packages/kbn-optimizer/src/worker/webpack.config.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index d19007e83830a..2bc88cca5af84 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -156,7 +156,6 @@ export function getWebpackConfig( }, { test: /\.css$/, - resourceQuery: { not: /raw/ }, include: /node_modules/, use: [ { @@ -241,7 +240,6 @@ export function getWebpackConfig( }, { test: /\.(js|tsx?)$/, - resourceQuery: { not: /raw/ }, exclude: /node_modules/, use: { loader: 'babel-loader', From 62b7cf975f2f852e908d3921ae4bd38d702c40c7 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 05:34:55 +0100 Subject: [PATCH 102/157] feat(NA): introduce bundle_remote_used_exports_plugin so we can enable usedExports in production bundles --- .../src/worker/bundle_remote_module.ts | 11 ++- .../bundle_remote_used_exports_plugin.ts | 84 +++++++++++++++++++ .../src/worker/webpack.config.ts | 9 +- 3 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index 8b55f5dc1ee1e..8f82a41adf828 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -12,6 +12,8 @@ import { KbnImportReq } from '@kbn/repo-packages'; // @ts-ignore not typed by @types/webpack import Module from 'webpack/lib/Module'; +// @ts-ignore not typed by @types/webpack +import StaticExportsDependency from 'webpack/lib/dependencies/StaticExportsDependency'; import { RawSource } from 'webpack-sources'; import { BundleRemote } from '../common'; @@ -56,6 +58,8 @@ export class BundleRemoteModule extends Module { module: __.outputOptions.module, exportsArgument: '__webpack_exports__', }; + + super.addDependency(new StaticExportsDependency(true, false)); callback(); } @@ -79,7 +83,12 @@ export class BundleRemoteModule extends Module { return { sources, - runtimeRequirements: new Set(['module', '__webpack_exports__', '__webpack_require__']), + runtimeRequirements: new Set([ + 'module', + '__webpack_exports__', + '__webpack_require__', + '__webpack_require__.r', + ]), data, }; } diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts new file mode 100644 index 0000000000000..b933a8a5abe53 --- /dev/null +++ b/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import NormalizePath from 'normalize-path'; +import webpack from 'webpack'; +import { Minimatch } from 'minimatch'; +import { Bundle } from '../common'; + +export class BundleRemoteUsedExportsPlugin { + constructor(private readonly bundle: Bundle) {} + apply(compiler: webpack.Compiler) { + const buildPublicDirsPatterns = () => { + const targets = this.bundle.remoteInfo.targets; + const extensions = '.{js,ts,tsx,json}'; + const builtPattern = !targets.length + ? 'public' + : targets.length === 1 + ? targets[0] + : `{${targets}}`; + return [`**/${builtPattern}/index${extensions}`, `**/${builtPattern}${extensions}`]; + }; + + const publicDirsPatterns = buildPublicDirsPatterns(); + const KbnPluginMainEntryGlob = new Minimatch(publicDirsPatterns[0]); + const KbnPluginExtraFileEntryGlob = new Minimatch(publicDirsPatterns[1]); + + compiler.hooks.compilation.tap('MarkExportsAsUsedPlugin', (compilation) => { + const moduleGraph = compilation.moduleGraph; + compilation.hooks.optimizeDependencies.tap('MarkExportsAsUsedPlugin', (modules) => { + Array.from(modules).forEach((module: any) => { + if (!module.resource) { + return; + } + + const normalizedModuleResource = NormalizePath(module.resource); + if ( + KbnPluginMainEntryGlob.match(normalizedModuleResource) || + KbnPluginExtraFileEntryGlob.match(normalizedModuleResource) + ) { + // if (module && module.resource && (module.resource.endsWith(Path.join('public', 'index.ts')) || module.resource.endsWith(Path.join('public', 'index.js')))) { + // Get all exports of the module + const exportsInfo = moduleGraph.getExportsInfo(module); + + // Array.from(exportsInfo.exports).forEach((exportInfo) => { + // if (exportInfo.name) { + // // Mark the export as used + // moduleGraph.getExportsInfo(module).setUsedInUnknownWay(exportInfo.name); + // moduleGraph.addExtraReason( + // module, + // `BundleRemoteUsedExportsPlugin/${exportInfo.name}` + // ); + // } + // }); + + // If the module uses export *, mark it as used in unknown way + if (module.buildMeta && module.buildMeta.exportsType === 'namespace') { + // @ts-ignore + moduleGraph.getExportsInfo(module).setAllKnownExportsUsed(); + // @ts-ignore + moduleGraph.getExportsInfo(module).setUsedInUnknownWay(); + moduleGraph.addExtraReason(module, `BundleRemoteUsedExportsPlugin/namespace#=>${module.resource}`); + } else { + Array.from(exportsInfo.exports).forEach((exportInfo) => { + if (exportInfo.name) { + moduleGraph.getExportsInfo(module).setUsedInUnknownWay(exportInfo.name); + moduleGraph.addExtraReason( + module, + `BundleRemoteUsedExportsPlugin/${exportInfo.name}#=>${module.resource}` + ); + } + }); + } + } + }); + }); + }); + } +} diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 2bc88cca5af84..8b1db69315537 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -27,6 +27,7 @@ import { NodeLibsBrowserPlugin } from '@kbn/node-libs-browser-webpack-plugin'; import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common'; import { BundleRemotesPlugin } from './bundle_remotes_plugin'; import { BundleMetricsPlugin } from './bundle_metrics_plugin'; +import { BundleRemoteUsedExportsPlugin } from './bundle_remote_used_exports_plugin'; import { EmitStatsPlugin } from './emit_stats_plugin'; import { PopulateBundleCachePlugin } from './populate_bundle_cache_plugin'; @@ -372,6 +373,11 @@ export function getWebpackConfig( mode: 'production', plugins: [ + // NOTE: this plugin is needed to mark exports on public and extraPublicDir entry files + // as used otherwise the new webpack v5 aggressive exports analysis will mark them as unused + // and they will be removed. Without this plugin we need to run with usedExports: false which + // affects the bundle sizes by a big margin. + new BundleRemoteUsedExportsPlugin(bundle), new webpack.DefinePlugin({ 'process.env': { IS_KIBANA_DISTRIBUTABLE: `"true"`, @@ -392,8 +398,9 @@ export function getWebpackConfig( }), ], // TODO: try to understand why usedExports is treeShaking code it shouldn't be - usedExports: false, + // usedExports: false, // sideEffects: false, + // mangleExports: false, // }, }; From a7aaf40366952a645fd380463f070d6306dea1bb Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 06:00:48 +0100 Subject: [PATCH 103/157] fix(NA): eslint fix at packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts --- .../src/worker/bundle_remote_used_exports_plugin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts b/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts index b933a8a5abe53..82d9186a84ddb 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_used_exports_plugin.ts @@ -64,7 +64,10 @@ export class BundleRemoteUsedExportsPlugin { moduleGraph.getExportsInfo(module).setAllKnownExportsUsed(); // @ts-ignore moduleGraph.getExportsInfo(module).setUsedInUnknownWay(); - moduleGraph.addExtraReason(module, `BundleRemoteUsedExportsPlugin/namespace#=>${module.resource}`); + moduleGraph.addExtraReason( + module, + `BundleRemoteUsedExportsPlugin/namespace#=>${module.resource}` + ); } else { Array.from(exportsInfo.exports).forEach((exportInfo) => { if (exportInfo.name) { From 96baf16427e18702c9997a147f2737f4da8ff2c8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 07:52:46 +0100 Subject: [PATCH 104/157] chore(NA): experiment without changes in bundle_remote_module.ts --- packages/kbn-optimizer/src/worker/bundle_remote_module.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts index 8f82a41adf828..bd8f56e5e9b18 100644 --- a/packages/kbn-optimizer/src/worker/bundle_remote_module.ts +++ b/packages/kbn-optimizer/src/worker/bundle_remote_module.ts @@ -13,7 +13,7 @@ import { KbnImportReq } from '@kbn/repo-packages'; // @ts-ignore not typed by @types/webpack import Module from 'webpack/lib/Module'; // @ts-ignore not typed by @types/webpack -import StaticExportsDependency from 'webpack/lib/dependencies/StaticExportsDependency'; +// import StaticExportsDependency from 'webpack/lib/dependencies/StaticExportsDependency'; import { RawSource } from 'webpack-sources'; import { BundleRemote } from '../common'; @@ -59,7 +59,7 @@ export class BundleRemoteModule extends Module { exportsArgument: '__webpack_exports__', }; - super.addDependency(new StaticExportsDependency(true, false)); + // super.addDependency(new StaticExportsDependency(true, false)); callback(); } @@ -87,7 +87,7 @@ export class BundleRemoteModule extends Module { 'module', '__webpack_exports__', '__webpack_require__', - '__webpack_require__.r', + // '__webpack_require__.r', ]), data, }; From 2c0ba78099360a2de01f6653e2626e58b4c3e2b8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 07:59:25 +0100 Subject: [PATCH 105/157] fix(NA): update limits for dataViewManagement --- packages/kbn-optimizer/limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index bd0234eaa87ec..9de1947b7175d 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -31,7 +31,7 @@ pageLoadAssetSize: dataUsage: 30000 dataViewEditor: 28082 dataViewFieldEditor: 42021 - dataViewManagement: 5300 + dataViewManagement: 20970 dataViews: 65000 dataVisualizer: 27530 devTools: 38637 From f9f20328f042375360d35e76c26644e17967a94d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 08:01:12 +0100 Subject: [PATCH 106/157] fix(NA): update limits for dataViewManagement v2 --- packages/kbn-optimizer/limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 9de1947b7175d..75d487bf4945e 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -31,7 +31,7 @@ pageLoadAssetSize: dataUsage: 30000 dataViewEditor: 28082 dataViewFieldEditor: 42021 - dataViewManagement: 20970 + dataViewManagement: 6300 dataViews: 65000 dataVisualizer: 27530 devTools: 38637 From 76c03abe168e01871c9ef1c5deac9bb241214a51 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 21:15:08 +0100 Subject: [PATCH 107/157] fix(NA): kbn-cloud-security-posture/graph/storybook --- src/dev/storybook/aliases.ts | 2 +- .../graph/storybook/config/main.ts | 28 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 16594dbc49157..84992e7388f87 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -16,7 +16,7 @@ export const storybookAliases = { canvas: 'x-pack/plugins/canvas/storybook', cases: 'packages/kbn-cases-components/.storybook', cell_actions: 'packages/kbn-cell-actions/.storybook', - cloud_security_posture_packages: 'x-pack/packages/kbn-cloud-security-posture/storybook/config', + cloud_security_posture_packages: 'x-pack/packages/kbn-cloud-security-posture/graph/storybook/config', cloud: 'packages/cloud/.storybook', coloring: 'packages/kbn-coloring/.storybook', language_documentation_popover: 'packages/kbn-language-documentation/.storybook', diff --git a/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/main.ts b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/main.ts index 186e1a2a76bed..4e7fca030c2f6 100644 --- a/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/main.ts +++ b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/main.ts @@ -6,7 +6,6 @@ */ import { defaultConfig } from '@kbn/storybook'; -import { Configuration } from 'webpack'; module.exports = { ...defaultConfig, @@ -14,31 +13,4 @@ module.exports = { reactOptions: { strictMode: true, }, - webpack: (config: Configuration) => { - config.module?.rules.push({ - test: /\.js$/, - include: /node_modules[\\\/]@dagrejs/, - use: { - loader: 'babel-loader', - options: { - presets: ['@babel/preset-env'], - plugins: ['@babel/plugin-proposal-class-properties'], - }, - }, - }); - config.module?.rules.push({ - test: /node_modules[\/\\]@?xyflow[\/\\].*.js$/, - loaders: 'babel-loader', - options: { - presets: [['@babel/preset-env', { modules: false }], '@babel/preset-react'], - plugins: [ - '@babel/plugin-proposal-optional-chaining', - '@babel/plugin-proposal-nullish-coalescing-operator', - '@babel/plugin-transform-logical-assignment-operators', - ], - }, - }); - - return config; - }, }; From 9eee747c229d2e77ff589bd7c8b74d8db95cfc2a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 21:24:46 +0100 Subject: [PATCH 108/157] feat(NA): introduce new pickMaxWorkerCount function in the optimizer for a better balance workers calculation --- .../src/optimizer/optimizer_config.ts | 80 ++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts index b09650c0708da..5bfbadfcaf724 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts @@ -9,6 +9,7 @@ import Path from 'path'; import Os from 'os'; +import V8 from 'v8'; import { getPackages, getPluginPackagesFilter, type PluginSelector } from '@kbn/repo-packages'; import { @@ -33,7 +34,30 @@ export interface Limits { }; } -function pickMaxWorkerCount(dist: boolean) { +interface SystemInfo { + cpuCount: number; + totalMemory: number; + freeMemory: number; +} + +function getSystemInfo(): SystemInfo { + // collects useful system information for resource usage calculations + const cpuCount = Math.max(Os.cpus()?.length ?? 0, 1); + const totalMemory = Os.totalmem(); + const freeMemory = Os.freemem(); + + return { cpuCount, totalMemory, freeMemory }; +} + +function calculateMemoryPerWorker(totalMemory: number, maxWorkers: number): number { + // allocate ~2GB per worker, or a fraction of the total memory divided by maxWorkers, whichever is smaller + return Math.min(2000 * 1024 * 1024, totalMemory / maxWorkers); +} + +// Keep the old legacy PickMaxWorkerCount for now. It can be removed in the future +// in case the new one works great as expected +// @ts-expect-error unused function +function legacyPickMaxWorkerCount(dist: boolean) { // don't break if cpus() returns nothing, or an empty array const cpuCount = Math.max(Os.cpus()?.length, 1); // if we're buiding the dist then we can use more of the system's resources to get things done a little quicker @@ -42,6 +66,60 @@ function pickMaxWorkerCount(dist: boolean) { return Math.max(maxWorkers, 2); } +const pickMaxWorkerCount = (dist: boolean) => { + const isDist = dist; + const isCI = !!process.env.CI; + const isUseMaxAvailableResources = !!process.env.KBN_OPTIMIZER_USE_MAX_AVAILABLE_RESOURCES; + const minWorkers = 2; + const { cpuCount, totalMemory, freeMemory } = getSystemInfo(); + const maxWorkers = cpuCount - 1; + + // In case we get this env var set, just use max workers and avoid any kind of + // resource balance according to memory and cpu + if (isUseMaxAvailableResources) { + return maxWorkers; + } + + // Start calculating base worker count + let workerCount; + if (isDist && isCI) { + // For CI dist builds, start with most available resources + workerCount = maxWorkers; + } else if (isDist) { + // For local dist builds, start with 80% of resources but leaving some headroom + workerCount = Math.max(Math.floor(cpuCount * 0.8), 2); + } else { + // For regular local builds, start with fewer resources of 50% + workerCount = Math.max(Math.floor(cpuCount * 0.5), 2); + } + + // Adjust based on available memory making sure we don't use more memory + // than the one available in the system as this will affect performance hardly + const memoryPerWorker = calculateMemoryPerWorker(totalMemory, maxWorkers); + const memoryBasedWorkerCount = Math.floor(freeMemory / memoryPerWorker); + workerCount = Math.min(workerCount, memoryBasedWorkerCount); + + // Adjust by the ratio workerCount to maxWorkers. + // If it is lower or equal to 50% it adds an extra worker + // so the available resources are better used + const ratioWorkerCountToMaxWorkers = 1 - workerCount / maxWorkers; + if (ratioWorkerCountToMaxWorkers >= 0.5) { + workerCount = Math.min(workerCount + 1, cpuCount); + } + + // Make sure we respect min and max worker limits + workerCount = Math.max(workerCount, minWorkers); + workerCount = Math.min(workerCount, maxWorkers); + + // Ensure we never exceed v8's max old space size limits as this will result in + // out of memory errors during the compilation + const maxOldSpaceSize = V8.getHeapStatistics().heap_size_limit * cpuCount; + const v8LimitedWorkerCount = Math.floor(maxOldSpaceSize / memoryPerWorker); + workerCount = Math.min(workerCount, v8LimitedWorkerCount); + + return workerCount; +}; + interface Options { /** absolute path to root of the repo/build */ repoRoot: string; From 5295f69f29349f71bd7b8263dad76be0d14319f0 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 16 Oct 2024 21:56:29 +0100 Subject: [PATCH 109/157] fix(NA): eslint for src/dev/storybook/aliases.ts --- src/dev/storybook/aliases.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 84992e7388f87..2536f98df1e39 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -16,7 +16,8 @@ export const storybookAliases = { canvas: 'x-pack/plugins/canvas/storybook', cases: 'packages/kbn-cases-components/.storybook', cell_actions: 'packages/kbn-cell-actions/.storybook', - cloud_security_posture_packages: 'x-pack/packages/kbn-cloud-security-posture/graph/storybook/config', + cloud_security_posture_packages: + 'x-pack/packages/kbn-cloud-security-posture/graph/storybook/config', cloud: 'packages/cloud/.storybook', coloring: 'packages/kbn-coloring/.storybook', language_documentation_popover: 'packages/kbn-language-documentation/.storybook', From 0f98aea51c51ed43faa2ae4fe0b5b986bb5cf15e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 17 Oct 2024 04:15:52 +0100 Subject: [PATCH 110/157] fix(NA): new pickMaxWorkerCount function at packages/kbn-optimizer/src/optimizer/optimizer_config.ts --- .../src/optimizer/optimizer_config.test.ts | 30 +++++++++++++++++++ .../src/optimizer/optimizer_config.ts | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts index a3329dcc3d57f..9c93f19fbd394 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts @@ -22,6 +22,36 @@ jest.mock('os', () => { cpus() { return ['foo'] as any; }, + totalmem() { + return 64000000000; + }, + freemem() { + return 20000000000; + } + }; +}); + +jest.mock('v8', () => { + return { + ...jest.requireActual('v8'), + getHeapStatistics() { + return { + total_heap_size: 5816320, + total_heap_size_executable: 262144, + total_physical_size: 6012928, + total_available_size: 4341242192, + used_heap_size: 4930768, + heap_size_limit: 4345298944, + malloced_memory: 262320, + peak_malloced_memory: 571392, + does_zap_garbage: 0, + number_of_native_contexts: 2, + number_of_detached_contexts: 0, + total_global_handles_size: 8192, + used_global_handles_size: 3296, + external_memory: 2209666 + } + } }; }); diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts index 5bfbadfcaf724..93d923baee9fe 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts @@ -72,7 +72,7 @@ const pickMaxWorkerCount = (dist: boolean) => { const isUseMaxAvailableResources = !!process.env.KBN_OPTIMIZER_USE_MAX_AVAILABLE_RESOURCES; const minWorkers = 2; const { cpuCount, totalMemory, freeMemory } = getSystemInfo(); - const maxWorkers = cpuCount - 1; + const maxWorkers = Math.max(cpuCount - 1, minWorkers); // In case we get this env var set, just use max workers and avoid any kind of // resource balance according to memory and cpu From ef538b8ad47fe03c2d1a3c449477cb2e13ec3b8b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 17 Oct 2024 04:44:36 +0100 Subject: [PATCH 111/157] chore(NA): rebuild yarn.lock based on upstream head --- yarn.lock | 249 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 192 insertions(+), 57 deletions(-) diff --git a/yarn.lock b/yarn.lock index b87e10be17bf0..ca8831c860ca7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10579,6 +10579,22 @@ "@types/cheerio" "*" "@types/react" "*" +"@types/eslint-scope@^3.7.3": + version "3.7.4" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" + integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*", "@types/eslint@^8.44.2": + version "8.44.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" + integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + "@types/eslint@7 || 8": version "8.56.7" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.7.tgz#c33b5b5a9cfb66881beb7b5be6c34aa3e81d3366" @@ -10595,14 +10611,6 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/eslint@^8.44.2": - version "8.44.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" - integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - "@types/estree@*": version "0.0.50" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" @@ -10647,7 +10655,7 @@ "@types/express@*", "@types/express@^4.17.21": version "4.17.21" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + resolved "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz" integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== dependencies: "@types/body-parser" "*" @@ -12389,6 +12397,11 @@ acorn-globals@^7.0.0: acorn "^8.1.0" acorn-walk "^8.0.2" +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + acorn-import-attributes@^1.9.5: version "1.9.5" resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" @@ -12539,7 +12552,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-keywords@^5.1.0: +ajv-keywords@^5.0.0, ajv-keywords@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== @@ -12556,7 +12569,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.8.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -14204,7 +14217,15 @@ callsites@^3.0.0, callsites@^3.1.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.1, camel-case@^4.1.2: +camel-case@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.1.tgz#1fc41c854f00e2f7d0139dfeba1542d6896fe547" + integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== + dependencies: + pascal-case "^3.1.1" + tslib "^1.10.0" + +camel-case@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== @@ -15052,9 +15073,11 @@ connect-history-api-fallback@^2.0.0: integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= + dependencies: + date-now "^0.1.4" console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" @@ -15076,7 +15099,7 @@ console.table@^0.10.0: constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= constate@^3.3.2: version "3.3.2" @@ -16092,6 +16115,11 @@ date-fns@^2.29.3: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= + dateformat@^4.5.1: version "4.6.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" @@ -16807,7 +16835,7 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.1" -dot-case@^3.0.4: +dot-case@^3.0.3, dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== @@ -17125,7 +17153,15 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.1: +enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" + integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== @@ -18954,6 +18990,11 @@ fs-mkdirp-stream@^2.0.1: graceful-fs "^4.2.8" streamx "^2.12.0" +fs-monkey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" + integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== + fs-monkey@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" @@ -20058,7 +20099,12 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-entities@^2.1.0, html-entities@^2.4.0: +html-entities@^2.1.0: + version "2.3.3" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" + integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== + +html-entities@^2.4.0: version "2.5.2" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== @@ -23523,7 +23569,14 @@ mem@^8.1.1: map-age-cleaner "^0.1.3" mimic-fn "^3.1.0" -memfs@^3.1.2, memfs@^3.2.2: +memfs@^3.1.2: + version "3.4.7" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.7.tgz#e5252ad2242a724f938cb937e3c4f7ceb1f70e5a" + integrity sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw== + dependencies: + fs-monkey "^1.0.3" + +memfs@^3.2.2: version "3.6.0" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== @@ -23737,6 +23790,11 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== + mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -23747,7 +23805,14 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + dependencies: + mime-db "1.51.0" + +mime-types@^2.1.30: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -24530,7 +24595,7 @@ nise@^1.5.2: lolex "^5.0.1" path-to-regexp "^1.7.0" -no-case@^3.0.4: +no-case@^3.0.3, no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== @@ -25281,7 +25346,7 @@ original-url@^1.2.3: os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= os-homedir@^1.0.0: version "1.0.2" @@ -25554,7 +25619,15 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -param-case@^3.0.3, param-case@^3.0.4: +param-case@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.3.tgz#4be41f8399eff621c56eebb829a5e451d9801238" + integrity sha512-VWBVyimc1+QrzappRs7waeN2YmoZFCGXWASRYX1/rGHtXqEcrGEIDm+jqIwFa2fRXNgQEwrxaYuIrX0WcAguTA== + dependencies: + dot-case "^3.0.3" + tslib "^1.10.0" + +param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== @@ -25632,7 +25705,14 @@ parse5@^6.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^7.0.0, parse5@^7.1.1, parse5@^7.1.2: +parse5@^7.0.0, parse5@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.1.tgz#4649f940ccfb95d8754f37f73078ea20afe0c746" + integrity sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg== + dependencies: + entities "^4.4.0" + +parse5@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== @@ -25644,6 +25724,14 @@ parseurl@~1.3.2, parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascal-case@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.1.tgz#5ac1975133ed619281e88920973d2cd1f279de5f" + integrity sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA== + dependencies: + no-case "^3.0.3" + tslib "^1.10.0" + pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" @@ -25824,7 +25912,12 @@ picocolors@^0.2.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== -picocolors@^1.0.0, picocolors@^1.1.0: +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picocolors@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== @@ -26438,7 +26531,7 @@ postcss-values-parser@^6.0.2: is-url-superb "^4.0.0" quote-unquote "^1.0.0" -postcss@8.4.31: +postcss@8.4.31, postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== @@ -26455,7 +26548,7 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.15, postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: +postcss@^8.2.15, postcss@^8.4.33: version "8.4.47" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== @@ -26645,7 +26738,7 @@ process-warning@^2.0.0: process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= progress@^1.1.8: version "1.1.8" @@ -27762,15 +27855,14 @@ read-pkg@^5.2.0: string_decoder "~0.10.x" readable-stream@^4.0.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + version "4.3.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba" + integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== dependencies: abort-controller "^3.0.0" buffer "^6.0.3" events "^3.3.0" process "^0.11.10" - string_decoder "^1.3.0" readable-stream@~2.0.0: version "2.0.6" @@ -28662,7 +28754,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -28925,7 +29017,17 @@ schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^4.0.0, schema-utils@^4.2.0: +schema-utils@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" + integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.8.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.0.0" + +schema-utils@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== @@ -29609,7 +29711,12 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^1.0.2, source-map-js@^1.2.1: +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== @@ -30202,25 +30309,18 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== +string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: - safe-buffer "~5.2.0" + safe-buffer "~5.1.0" string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - stringify-entities@^3.0.0, stringify-entities@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-3.0.1.tgz#32154b91286ab0869ab2c07696223bd23b6dbfc0" @@ -31017,9 +31117,9 @@ time-stamp@^1.0.0: integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= timers-browserify@^2.0.4: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== + version "2.0.6" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" + integrity sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw== dependencies: setimmediate "^1.0.4" @@ -31367,7 +31467,7 @@ tslib@2.6.2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3. resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -31456,9 +31556,9 @@ type-fest@^1.2.1: integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== type-fest@^4.15.0, type-fest@^4.17.0, type-fest@^4.9.0: - version "4.26.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.26.1.tgz#a4a17fa314f976dd3e6d6675ef6c775c16d7955e" - integrity sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg== + version "4.18.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.18.3.tgz#5249f96e7c2c3f0f1561625f54050e343f1c8f68" + integrity sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ== type-is@~1.6.18: version "1.6.18" @@ -32945,7 +33045,37 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.9.0, webpack@^5.95.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5: + version "5.91.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" + integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.16.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + +webpack@^5.9.0, webpack@^5.95.0: version "5.95.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== @@ -33124,7 +33254,12 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" -wildcard@^2.0.0, wildcard@^2.0.1: +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + +wildcard@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== From 7abf2aa2efd72ac97306055d55d388fed5be9493 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 17 Oct 2024 04:10:12 +0000 Subject: [PATCH 112/157] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../kbn-optimizer/src/optimizer/optimizer_config.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts index 9c93f19fbd394..dc25c1a1c06b5 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts @@ -27,7 +27,7 @@ jest.mock('os', () => { }, freemem() { return 20000000000; - } + }, }; }); @@ -49,9 +49,9 @@ jest.mock('v8', () => { number_of_detached_contexts: 0, total_global_handles_size: 8192, used_global_handles_size: 3296, - external_memory: 2209666 - } - } + external_memory: 2209666, + }; + }, }; }); From d6a880ea5e02212b306ff293d9e882e419dc2874 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:29:19 +0000 Subject: [PATCH 113/157] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- yarn.lock | 190 ++++++++---------------------------------------------- 1 file changed, 27 insertions(+), 163 deletions(-) diff --git a/yarn.lock b/yarn.lock index c82a04a9a445b..af69ab647e2ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10583,22 +10583,6 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*", "@types/eslint@^8.44.2": - version "8.44.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" - integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - "@types/eslint@7 || 8": version "8.56.7" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.7.tgz#c33b5b5a9cfb66881beb7b5be6c34aa3e81d3366" @@ -10615,6 +10599,14 @@ "@types/estree" "*" "@types/json-schema" "*" +"@types/eslint@^8.44.2": + version "8.44.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" + integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + "@types/estree@*": version "0.0.50" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" @@ -12401,11 +12393,6 @@ acorn-globals@^7.0.0: acorn "^8.1.0" acorn-walk "^8.0.2" -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== - acorn-import-attributes@^1.9.5: version "1.9.5" resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" @@ -12556,7 +12543,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-keywords@^5.0.0, ajv-keywords@^5.1.0: +ajv-keywords@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== @@ -12573,7 +12560,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.8.0, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -14221,15 +14208,7 @@ callsites@^3.0.0, callsites@^3.1.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.1.tgz#1fc41c854f00e2f7d0139dfeba1542d6896fe547" - integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== - dependencies: - pascal-case "^3.1.1" - tslib "^1.10.0" - -camel-case@^4.1.2: +camel-case@^4.1.1, camel-case@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== @@ -16839,7 +16818,7 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.1" -dot-case@^3.0.3, dot-case@^3.0.4: +dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== @@ -17157,15 +17136,7 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" - integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enhanced-resolve@^5.17.1: +enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== @@ -18994,11 +18965,6 @@ fs-mkdirp-stream@^2.0.1: graceful-fs "^4.2.8" streamx "^2.12.0" -fs-monkey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - fs-monkey@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" @@ -20103,12 +20069,7 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-entities@^2.1.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== - -html-entities@^2.4.0: +html-entities@^2.1.0, html-entities@^2.4.0: version "2.5.2" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== @@ -23573,14 +23534,7 @@ mem@^8.1.1: map-age-cleaner "^0.1.3" mimic-fn "^3.1.0" -memfs@^3.1.2: - version "3.4.7" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.7.tgz#e5252ad2242a724f938cb937e3c4f7ceb1f70e5a" - integrity sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw== - dependencies: - fs-monkey "^1.0.3" - -memfs@^3.2.2: +memfs@^3.1.2, memfs@^3.2.2: version "3.6.0" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== @@ -23794,11 +23748,6 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -23809,14 +23758,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== - dependencies: - mime-db "1.51.0" - -mime-types@^2.1.30: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -24599,7 +24541,7 @@ nise@^1.5.2: lolex "^5.0.1" path-to-regexp "^1.7.0" -no-case@^3.0.3, no-case@^3.0.4: +no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== @@ -25623,15 +25565,7 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -param-case@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.3.tgz#4be41f8399eff621c56eebb829a5e451d9801238" - integrity sha512-VWBVyimc1+QrzappRs7waeN2YmoZFCGXWASRYX1/rGHtXqEcrGEIDm+jqIwFa2fRXNgQEwrxaYuIrX0WcAguTA== - dependencies: - dot-case "^3.0.3" - tslib "^1.10.0" - -param-case@^3.0.4: +param-case@^3.0.3, param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== @@ -25709,14 +25643,7 @@ parse5@^6.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^7.0.0, parse5@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.1.tgz#4649f940ccfb95d8754f37f73078ea20afe0c746" - integrity sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg== - dependencies: - entities "^4.4.0" - -parse5@^7.1.2: +parse5@^7.0.0, parse5@^7.1.1, parse5@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== @@ -25728,14 +25655,6 @@ parseurl@~1.3.2, parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -pascal-case@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.1.tgz#5ac1975133ed619281e88920973d2cd1f279de5f" - integrity sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA== - dependencies: - no-case "^3.0.3" - tslib "^1.10.0" - pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" @@ -25916,12 +25835,7 @@ picocolors@^0.2.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picocolors@^1.1.0: +picocolors@^1.0.0, picocolors@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== @@ -26535,7 +26449,7 @@ postcss-values-parser@^6.0.2: is-url-superb "^4.0.0" quote-unquote "^1.0.0" -postcss@8.4.31, postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31: +postcss@8.4.31: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== @@ -26552,7 +26466,7 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.15, postcss@^8.4.33: +postcss@^8.2.15, postcss@^8.4.14, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: version "8.4.47" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== @@ -29014,17 +28928,7 @@ schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - -schema-utils@^4.2.0: +schema-utils@^4.0.0, schema-utils@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== @@ -29708,12 +29612,7 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-js@^1.2.1: +source-map-js@^1.0.2, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== @@ -31464,7 +31363,7 @@ tslib@2.6.2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3. resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -33042,37 +32941,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5: - version "5.91.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" - integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-assertions "^1.9.0" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.16.0" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - -webpack@^5.9.0, webpack@^5.95.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.9.0, webpack@^5.95.0: version "5.95.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== @@ -33251,12 +33120,7 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -wildcard@^2.0.1: +wildcard@^2.0.0, wildcard@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== From 2c27ea6d15fa5266278c480d8ca15263098d7c9c Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 18 Oct 2024 02:20:27 +0100 Subject: [PATCH 114/157] fix(NA): remove extra missing place still using --openssl-legacy-provider --- .../plugins/observability_solution/inventory/scripts/test/e2e.js | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js b/x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js index 5c0d897cc671d..6bd8d7ccfd83f 100644 --- a/x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js +++ b/x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js @@ -73,7 +73,6 @@ function runTests() { env: { ...process.env, CYPRESS_CLI_ARGS: JSON.stringify(cypressCliArgs), - NODE_OPTIONS: '--openssl-legacy-provider', }, encoding: 'utf8', stdio: 'inherit', From f37dd352eea9a9dc5d79d142b75d97d6f586ad08 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 21 Oct 2024 17:26:06 +0100 Subject: [PATCH 115/157] chore(NA): removes domain browser resolution for now --- package.json | 1 - yarn.lock | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1609f3c15cdb4..f52acfc74af29 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,6 @@ "**/@typescript-eslint/utils": "5.62.0", "**/chokidar": "^3.5.3", "**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1", - "**/domain-browser": "4.22.0", "**/globule/minimatch": "^3.1.2", "**/hoist-non-react-statics": "^3.3.2", "**/isomorphic-fetch/node-fetch": "^2.6.7", diff --git a/yarn.lock b/yarn.lock index af69ab647e2ea..cbc502c27c6f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16764,10 +16764,10 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= -domain-browser@4.22.0, domain-browser@^1.1.1: - version "4.22.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.22.0.tgz#6ddd34220ec281f9a65d3386d267ddd35c491f9f" - integrity sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw== +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: version "2.3.0" From e6c40929ebc43ed00963624ceeed49242e929b2c Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 23 Oct 2024 19:27:37 +0100 Subject: [PATCH 116/157] fix(NA): remove wrong @emotion/react/dist cjs import --- .../application/sections/manage_processors/empty_list.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/ingest_pipelines/public/application/sections/manage_processors/empty_list.tsx b/x-pack/plugins/ingest_pipelines/public/application/sections/manage_processors/empty_list.tsx index f021055dd2934..566663a65bb76 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/sections/manage_processors/empty_list.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/sections/manage_processors/empty_list.tsx @@ -8,7 +8,7 @@ import { EuiPageTemplate } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { css } from '@emotion/react/dist/emotion-react.cjs'; +import { css } from '@emotion/react'; export const EmptyList = ({ addDatabaseButton }: { addDatabaseButton: JSX.Element }) => { return ( From dd51d22a2055423fc6abf64a7add0591120af483 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 24 Oct 2024 17:50:41 +0100 Subject: [PATCH 117/157] chore(NA): remove console polyfill --- packages/kbn-node-libs-browser-webpack-plugin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-node-libs-browser-webpack-plugin/index.js b/packages/kbn-node-libs-browser-webpack-plugin/index.js index 351c62d8acf51..f55b032aeda31 100644 --- a/packages/kbn-node-libs-browser-webpack-plugin/index.js +++ b/packages/kbn-node-libs-browser-webpack-plugin/index.js @@ -31,7 +31,7 @@ const NodeLibsBrowserPlugin = class NodeLibsBrowserPlugin { buffer: nodeLibsBrowser.buffer, child_process: false, cluster: false, - console: nodeLibsBrowser.console, + console: false, constants: nodeLibsBrowser.constants, crypto: nodeLibsBrowser.crypto, dgram: false, From b572b1f7037bdbb6be814a1674b005a5a4d030b2 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 24 Oct 2024 21:11:22 +0100 Subject: [PATCH 118/157] fix(NA): canvas shareable_runtime webpack config --- .../shareable_runtime/webpack.config.js | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js index ab44d7bb7da02..9b38d66e7d900 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js +++ b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js @@ -26,6 +26,7 @@ module.exports = { entry: { [SHAREABLE_RUNTIME_NAME]: require.resolve('./index.ts'), }, + target: 'web', mode: isProd ? 'production' : 'development', output: { path: SHAREABLE_RUNTIME_OUTPUT, @@ -39,16 +40,25 @@ module.exports = { [require.resolve('highlight.js')]: false, }, extensions: ['.js', '.json', '.ts', '.tsx', '.scss'], - mainFields: ['browser', 'main'], + mainFields: ['browser', 'module', 'main'], + fallback: { + fs: false, + child_process: false, + }, }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, - loaders: 'babel-loader', + loader: 'babel-loader', options: { - presets: [require.resolve('@kbn/babel-preset/webpack_preset')], + presets: [ + [ + require.resolve('@kbn/babel-preset/webpack_preset'), + { useTransformRequireDefault: true }, + ], + ], }, }, { @@ -107,15 +117,15 @@ module.exports = { }, { test: /\.module\.s(a|c)ss$/, - loader: [ + use: [ 'style-loader', { loader: 'css-loader', options: { modules: { localIdentName: '[name]__[local]___[hash:base64:5]', + exportLocalsConvention: 'camelCase', }, - localsConvention: 'camelCase', sourceMap: !isProd, }, }, @@ -184,11 +194,23 @@ module.exports = { }, { test: require.resolve('jquery'), - loader: 'expose-loader?jQuery!expose-loader?$', + use: [ + { + loader: 'expose-loader', + options: { + exposes: ['jQuery', '$'], + }, + }, + ], }, { test: /\.(woff|woff2|ttf|eot|svg|ico|png|jpg|gif|jpeg)(\?|$)/, - loader: 'url-loader', + type: 'asset', + parser: { + dataUrlCondition: { + maxSize: 8192, + }, + }, sideEffects: false, }, { @@ -202,10 +224,6 @@ module.exports = { }, ], }, - node: { - fs: 'empty', - child_process: 'empty', - }, plugins: [ isProd ? new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }) : [], new CiStatsPlugin({ From 3a1d7c781de04aa87856e12e43ecb2940aff646c Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 26 Oct 2024 06:02:58 +0100 Subject: [PATCH 119/157] fix(NA): correctly build caches on worker/populate_bundle_cache_plugin.ts and fix recursive watcher limit on observer_worker --- .../src/optimizer/observe_worker.ts | 8 ++ .../worker/populate_bundle_cache_plugin.ts | 93 ++++++++++++------- 2 files changed, 67 insertions(+), 34 deletions(-) diff --git a/packages/kbn-optimizer/src/optimizer/observe_worker.ts b/packages/kbn-optimizer/src/optimizer/observe_worker.ts index c3a53b7a9036d..a68fce09047d3 100644 --- a/packages/kbn-optimizer/src/optimizer/observe_worker.ts +++ b/packages/kbn-optimizer/src/optimizer/observe_worker.ts @@ -67,6 +67,14 @@ function usingWorkerProc(config: OptimizerConfig, fn: (proc: ChildProcess) => : []), ], stdio: ['ignore', 'pipe', 'pipe', 'ipc'], + env: { + // NOTE: with the default 2000 limit we get a lot of recursive watcher recreations (introduced in watchpack 2000) + // which makes the experience horrible and the performance between 2.5x to 3x worse when watching. + // If that fails in other mac machines with lower defaults for maxfiles and maxfilesperproc + // or just low powerful ones we need to default to polling instead of relying in the OS events watcher system. + // That can be done in the worker/run_compilers file. + WATCHPACK_WATCHER_LIMIT: '4000', + }, }); return { diff --git a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts index 2778050892ab6..e85789a744ae1 100644 --- a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts +++ b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts @@ -8,7 +8,6 @@ */ import Path from 'path'; -import Fs from 'fs'; import { inspect, promisify } from 'util'; import webpack from 'webpack'; @@ -19,6 +18,7 @@ import { isConcatenatedModule, isDelegatedModule, isRuntimeModule, + getModulePath, } from '@kbn/optimizer-webpack-helpers'; import { @@ -37,7 +37,6 @@ interface InputFileSystem { encoding: null | undefined, callback: (err: Error | null, stats: Buffer) => void ) => void; - stat: (path: string, callback: (err: Error | null, stats: Fs.Stats) => void) => void; } /** @@ -63,9 +62,33 @@ export class PopulateBundleCachePlugin { throw new Error('expected inputFs to be defined'); } const readFile = promisify(inputFs.readFile); - const stat = promisify(inputFs.stat); + const moduleFileDepsMap = new Map(); + const allFileDepsPathSet = new Set(); compiler.hooks.compilation.tap('PopulateBundleCachePlugin', (compilation) => { + const hooks = webpack.NormalModule.getCompilationHooks(compilation); + + // first collect file deps for modules + hooks.beforeSnapshot.tap('PopulateBundleCachePlugin', (module: any) => { + // make sure we have file deps for this module + if (module.buildInfo.fileDependencies.size > 0) { + const realFileDeps = []; + + for (const path of module.buildInfo.fileDependencies) { + // in webpack v5 there a lot of paths collected that are not real files + // but instead folders or partial paths. + // Here we're verifying if what we have as indeed a filepath + if (Path.extname(path).length > 0) { + realFileDeps.push(path); + allFileDepsPathSet.add(path); + } + } + + moduleFileDepsMap.set(module.identifier(), realFileDeps); + } + }); + + // in the end process assets to calculate workUnites and references compilation.hooks.processAssets.tapAsync( { name: 'PopulateBundleCachePlugin', @@ -74,7 +97,7 @@ export class PopulateBundleCachePlugin { async (_, callback) => { const bundleRefExportIds: string[] = []; let moduleCount = 0; - let workUnits = compilation.fileDependencies.size; + let workUnits = allFileDepsPathSet.size; const paths = new Set(); const rawHashes = new Map(); @@ -100,38 +123,41 @@ export class PopulateBundleCachePlugin { await addReferenced(bundle.manifestPath); } - // add all files from the fileDependencies (which includes a bunch of directories) to the cache - for (const path of compilation.fileDependencies) { - const cStat = await stat(path); - if (!cStat.isFile()) { - continue; - } - - await addReferenced(path); - if (path.endsWith('.scss')) { - workUnits += EXTRA_SCSS_WORK_UNITS; - continue; - } - - const parsedPath = parseFilePath(path); - if (!parsedPath.dirs.includes('node_modules')) { - continue; - } - - const nmIndex = parsedPath.dirs.lastIndexOf('node_modules'); - const isScoped = parsedPath.dirs[nmIndex + 1].startsWith('@'); - const pkgJsonPath = Path.join( - parsedPath.root, - ...parsedPath.dirs.slice(0, nmIndex + 1 + (isScoped ? 2 : 1)), - 'package.json' - ); - await addReferenced(pkgJsonPath); - continue; - } - for (const module of compilation.modules) { if (isNormalModule(module)) { + const path = getModulePath(module); + if (Path.extname(path).length === 0) { + continue; + } + moduleCount += 1; + const parsedPath = parseFilePath(path); + + if (!parsedPath.dirs.includes('node_modules')) { + await addReferenced(path); + + if (path.endsWith('.scss')) { + workUnits += EXTRA_SCSS_WORK_UNITS; + + const dependencies = moduleFileDepsMap.get(module.identifier()); + if (dependencies) { + await Promise.all( + dependencies.map((depPath: string) => addReferenced(depPath)) + ); + } + } + + continue; + } + + const nmIndex = parsedPath.dirs.lastIndexOf('node_modules'); + const isScoped = parsedPath.dirs[nmIndex + 1].startsWith('@'); + const pkgJsonPath = Path.join( + parsedPath.root, + ...parsedPath.dirs.slice(0, nmIndex + 1 + (isScoped ? 2 : 1)), + 'package.json' + ); + await addReferenced(pkgJsonPath); continue; } @@ -146,7 +172,6 @@ export class PopulateBundleCachePlugin { } if (isDelegatedModule(module)) { - // delegated modules are the references to the ui-shared-deps-npm dll dllRefKeys.add(module.userRequest); continue; } From 438fdce23822955ed007d32ca5ef898b936deec2 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 28 Oct 2024 02:45:08 +0000 Subject: [PATCH 120/157] fix(NA): storybook aliases for cloud_security_posture_packages --- src/dev/storybook/aliases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index c8e9bfd844f95..5a1f167154a56 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -17,7 +17,7 @@ export const storybookAliases = { cases: 'packages/kbn-cases-components/.storybook', cell_actions: 'packages/kbn-cell-actions/.storybook', cloud_security_posture_packages: - 'x-pack/packages/kbn-cloud-security-posture/graph/storybook/config', + 'x-pack/packages/kbn-cloud-security-posture/storybook/config', cloud: 'packages/cloud/.storybook', coloring: 'packages/kbn-coloring/.storybook', language_documentation_popover: 'packages/kbn-language-documentation/.storybook', From 8ca271eb06bb3a822303cb04d50d47ad62df9070 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 28 Oct 2024 18:33:32 +0000 Subject: [PATCH 121/157] fix(NA): quick checks --- src/dev/storybook/aliases.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 5a1f167154a56..cc991d72d23c0 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -16,8 +16,7 @@ export const storybookAliases = { canvas: 'x-pack/plugins/canvas/storybook', cases: 'packages/kbn-cases-components/.storybook', cell_actions: 'packages/kbn-cell-actions/.storybook', - cloud_security_posture_packages: - 'x-pack/packages/kbn-cloud-security-posture/storybook/config', + cloud_security_posture_packages: 'x-pack/packages/kbn-cloud-security-posture/storybook/config', cloud: 'packages/cloud/.storybook', coloring: 'packages/kbn-coloring/.storybook', language_documentation_popover: 'packages/kbn-language-documentation/.storybook', From c8a4e201cab0cf865332267bc50bcadbb833e57b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 29 Oct 2024 05:05:03 +0000 Subject: [PATCH 122/157] fix(NA): correctly account concatenatedModules in moduleCount --- .../kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts index e85789a744ae1..bcd67125642f6 100644 --- a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts +++ b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts @@ -121,6 +121,7 @@ export class PopulateBundleCachePlugin { if (bundle.manifestPath) { await addReferenced(bundle.manifestPath); + workUnits += 1; } for (const module of compilation.modules) { @@ -167,7 +168,7 @@ export class PopulateBundleCachePlugin { } if (isConcatenatedModule(module)) { - moduleCount += module.modules.length; + moduleCount += 1; continue; } From a786dc9b37407393f23ae2e2b849f99ae9b25b64 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 30 Oct 2024 17:15:19 +0000 Subject: [PATCH 123/157] fix(NA): removes @xyflow/react alias from webpack configs --- package.json | 2 +- .../kbn-optimizer/src/worker/webpack.config.ts | 9 --------- packages/kbn-storybook/src/webpack.config.ts | 6 ------ yarn.lock | 18 +++++++++--------- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 4602cdb925e4c..470b1261c9fc8 100644 --- a/package.json +++ b/package.json @@ -1063,7 +1063,7 @@ "@turf/length": "^6.0.2", "@xstate/react": "^3.2.2", "@xstate5/react": "npm:@xstate/react@^4.1.2", - "@xyflow/react": "^12.3.2", + "@xyflow/react": "^12.3.3", "adm-zip": "^0.5.9", "ai": "^2.2.33", "ajv": "^8.12.0", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 18824bd456a3d..f13547535639e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -298,15 +298,6 @@ export function getWebpackConfig( 'src/core/public/styles/core_app/images' ), vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'), - // TODO: remove once https://github.com/xyflow/xyflow/pull/4755 gets released - '@xyflow/react/dist/style.css': Path.resolve( - worker.repoRoot, - 'node_modules/@xyflow/react/dist/style.css' - ), - '@xyflow/react': Path.resolve( - worker.repoRoot, - 'node_modules/@xyflow/react/dist/esm/index.js' - ), }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 365a5b1ad0515..347476332ec12 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -134,12 +134,6 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { core_app_image_assets: resolve(REPO_ROOT, 'src/core/public/styles/core_app/images'), core_styles: resolve(REPO_ROOT, 'src/core/public/index.scss'), vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), - // TODO: remove once https://github.com/xyflow/xyflow/pull/4755 gets released - '@xyflow/react/dist/style.css': resolve( - REPO_ROOT, - 'node_modules/@xyflow/react/dist/style.css' - ), - '@xyflow/react': resolve(REPO_ROOT, 'node_modules/@xyflow/react/dist/esm/index.js'), }, }, stats: 'errors-only', diff --git a/yarn.lock b/yarn.lock index 337b7d9e005c2..66d47178b0610 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12224,19 +12224,19 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@xyflow/react@^12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@xyflow/react/-/react-12.3.2.tgz#10a98ad8d110867b5f44985b08b4b233816a980a" - integrity sha512-+bK3L61BDIvUX++jMiEqIjy5hIIyVmfeiUavpeOZIYKwg6NW0pR5EnHJM2JFfkVqZisFauzS9EgmI+tvTqx9Qw== +"@xyflow/react@^12.3.3": + version "12.3.3" + resolved "https://registry.yarnpkg.com/@xyflow/react/-/react-12.3.3.tgz#e807b1df766da5e2583cad7eb3e9d34e829835e5" + integrity sha512-hKwnY68fijc393/KCCCyJUi+vESPnY0Vht0Brbny8feMpp/iHtTNGbpwzQtSDmbvvnnIwIAWrxPZPgiUQmK8Kw== dependencies: - "@xyflow/system" "0.0.43" + "@xyflow/system" "0.0.44" classcat "^5.0.3" zustand "^4.4.0" -"@xyflow/system@0.0.43": - version "0.0.43" - resolved "https://registry.yarnpkg.com/@xyflow/system/-/system-0.0.43.tgz#5abe99b2542fa583c15a74efcdbb78b8ed825f49" - integrity sha512-1zHgad1cWr1mKm2xbFaarK0Jg8WRgaQ8ubSBIo/pRdq3fEgCuqgNkL9NSAP6Rvm8zi3+Lu4JPUMN+EEx5QgX9A== +"@xyflow/system@0.0.44": + version "0.0.44" + resolved "https://registry.yarnpkg.com/@xyflow/system/-/system-0.0.44.tgz#de3f61c93b9392e95fdaecd598cee9f7fa32c79b" + integrity sha512-hKHtH8hUVKmCCXbTdEYUWNqRkcSBwYxdzZhIxpJst60AEnlobfphNu8eAOJArEJJl+MrjidvY5K/BOzYUcwCug== dependencies: "@types/d3-drag" "^3.0.7" "@types/d3-selection" "^3.0.10" From f3cd2f3b48ce435b523efeceab64d90ede430cf6 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 30 Oct 2024 17:30:41 +0000 Subject: [PATCH 124/157] fix(NA): remove unused fallbacks on kbn-monaco --- packages/kbn-monaco/webpack.config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/kbn-monaco/webpack.config.js b/packages/kbn-monaco/webpack.config.js index 2f4914bd49e85..ddd21c9c7e029 100644 --- a/packages/kbn-monaco/webpack.config.js +++ b/packages/kbn-monaco/webpack.config.js @@ -43,10 +43,6 @@ const workerConfig = (languages) => ({ // swap default umd import for the esm one provided in vscode-uri package 'vscode-uri$': require.resolve('vscode-uri').replace(/\/umd\/index.js/, '/esm/index.mjs'), }, - fallback: { - assert: require.resolve('assert'), - buffer: require.resolve('buffer'), - }, }, plugins: [new NodeLibsBrowserPlugin()], stats: 'errors-only', From 9a1f46ccfc9a71e0592ca07a90886f4e6fd0e153 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 30 Oct 2024 17:31:11 +0000 Subject: [PATCH 125/157] chore(NA): increase webpack update frequency on renovate to 60 days --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index ed607de9e2a43..929ab53729c2b 100644 --- a/renovate.json +++ b/renovate.json @@ -26,7 +26,7 @@ "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip", "ci:build-webpack-bundle-analyzer"], - "minimumReleaseAge": "30 days", + "minimumReleaseAge": "60 days", "enabled": true }, { From b9ab6b785ef48b845ac485268f0269d1403458ea Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 30 Oct 2024 20:56:48 +0000 Subject: [PATCH 126/157] fix(NA): revert for now the alias for xyflow --- packages/kbn-optimizer/src/worker/webpack.config.ts | 9 +++++++++ packages/kbn-storybook/src/webpack.config.ts | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index f13547535639e..9f7f54f305996 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -298,6 +298,15 @@ export function getWebpackConfig( 'src/core/public/styles/core_app/images' ), vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'), + // TODO: remove once https://github.com/xyflow/xyflow/pull/4772 gets released + '@xyflow/react/dist/style.css': Path.resolve( + worker.repoRoot, + 'node_modules/@xyflow/react/dist/style.css' + ), + '@xyflow/react': Path.resolve( + worker.repoRoot, + 'node_modules/@xyflow/react/dist/esm/index.js' + ), }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 347476332ec12..389e4cca057f2 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -134,6 +134,12 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { core_app_image_assets: resolve(REPO_ROOT, 'src/core/public/styles/core_app/images'), core_styles: resolve(REPO_ROOT, 'src/core/public/index.scss'), vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), + // TODO: remove once https://github.com/xyflow/xyflow/pull/4772 gets released + '@xyflow/react/dist/style.css': resolve( + REPO_ROOT, + 'node_modules/@xyflow/react/dist/style.css' + ), + '@xyflow/react': resolve(REPO_ROOT, 'node_modules/@xyflow/react/dist/esm/index.js'), }, }, stats: 'errors-only', From 7df71f304307f2730147ad29c781ccf7c783954b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 31 Oct 2024 18:19:14 +0000 Subject: [PATCH 127/157] fix(NA): revert xyflow alias from webpack config --- package.json | 2 +- .../kbn-optimizer/src/worker/webpack.config.ts | 9 --------- packages/kbn-storybook/src/webpack.config.ts | 6 ------ yarn.lock | 18 +++++++++--------- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 470b1261c9fc8..ddf1741e8da12 100644 --- a/package.json +++ b/package.json @@ -1063,7 +1063,7 @@ "@turf/length": "^6.0.2", "@xstate/react": "^3.2.2", "@xstate5/react": "npm:@xstate/react@^4.1.2", - "@xyflow/react": "^12.3.3", + "@xyflow/react": "^12.3.4", "adm-zip": "^0.5.9", "ai": "^2.2.33", "ajv": "^8.12.0", diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 9f7f54f305996..f13547535639e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -298,15 +298,6 @@ export function getWebpackConfig( 'src/core/public/styles/core_app/images' ), vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'), - // TODO: remove once https://github.com/xyflow/xyflow/pull/4772 gets released - '@xyflow/react/dist/style.css': Path.resolve( - worker.repoRoot, - 'node_modules/@xyflow/react/dist/style.css' - ), - '@xyflow/react': Path.resolve( - worker.repoRoot, - 'node_modules/@xyflow/react/dist/esm/index.js' - ), }, }, diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 389e4cca057f2..347476332ec12 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -134,12 +134,6 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { core_app_image_assets: resolve(REPO_ROOT, 'src/core/public/styles/core_app/images'), core_styles: resolve(REPO_ROOT, 'src/core/public/index.scss'), vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), - // TODO: remove once https://github.com/xyflow/xyflow/pull/4772 gets released - '@xyflow/react/dist/style.css': resolve( - REPO_ROOT, - 'node_modules/@xyflow/react/dist/style.css' - ), - '@xyflow/react': resolve(REPO_ROOT, 'node_modules/@xyflow/react/dist/esm/index.js'), }, }, stats: 'errors-only', diff --git a/yarn.lock b/yarn.lock index 66d47178b0610..56e34db0161a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12224,19 +12224,19 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@xyflow/react@^12.3.3": - version "12.3.3" - resolved "https://registry.yarnpkg.com/@xyflow/react/-/react-12.3.3.tgz#e807b1df766da5e2583cad7eb3e9d34e829835e5" - integrity sha512-hKwnY68fijc393/KCCCyJUi+vESPnY0Vht0Brbny8feMpp/iHtTNGbpwzQtSDmbvvnnIwIAWrxPZPgiUQmK8Kw== +"@xyflow/react@^12.3.4": + version "12.3.4" + resolved "https://registry.yarnpkg.com/@xyflow/react/-/react-12.3.4.tgz#cccc57f7a992faecc5ed1dda82838b31c1afa522" + integrity sha512-KjFkj84S+wK8aJF/PORxSkOAeotTTPz++hus+Y95NFMIJGVyl8jjVaaz5B1zyV0prk6ZkbMp6q0vqMjJdZT25Q== dependencies: - "@xyflow/system" "0.0.44" + "@xyflow/system" "0.0.45" classcat "^5.0.3" zustand "^4.4.0" -"@xyflow/system@0.0.44": - version "0.0.44" - resolved "https://registry.yarnpkg.com/@xyflow/system/-/system-0.0.44.tgz#de3f61c93b9392e95fdaecd598cee9f7fa32c79b" - integrity sha512-hKHtH8hUVKmCCXbTdEYUWNqRkcSBwYxdzZhIxpJst60AEnlobfphNu8eAOJArEJJl+MrjidvY5K/BOzYUcwCug== +"@xyflow/system@0.0.45": + version "0.0.45" + resolved "https://registry.yarnpkg.com/@xyflow/system/-/system-0.0.45.tgz#ca1f4d843d2925ce9c5763f16abf51a4c69953ef" + integrity sha512-szP1LjDD4jlRYYhxvgZqOCTMToUVNqjQkrlhb0fhv1sXomU1+yMDdhpQT+FjE4d+rKx08fS10sOuZUl2ycXaDw== dependencies: "@types/d3-drag" "^3.0.7" "@types/d3-selection" "^3.0.10" From 0c250decd9d3bf05824f05bde00ad000acc68343 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 4 Nov 2024 16:05:36 +0000 Subject: [PATCH 128/157] fix(NA): remove raw-loader --- packages/kbn-optimizer/src/worker/webpack.config.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index dd050d4b7d6c9..f13547535639e 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -251,12 +251,6 @@ export function getWebpackConfig( }, }, }, - { - test: /\.(html|md|txt|tmpl)$/, - use: { - loader: 'raw-loader', - }, - }, { test: /\.peggy$/, loader: require.resolve('@kbn/peggy-loader'), From bd5c00583c948b636a7c926424e239fa7d1b5645 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 13 Nov 2024 18:46:36 +0000 Subject: [PATCH 129/157] chore(NA): increase limit for aiops --- packages/kbn-optimizer/limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index e4d8c919bb866..2b6a4a103c112 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -2,7 +2,7 @@ pageLoadAssetSize: actions: 20000 advancedSettings: 27596 aiAssistantManagementSelection: 19146 - aiops: 16526 + aiops: 16900 alerting: 106936 apm: 64385 banners: 17946 From 8fd9e711d10c39862fc359e954c1025749adb81a Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:57:11 +0000 Subject: [PATCH 130/157] [CI] Auto-commit changed files from 'node scripts/notice' --- yarn.lock | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8d2af1f8a4e4d..25ece6863d248 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31340,17 +31340,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.10.0, terser@^5.15.1: - version "5.34.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6" - integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -terser@^5.26.0, terser@^5.3.4, terser@^5.36.0, terser@^5.9.0: +terser@^5.10.0, terser@^5.15.1, terser@^5.26.0, terser@^5.3.4, terser@^5.36.0, terser@^5.9.0: version "5.36.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.36.0.tgz#8b0dbed459ac40ff7b4c9fd5a3a2029de105180e" integrity sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w== From 35c9a30232ad0aa399c5b8705b0ddc96f96e3995 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:12:23 +0000 Subject: [PATCH 131/157] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- packages/kbn-optimizer/src/worker/theme_loader.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/theme_loader.ts b/packages/kbn-optimizer/src/worker/theme_loader.ts index 8fb3cb053b748..97b56426c010b 100644 --- a/packages/kbn-optimizer/src/worker/theme_loader.ts +++ b/packages/kbn-optimizer/src/worker/theme_loader.ts @@ -43,18 +43,21 @@ export default function (this: webpack.LoaderContext) { defaultClause = ` default: console.error(new Error("SASS files in [${bundleId}] were not built for theme [" + window.__kbnThemeTag__ + "]. Styles were compiled using the [${FALLBACK_THEME_TAG}] theme instead to keep Kibana somewhat usable. Please adjust the advanced settings to make use of [${themeTags}] or make sure the KBN_OPTIMIZER_THEMES environment variable includes [" + window.__kbnThemeTag__ + "] in a comma-separated list of themes you want to compile. You can also set it to \'*\' to build all themes.")); - return require(${getStringifiedRequest(this, `${this.resourcePath}?${FALLBACK_THEME_TAG}`)});`; + return require(${getStringifiedRequest( + this, + `${this.resourcePath}?${FALLBACK_THEME_TAG}` + )});`; } return ` switch (window.__kbnThemeTag__) { ${themeTags - .map( - (tag) => ` + .map( + (tag) => ` case '${tag}': return require(${getStringifiedRequest(this, `${this.resourcePath}?${tag}`)});` - ) - .join('\n')} + ) + .join('\n')} ${defaultClause} }`; } From 93fdeb729f3b340f8613d3f299e93c626cbdafde Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 20 Nov 2024 17:15:21 +0000 Subject: [PATCH 132/157] chore(NA): update limits --- packages/kbn-optimizer/limits.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index e1e9b6aa81898..d945ffeb75cd9 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -2,7 +2,7 @@ pageLoadAssetSize: actions: 20000 advancedSettings: 27596 aiAssistantManagementSelection: 19146 - aiops: 16670 + aiops: 17010 alerting: 106936 apm: 64385 banners: 17946 @@ -31,7 +31,7 @@ pageLoadAssetSize: dataUsage: 30000 dataViewEditor: 28082 dataViewFieldEditor: 42021 - dataViewManagement: 5370 + dataViewManagement: 6050 dataViews: 65000 dataVisualizer: 30000 devTools: 38637 From 802f3d12e573179de8bb7251a3f329cc146b1620 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 20 Nov 2024 19:48:52 +0000 Subject: [PATCH 133/157] chore(NA): adjust docs for watchers --- packages/kbn-optimizer/src/optimizer/observe_worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/src/optimizer/observe_worker.ts b/packages/kbn-optimizer/src/optimizer/observe_worker.ts index a68fce09047d3..edcf8651320c9 100644 --- a/packages/kbn-optimizer/src/optimizer/observe_worker.ts +++ b/packages/kbn-optimizer/src/optimizer/observe_worker.ts @@ -68,7 +68,7 @@ function usingWorkerProc(config: OptimizerConfig, fn: (proc: ChildProcess) => ], stdio: ['ignore', 'pipe', 'pipe', 'ipc'], env: { - // NOTE: with the default 2000 limit we get a lot of recursive watcher recreations (introduced in watchpack 2000) + // NOTE: with the default 2000 limit we get a lot of recursive watcher recreations (introduced in watchpack v2) // which makes the experience horrible and the performance between 2.5x to 3x worse when watching. // If that fails in other mac machines with lower defaults for maxfiles and maxfilesperproc // or just low powerful ones we need to default to polling instead of relying in the OS events watcher system. From 0bb35cd67a4d353c4271b19b7a542ce9a97b8eab Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 20 Nov 2024 20:04:48 +0000 Subject: [PATCH 134/157] fix(NA): remove memory based constraints from maxWorkers calculations --- .../src/optimizer/optimizer_config.ts | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts index 0664856531011..0582374c83e3b 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts @@ -9,7 +9,6 @@ import Path from 'path'; import Os from 'os'; -import V8 from 'v8'; import { getPackages, getPluginPackagesFilter, type PluginSelector } from '@kbn/repo-packages'; import { ThemeTag, ThemeTags, parseThemeTags } from '@kbn/core-ui-settings-common'; @@ -29,22 +28,13 @@ export interface Limits { interface SystemInfo { cpuCount: number; - totalMemory: number; - freeMemory: number; } function getSystemInfo(): SystemInfo { // collects useful system information for resource usage calculations const cpuCount = Math.max(Os.cpus()?.length ?? 0, 1); - const totalMemory = Os.totalmem(); - const freeMemory = Os.freemem(); - return { cpuCount, totalMemory, freeMemory }; -} - -function calculateMemoryPerWorker(totalMemory: number, maxWorkers: number): number { - // allocate ~2GB per worker, or a fraction of the total memory divided by maxWorkers, whichever is smaller - return Math.min(2000 * 1024 * 1024, totalMemory / maxWorkers); + return { cpuCount }; } // Keep the old legacy PickMaxWorkerCount for now. It can be removed in the future @@ -64,7 +54,7 @@ const pickMaxWorkerCount = (dist: boolean) => { const isCI = !!process.env.CI; const isUseMaxAvailableResources = !!process.env.KBN_OPTIMIZER_USE_MAX_AVAILABLE_RESOURCES; const minWorkers = 2; - const { cpuCount, totalMemory, freeMemory } = getSystemInfo(); + const { cpuCount } = getSystemInfo(); const maxWorkers = Math.max(cpuCount - 1, minWorkers); // In case we get this env var set, just use max workers and avoid any kind of @@ -86,12 +76,6 @@ const pickMaxWorkerCount = (dist: boolean) => { workerCount = Math.max(Math.floor(cpuCount * 0.5), 2); } - // Adjust based on available memory making sure we don't use more memory - // than the one available in the system as this will affect performance hardly - const memoryPerWorker = calculateMemoryPerWorker(totalMemory, maxWorkers); - const memoryBasedWorkerCount = Math.floor(freeMemory / memoryPerWorker); - workerCount = Math.min(workerCount, memoryBasedWorkerCount); - // Adjust by the ratio workerCount to maxWorkers. // If it is lower or equal to 50% it adds an extra worker // so the available resources are better used @@ -104,12 +88,6 @@ const pickMaxWorkerCount = (dist: boolean) => { workerCount = Math.max(workerCount, minWorkers); workerCount = Math.min(workerCount, maxWorkers); - // Ensure we never exceed v8's max old space size limits as this will result in - // out of memory errors during the compilation - const maxOldSpaceSize = V8.getHeapStatistics().heap_size_limit * cpuCount; - const v8LimitedWorkerCount = Math.floor(maxOldSpaceSize / memoryPerWorker); - workerCount = Math.min(workerCount, v8LimitedWorkerCount); - return workerCount; }; From 4ae1f2b862ac1844f0dfcc86b0e6388229c0d6fc Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 20 Nov 2024 20:05:41 +0000 Subject: [PATCH 135/157] refact(NA): remove old calc function --- .../kbn-optimizer/src/optimizer/optimizer_config.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts index 0582374c83e3b..e22624335098d 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts @@ -37,18 +37,6 @@ function getSystemInfo(): SystemInfo { return { cpuCount }; } -// Keep the old legacy PickMaxWorkerCount for now. It can be removed in the future -// in case the new one works great as expected -// @ts-expect-error unused function -function legacyPickMaxWorkerCount(dist: boolean) { - // don't break if cpus() returns nothing, or an empty array - const cpuCount = Math.max(Os.cpus()?.length, 1); - // if we're buiding the dist then we can use more of the system's resources to get things done a little quicker - const maxWorkers = dist ? cpuCount - 1 : Math.ceil(cpuCount / 3); - // ensure we always have at least two workers - return Math.max(maxWorkers, 2); -} - const pickMaxWorkerCount = (dist: boolean) => { const isDist = dist; const isCI = !!process.env.CI; From 6229e3a2e49d08112bdf6bfda3a9160798d6c050 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:06:02 +0000 Subject: [PATCH 136/157] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- yarn.lock | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1e3781072d6cd..3d53f042517d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13459,7 +13459,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.17.1, ajv@^8.6.3: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.17.1, ajv@^8.6.3, ajv@^8.9.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== @@ -13469,16 +13469,6 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.17.1, ajv@^8.6.3: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ajv@^8.9.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - ansi-align@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" From 8e2d6d89d00f5bc070d2e3c446d01a099677ccd6 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 3 Dec 2024 14:44:23 +0000 Subject: [PATCH 137/157] fix(NA): build failures --- packages/kbn-optimizer/limits.yml | 2 +- .../test_suites/security/cypress/package.json | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 x-pack/test_serverless/functional/test_suites/security/cypress/package.json diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index b87f711827413..1a333250841fd 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -2,7 +2,7 @@ pageLoadAssetSize: actions: 20000 advancedSettings: 27596 aiAssistantManagementSelection: 19146 - aiops: 17680 + aiops: 17928 alerting: 106936 apm: 64385 banners: 17946 diff --git a/x-pack/test_serverless/functional/test_suites/security/cypress/package.json b/x-pack/test_serverless/functional/test_suites/security/cypress/package.json deleted file mode 100644 index 1bc5d299b8771..0000000000000 --- a/x-pack/test_serverless/functional/test_suites/security/cypress/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "author": "Elastic", - "name": "@kbn/security-solution-serverless", - "version": "1.0.0", - "private": true, - "license": "Elastic License 2.0", - "scripts": { - "cypress": "node ../../../../../../node_modules/.bin/cypress", - "cypress:open": "node ../../../../../plugins/security_solution/scripts/start_cypress_parallel open --config-file ../../../x-pack/test_serverless/functional/test_suites/security/cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test_serverless/functional/test_suites/security/cypress/security_config", - "cypress:run": "node ../../../../../plugins/security_solution/scripts/start_cypress_parallel run --browser chrome --config-file ../../../x-pack/test_serverless/functional/test_suites/security/cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test_serverless/functional/test_suites/security/cypress/security_config --reporter ../../../../../../node_modules/cypress-multi-reporters --reporter-options configFile=./reporter_config.json; status=$?; yarn junit:merge && exit $status", - "junit:merge": "../../../../../../node_modules/.bin/mochawesome-merge ../../../../../../target/kibana-security-serverless/cypress/results/mochawesome*.json > ../../../../../../target/kibana-security-serverless/cypress/results/output.json && ../../../../../../node_modules/.bin/marge ../../../../../../target/kibana-security-serverless/cypress/results/output.json --reportDir ../../../../../../target/kibana-security-serverless/cypress/results && mkdir -p ../../../../../../target/junit && cp ../../../../../../target/kibana-security-serverless/cypress/results/*.xml ../../../../../../target/junit/" - } -} \ No newline at end of file From 5c259b948f244949c2411a582321e237648c99d5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 4 Dec 2024 04:30:59 +0000 Subject: [PATCH 138/157] fix(NA): types for peggy-loader --- packages/kbn-peggy-loader/{index.ts => index.js} | 6 ++++-- packages/kbn-peggy-loader/tsconfig.json | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-) rename packages/kbn-peggy-loader/{index.ts => index.js} (91%) diff --git a/packages/kbn-peggy-loader/index.ts b/packages/kbn-peggy-loader/index.js similarity index 91% rename from packages/kbn-peggy-loader/index.ts rename to packages/kbn-peggy-loader/index.js index ffb82f8640abe..a2a2a26014967 100644 --- a/packages/kbn-peggy-loader/index.ts +++ b/packages/kbn-peggy-loader/index.js @@ -8,10 +8,12 @@ */ import { getJsSource } from '@kbn/peggy'; -import webpack from 'webpack'; // eslint-disable-next-line import/no-default-export -export default function (this: webpack.LoaderContext) { +/** + * @this {import('webpack').LoaderContext} + */ +export default function () { this.cacheable(true); const callback = this.async(); diff --git a/packages/kbn-peggy-loader/tsconfig.json b/packages/kbn-peggy-loader/tsconfig.json index 3e412325cfa91..3bbf05e134ce1 100644 --- a/packages/kbn-peggy-loader/tsconfig.json +++ b/packages/kbn-peggy-loader/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "checkJs": true, "outDir": "target/types", "types": [ "jest", @@ -8,10 +9,8 @@ ] }, "include": [ - "**/*.ts", - ], - "kbn_references": [ - "@kbn/peggy" + "index.js", + "types.ts" ], "exclude": [ "target/**/*", From ee23614f959da74a92c26da921cc873c6ee0d728 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 4 Dec 2024 05:01:13 +0000 Subject: [PATCH 139/157] fix(NA): bazel build --- packages/kbn-peggy-loader/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/kbn-peggy-loader/BUILD.bazel b/packages/kbn-peggy-loader/BUILD.bazel index 13afe2c2bc2de..96c064189d69e 100644 --- a/packages/kbn-peggy-loader/BUILD.bazel +++ b/packages/kbn-peggy-loader/BUILD.bazel @@ -2,6 +2,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library") SRCS = glob( [ + "**/*.js", "**/*.ts", ], exclude = [ From a086432a367afc98613dd05f7697126033bba5d2 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 4 Dec 2024 05:15:28 +0000 Subject: [PATCH 140/157] [CI] Auto-commit changed files from 'node scripts/notice' --- packages/kbn-peggy-loader/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/kbn-peggy-loader/tsconfig.json b/packages/kbn-peggy-loader/tsconfig.json index 3bbf05e134ce1..1fd0145de33eb 100644 --- a/packages/kbn-peggy-loader/tsconfig.json +++ b/packages/kbn-peggy-loader/tsconfig.json @@ -14,5 +14,8 @@ ], "exclude": [ "target/**/*", + ], + "kbn_references": [ + "@kbn/peggy", ] } From 4b957528f42b81c90fa3c8d1ccb44322378e8003 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 4 Dec 2024 05:59:45 +0000 Subject: [PATCH 141/157] fix(NA): typecheck --- packages/kbn-peggy-loader/tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-peggy-loader/tsconfig.json b/packages/kbn-peggy-loader/tsconfig.json index 3bbf05e134ce1..19c7e8d59f651 100644 --- a/packages/kbn-peggy-loader/tsconfig.json +++ b/packages/kbn-peggy-loader/tsconfig.json @@ -9,8 +9,8 @@ ] }, "include": [ - "index.js", - "types.ts" + "**/*.ts", + "**/*.js" ], "exclude": [ "target/**/*", From 9b10cb52be41fe4ea8b66735c3ff3b9153bf7077 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:12:55 +0000 Subject: [PATCH 142/157] [CI] Auto-commit changed files from 'node scripts/notice' --- yarn.lock | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/yarn.lock b/yarn.lock index 60fa073a33644..9c032a464aab5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -33714,7 +33714,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.9.0, webpack@^5.95.0: version "5.96.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.96.1.tgz#3676d1626d8312b6b10d0c18cc049fba7ac01f0c" integrity sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA== @@ -33743,35 +33743,6 @@ webpack@4: watchpack "^2.4.1" webpack-sources "^3.2.3" -webpack@^5.9.0, webpack@^5.95.0: - version "5.95.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" - integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== - dependencies: - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-attributes "^1.9.5" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.1" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" From 5c4e461f64639e20ec5f7b46f162ae036d41693e Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:14:11 +0000 Subject: [PATCH 143/157] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9c032a464aab5..2320f3ba61d10 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11626,7 +11626,7 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== -"@types/estree@^1.0.0", "@types/estree@^1.0.5", "@types/estree@^1.0.6": +"@types/estree@^1.0.0", "@types/estree@^1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== @@ -13383,7 +13383,7 @@ acorn@^7.0.0, acorn@^7.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.1.0, acorn@^8.11.0, acorn@^8.12.1, acorn@^8.14.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.0.4, acorn@^8.1.0, acorn@^8.11.0, acorn@^8.12.1, acorn@^8.14.0, acorn@^8.4.1, acorn@^8.8.0, acorn@^8.8.2, acorn@^8.9.0: version "8.14.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== @@ -14867,7 +14867,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.21.10, browserslist@^4.22.2, browserslist@^4.23.0, browserslist@^4.24.0: +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.22.2, browserslist@^4.23.0, browserslist@^4.24.0: version "4.24.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== From 993fd09bdbaade8e33ea3c5bf6f09d7d4d38dcd7 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 14 Dec 2024 00:13:09 +0000 Subject: [PATCH 144/157] fix(NA): types and lock file --- .../src/worker/webpack.config.ts | 4 +-- yarn.lock | 31 +------------------ 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index b97897e0aaca0..ebeed2d882d59 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -96,7 +96,7 @@ export function getWebpackConfig( context: worker.repoRoot, manifest: DLL_MANIFEST, }), - ...(worker.profileWebpack + ...((worker.profileWebpack ? [ new EmitStatsPlugin(bundle), new BundleAnalyzerPlugin({ @@ -111,7 +111,7 @@ export function getWebpackConfig( statsOptions: STATS_OPTIONS_DEFAULT_USEFUL_FILTER, }), ] - : []), + : []) as any), ...(bundle.banner ? [new webpack.BannerPlugin({ banner: bundle.banner, raw: true })] : []), ], diff --git a/yarn.lock b/yarn.lock index 749720964169d..9842c91c4f6ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -33718,7 +33718,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.9.0, webpack@^5.95.0: version "5.96.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.96.1.tgz#3676d1626d8312b6b10d0c18cc049fba7ac01f0c" integrity sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA== @@ -33747,35 +33747,6 @@ webpack@4: watchpack "^2.4.1" webpack-sources "^3.2.3" -webpack@^5.9.0, webpack@^5.95.0: - version "5.95.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0" - integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q== - dependencies: - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-attributes "^1.9.5" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.1" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" From f66e1e8e5b56f56adb4ad5474bd6108519f94a1a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 14 Dec 2024 18:00:51 +0000 Subject: [PATCH 145/157] fix(NA): correctly cache @elastic/eui/optimize/es/services/theme/warning on ui-shared-deps-npm and src --- packages/kbn-optimizer/limits.yml | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 4 ++-- packages/kbn-ui-shared-deps-src/src/definitions.js | 3 +-- packages/kbn-ui-shared-deps-src/src/entry.js | 5 ++--- packages/kbn-ui-shared-deps-src/webpack.config.js | 3 +++ 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 0f1de6987adf3..f1758db99465a 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -32,7 +32,7 @@ pageLoadAssetSize: dataUsage: 30000 dataViewEditor: 28082 dataViewFieldEditor: 42021 - dataViewManagement: 6050 + dataViewManagement: 6250 dataViews: 65000 dataVisualizer: 30000 devTools: 38637 diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index eade3a9a75a0e..4afa12e6385c1 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -61,12 +61,12 @@ module.exports = (_, argv) => { '@elastic/charts', '@elastic/eui', '@elastic/eui/optimize/es/components/provider/nested', - '@elastic/eui/optimize/es/services', - '@elastic/eui/optimize/es/services/format', + '@elastic/eui/optimize/es/services/theme/warning', '@elastic/eui/dist/eui_theme_amsterdam_light.json', '@elastic/eui/dist/eui_theme_amsterdam_dark.json', '@elastic/eui/dist/eui_theme_borealis_light.json', '@elastic/eui/dist/eui_theme_borealis_dark.json', + '@elastic/eui-theme-borealis', '@elastic/numeral', '@emotion/cache', '@emotion/react', diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js index 3e66e5a102f06..a7786bf3556a5 100644 --- a/packages/kbn-ui-shared-deps-src/src/definitions.js +++ b/packages/kbn-ui-shared-deps-src/src/definitions.js @@ -75,8 +75,7 @@ const externals = { '@elastic/eui': '__kbnSharedDeps__.ElasticEui', '@elastic/eui/lib/components/provider/nested': '__kbnSharedDeps__.ElasticEuiLibComponentsUseIsNestedEuiProvider', - '@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices', - '@elastic/eui/lib/services/format': '__kbnSharedDeps__.ElasticEuiLibServicesFormat', + '@elastic/eui/lib/services/theme/warning': '__kbnSharedDeps__.ElasticEuiLibServicesThemeWarning', '@elastic/eui-theme-borealis': '__kbnSharedDeps__.ElasticEuiThemeBorealis', // transient dep of eui diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js index 1d7e6442e29d0..f30f75f7bd5af 100644 --- a/packages/kbn-ui-shared-deps-src/src/entry.js +++ b/packages/kbn-ui-shared-deps-src/src/entry.js @@ -41,10 +41,9 @@ export const Rxjs = require('rxjs'); export const ElasticNumeral = require('@elastic/numeral'); export const ElasticCharts = require('@elastic/charts'); export const ElasticEui = require('@elastic/eui'); -export const ElasticEuiThemeBorealis = require('@elastic/eui-theme-borealis'); export const ElasticEuiLibComponentsUseIsNestedEuiProvider = require('@elastic/eui/optimize/es/components/provider/nested'); -export const ElasticEuiLibServices = require('@elastic/eui/optimize/es/services'); -export const ElasticEuiLibServicesFormat = require('@elastic/eui/optimize/es/services/format'); +export const ElasticEuiLibServicesThemeWarning = require('@elastic/eui/optimize/es/services/theme/warning'); +export const ElasticEuiThemeBorealis = require('@elastic/eui-theme-borealis'); export const KbnDatemath = require('@kbn/datemath'); export const HelloPangeaDnd = require('@hello-pangea/dnd/dist/dnd'); export const ReduxjsToolkit = require('@reduxjs/toolkit'); diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 5672ac0917e57..c33830390e006 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -114,6 +114,9 @@ module.exports = { // // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', + '@elastic/eui/lib/components/provider/nested$': + '@elastic/eui/optimize/es/components/provider/nested', + '@elastic/eui/lib/services/theme/warning$': '@elastic/eui/optimize/es/services/theme/warning', moment: MOMENT_SRC, // NOTE: Used to include react profiling on bundles // https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977#webpack-4 From 8ff6dbab9f77941df802fb628c0d20709ca5dcfe Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sun, 15 Dec 2024 03:54:32 +0000 Subject: [PATCH 146/157] fix(NA): update aiops limits --- packages/kbn-optimizer/limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index f1758db99465a..1369968f3fe91 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -2,7 +2,7 @@ pageLoadAssetSize: actions: 20000 advancedSettings: 27596 aiAssistantManagementSelection: 19146 - aiops: 18000 + aiops: 18200 alerting: 106936 apm: 64385 assetInventory: 18478 From 0ed6f7a729647812f16379aa50ed844ff6b24165 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 18 Dec 2024 17:06:46 +0000 Subject: [PATCH 147/157] Revert "fix(NA): correctly cache @elastic/eui/optimize/es/services/theme/warning on ui-shared-deps-npm and src" This reverts commit f66e1e8e5b56f56adb4ad5474bd6108519f94a1a. --- packages/kbn-optimizer/limits.yml | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 4 ++-- packages/kbn-ui-shared-deps-src/src/definitions.js | 3 ++- packages/kbn-ui-shared-deps-src/src/entry.js | 5 +++-- packages/kbn-ui-shared-deps-src/webpack.config.js | 3 --- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 1369968f3fe91..576ae449c5ee2 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -32,7 +32,7 @@ pageLoadAssetSize: dataUsage: 30000 dataViewEditor: 28082 dataViewFieldEditor: 42021 - dataViewManagement: 6250 + dataViewManagement: 6050 dataViews: 65000 dataVisualizer: 30000 devTools: 38637 diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index 4afa12e6385c1..eade3a9a75a0e 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -61,12 +61,12 @@ module.exports = (_, argv) => { '@elastic/charts', '@elastic/eui', '@elastic/eui/optimize/es/components/provider/nested', - '@elastic/eui/optimize/es/services/theme/warning', + '@elastic/eui/optimize/es/services', + '@elastic/eui/optimize/es/services/format', '@elastic/eui/dist/eui_theme_amsterdam_light.json', '@elastic/eui/dist/eui_theme_amsterdam_dark.json', '@elastic/eui/dist/eui_theme_borealis_light.json', '@elastic/eui/dist/eui_theme_borealis_dark.json', - '@elastic/eui-theme-borealis', '@elastic/numeral', '@emotion/cache', '@emotion/react', diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js index a7786bf3556a5..3e66e5a102f06 100644 --- a/packages/kbn-ui-shared-deps-src/src/definitions.js +++ b/packages/kbn-ui-shared-deps-src/src/definitions.js @@ -75,7 +75,8 @@ const externals = { '@elastic/eui': '__kbnSharedDeps__.ElasticEui', '@elastic/eui/lib/components/provider/nested': '__kbnSharedDeps__.ElasticEuiLibComponentsUseIsNestedEuiProvider', - '@elastic/eui/lib/services/theme/warning': '__kbnSharedDeps__.ElasticEuiLibServicesThemeWarning', + '@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices', + '@elastic/eui/lib/services/format': '__kbnSharedDeps__.ElasticEuiLibServicesFormat', '@elastic/eui-theme-borealis': '__kbnSharedDeps__.ElasticEuiThemeBorealis', // transient dep of eui diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js index f30f75f7bd5af..1d7e6442e29d0 100644 --- a/packages/kbn-ui-shared-deps-src/src/entry.js +++ b/packages/kbn-ui-shared-deps-src/src/entry.js @@ -41,9 +41,10 @@ export const Rxjs = require('rxjs'); export const ElasticNumeral = require('@elastic/numeral'); export const ElasticCharts = require('@elastic/charts'); export const ElasticEui = require('@elastic/eui'); -export const ElasticEuiLibComponentsUseIsNestedEuiProvider = require('@elastic/eui/optimize/es/components/provider/nested'); -export const ElasticEuiLibServicesThemeWarning = require('@elastic/eui/optimize/es/services/theme/warning'); export const ElasticEuiThemeBorealis = require('@elastic/eui-theme-borealis'); +export const ElasticEuiLibComponentsUseIsNestedEuiProvider = require('@elastic/eui/optimize/es/components/provider/nested'); +export const ElasticEuiLibServices = require('@elastic/eui/optimize/es/services'); +export const ElasticEuiLibServicesFormat = require('@elastic/eui/optimize/es/services/format'); export const KbnDatemath = require('@kbn/datemath'); export const HelloPangeaDnd = require('@hello-pangea/dnd/dist/dnd'); export const ReduxjsToolkit = require('@reduxjs/toolkit'); diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index c33830390e006..5672ac0917e57 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -114,9 +114,6 @@ module.exports = { // // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', - '@elastic/eui/lib/components/provider/nested$': - '@elastic/eui/optimize/es/components/provider/nested', - '@elastic/eui/lib/services/theme/warning$': '@elastic/eui/optimize/es/services/theme/warning', moment: MOMENT_SRC, // NOTE: Used to include react profiling on bundles // https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977#webpack-4 From d7084ec8f23c7ae876fcee3973fe222fd8958cc0 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 24 Dec 2024 01:27:59 +0000 Subject: [PATCH 148/157] fix(NA): test uncomment eui provider dev warning --- .../core-chrome-browser-internal/src/chrome_service.tsx | 4 +--- test/plugin_functional/test_suites/shared_ux/eui_provider.ts | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index 511100fff6d40..434639b07efdf 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -182,7 +182,6 @@ export class ChromeService { }; // Ensure developers are notified if working in a context that lacks the EUI Provider. - // @ts-expect-error private handleEuiDevProviderWarning = (notifications: NotificationsStart) => { const isDev = this.params.coreContext.env.mode.name === 'development'; if (isDev) { @@ -241,8 +240,7 @@ export class ChromeService { }: StartDeps): Promise { this.initVisibility(application); this.handleEuiFullScreenChanges(); - // commented out until https://github.com/elastic/kibana/issues/201805 can be fixed - // this.handleEuiDevProviderWarning(notifications); + this.handleEuiDevProviderWarning(notifications); const globalHelpExtensionMenuLinks$ = new BehaviorSubject( [] diff --git a/test/plugin_functional/test_suites/shared_ux/eui_provider.ts b/test/plugin_functional/test_suites/shared_ux/eui_provider.ts index b35e25bb9121b..fd503db46d27d 100644 --- a/test/plugin_functional/test_suites/shared_ux/eui_provider.ts +++ b/test/plugin_functional/test_suites/shared_ux/eui_provider.ts @@ -15,8 +15,7 @@ export default function ({ getPageObjects, getService }: PluginFunctionalProvide const testSubjects = getService('testSubjects'); const browser = getService('browser'); - // skipped until https://github.com/elastic/kibana/issues/201805 is resolved - describe.skip('EUI Provider Dev Warning', () => { + describe('EUI Provider Dev Warning', () => { it('shows error toast to developer', async () => { const pageTitle = 'EuiProvider test - Elastic'; From 34e36e78a4819dd78e426dcb8cc747c3df02614e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 24 Dec 2024 01:29:27 +0000 Subject: [PATCH 149/157] Revert "fix(NA): test uncomment eui provider dev warning" This reverts commit d7084ec8f23c7ae876fcee3973fe222fd8958cc0. --- .../core-chrome-browser-internal/src/chrome_service.tsx | 4 +++- test/plugin_functional/test_suites/shared_ux/eui_provider.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index 434639b07efdf..511100fff6d40 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -182,6 +182,7 @@ export class ChromeService { }; // Ensure developers are notified if working in a context that lacks the EUI Provider. + // @ts-expect-error private handleEuiDevProviderWarning = (notifications: NotificationsStart) => { const isDev = this.params.coreContext.env.mode.name === 'development'; if (isDev) { @@ -240,7 +241,8 @@ export class ChromeService { }: StartDeps): Promise { this.initVisibility(application); this.handleEuiFullScreenChanges(); - this.handleEuiDevProviderWarning(notifications); + // commented out until https://github.com/elastic/kibana/issues/201805 can be fixed + // this.handleEuiDevProviderWarning(notifications); const globalHelpExtensionMenuLinks$ = new BehaviorSubject( [] diff --git a/test/plugin_functional/test_suites/shared_ux/eui_provider.ts b/test/plugin_functional/test_suites/shared_ux/eui_provider.ts index fd503db46d27d..b35e25bb9121b 100644 --- a/test/plugin_functional/test_suites/shared_ux/eui_provider.ts +++ b/test/plugin_functional/test_suites/shared_ux/eui_provider.ts @@ -15,7 +15,8 @@ export default function ({ getPageObjects, getService }: PluginFunctionalProvide const testSubjects = getService('testSubjects'); const browser = getService('browser'); - describe('EUI Provider Dev Warning', () => { + // skipped until https://github.com/elastic/kibana/issues/201805 is resolved + describe.skip('EUI Provider Dev Warning', () => { it('shows error toast to developer', async () => { const pageTitle = 'EuiProvider test - Elastic'; From 7fe73d7d1bd418ece35d196f3d3de6dde679ce5b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 24 Dec 2024 01:35:53 +0000 Subject: [PATCH 150/157] fix(NA): storybook build --- .buildkite/scripts/steps/storybooks/build_and_upload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/scripts/steps/storybooks/build_and_upload.ts b/.buildkite/scripts/steps/storybooks/build_and_upload.ts index f8c52b2ded8cc..94bbd87686810 100644 --- a/.buildkite/scripts/steps/storybooks/build_and_upload.ts +++ b/.buildkite/scripts/steps/storybooks/build_and_upload.ts @@ -85,7 +85,7 @@ const build = () => { console.log('--- Building Storybooks'); for (const storybook of STORYBOOKS) { - exec(`STORYBOOK_BASE_URL=${STORYBOOK_BASE_URL}`, `yarn storybook --site ${storybook}`); + exec(`STORYBOOK_BASE_URL=${STORYBOOK_BASE_URL}`, `NODE_OPTIONS=--max-old-space-size=6144`, `yarn storybook --site ${storybook}`); } }; From e8f6ecc28e5ee2cf2c4135f20afc49c66bf918dc Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sun, 29 Dec 2024 04:37:54 +0000 Subject: [PATCH 151/157] chore(NA): upgrade aiops limits --- packages/kbn-optimizer/limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 8279b3ecaedf3..e2aa2bc8090af 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -2,7 +2,7 @@ pageLoadAssetSize: actions: 20000 advancedSettings: 27596 aiAssistantManagementSelection: 19146 - aiops: 18200 + aiops: 18300 alerting: 106936 apm: 64385 assetInventory: 18478 From 0d9916f5a5f4c8972db855de7872451c24ffb4c7 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sun, 29 Dec 2024 04:38:29 +0000 Subject: [PATCH 152/157] Revert "Revert "fix(NA): correctly cache @elastic/eui/optimize/es/services/theme/warning on ui-shared-deps-npm and src"" This reverts commit 0ed6f7a729647812f16379aa50ed844ff6b24165. --- packages/kbn-optimizer/limits.yml | 2 +- packages/kbn-ui-shared-deps-npm/webpack.config.js | 4 ++-- packages/kbn-ui-shared-deps-src/src/definitions.js | 3 +-- packages/kbn-ui-shared-deps-src/src/entry.js | 5 ++--- packages/kbn-ui-shared-deps-src/webpack.config.js | 3 +++ 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index e2aa2bc8090af..66d601e674051 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -31,7 +31,7 @@ pageLoadAssetSize: dataUsage: 30000 dataViewEditor: 28082 dataViewFieldEditor: 42021 - dataViewManagement: 6050 + dataViewManagement: 6250 dataViews: 65000 dataVisualizer: 30000 devTools: 38637 diff --git a/packages/kbn-ui-shared-deps-npm/webpack.config.js b/packages/kbn-ui-shared-deps-npm/webpack.config.js index eade3a9a75a0e..4afa12e6385c1 100644 --- a/packages/kbn-ui-shared-deps-npm/webpack.config.js +++ b/packages/kbn-ui-shared-deps-npm/webpack.config.js @@ -61,12 +61,12 @@ module.exports = (_, argv) => { '@elastic/charts', '@elastic/eui', '@elastic/eui/optimize/es/components/provider/nested', - '@elastic/eui/optimize/es/services', - '@elastic/eui/optimize/es/services/format', + '@elastic/eui/optimize/es/services/theme/warning', '@elastic/eui/dist/eui_theme_amsterdam_light.json', '@elastic/eui/dist/eui_theme_amsterdam_dark.json', '@elastic/eui/dist/eui_theme_borealis_light.json', '@elastic/eui/dist/eui_theme_borealis_dark.json', + '@elastic/eui-theme-borealis', '@elastic/numeral', '@emotion/cache', '@emotion/react', diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js index 3e66e5a102f06..a7786bf3556a5 100644 --- a/packages/kbn-ui-shared-deps-src/src/definitions.js +++ b/packages/kbn-ui-shared-deps-src/src/definitions.js @@ -75,8 +75,7 @@ const externals = { '@elastic/eui': '__kbnSharedDeps__.ElasticEui', '@elastic/eui/lib/components/provider/nested': '__kbnSharedDeps__.ElasticEuiLibComponentsUseIsNestedEuiProvider', - '@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices', - '@elastic/eui/lib/services/format': '__kbnSharedDeps__.ElasticEuiLibServicesFormat', + '@elastic/eui/lib/services/theme/warning': '__kbnSharedDeps__.ElasticEuiLibServicesThemeWarning', '@elastic/eui-theme-borealis': '__kbnSharedDeps__.ElasticEuiThemeBorealis', // transient dep of eui diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js index 1d7e6442e29d0..f30f75f7bd5af 100644 --- a/packages/kbn-ui-shared-deps-src/src/entry.js +++ b/packages/kbn-ui-shared-deps-src/src/entry.js @@ -41,10 +41,9 @@ export const Rxjs = require('rxjs'); export const ElasticNumeral = require('@elastic/numeral'); export const ElasticCharts = require('@elastic/charts'); export const ElasticEui = require('@elastic/eui'); -export const ElasticEuiThemeBorealis = require('@elastic/eui-theme-borealis'); export const ElasticEuiLibComponentsUseIsNestedEuiProvider = require('@elastic/eui/optimize/es/components/provider/nested'); -export const ElasticEuiLibServices = require('@elastic/eui/optimize/es/services'); -export const ElasticEuiLibServicesFormat = require('@elastic/eui/optimize/es/services/format'); +export const ElasticEuiLibServicesThemeWarning = require('@elastic/eui/optimize/es/services/theme/warning'); +export const ElasticEuiThemeBorealis = require('@elastic/eui-theme-borealis'); export const KbnDatemath = require('@kbn/datemath'); export const HelloPangeaDnd = require('@hello-pangea/dnd/dist/dnd'); export const ReduxjsToolkit = require('@reduxjs/toolkit'); diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 5672ac0917e57..c33830390e006 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -114,6 +114,9 @@ module.exports = { // // conditionNames: ['require', 'node', 'module', 'import', 'default'], alias: { '@elastic/eui$': '@elastic/eui/optimize/es', + '@elastic/eui/lib/components/provider/nested$': + '@elastic/eui/optimize/es/components/provider/nested', + '@elastic/eui/lib/services/theme/warning$': '@elastic/eui/optimize/es/services/theme/warning', moment: MOMENT_SRC, // NOTE: Used to include react profiling on bundles // https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977#webpack-4 From 09ac9af6cb1ef3a946f7562c3b3a75987d7943f8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sun, 29 Dec 2024 04:40:06 +0000 Subject: [PATCH 153/157] fix(NA): linting at .buildkite/scripts/steps/storybooks/build_and_upload.ts --- .buildkite/scripts/steps/storybooks/build_and_upload.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.buildkite/scripts/steps/storybooks/build_and_upload.ts b/.buildkite/scripts/steps/storybooks/build_and_upload.ts index 94bbd87686810..712ef55cce973 100644 --- a/.buildkite/scripts/steps/storybooks/build_and_upload.ts +++ b/.buildkite/scripts/steps/storybooks/build_and_upload.ts @@ -85,7 +85,11 @@ const build = () => { console.log('--- Building Storybooks'); for (const storybook of STORYBOOKS) { - exec(`STORYBOOK_BASE_URL=${STORYBOOK_BASE_URL}`, `NODE_OPTIONS=--max-old-space-size=6144`, `yarn storybook --site ${storybook}`); + exec( + `STORYBOOK_BASE_URL=${STORYBOOK_BASE_URL}`, + `NODE_OPTIONS=--max-old-space-size=6144`, + `yarn storybook --site ${storybook}` + ); } }; From 5ed066d11d0a8257e982e72de1ba5c8711c696ff Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 4 Jan 2025 02:31:34 +0000 Subject: [PATCH 154/157] fix(NA): typescript error on discover storybook --- .../src/integration_tests/build.test.ts | 4 ++-- .../.storybook/{discover.webpack.ts => main.js} | 4 ++-- .../plugins/shared/discover/.storybook/main.ts | 12 ------------ 3 files changed, 4 insertions(+), 16 deletions(-) rename src/platform/plugins/shared/discover/.storybook/{discover.webpack.ts => main.js} (81%) delete mode 100644 src/platform/plugins/shared/discover/.storybook/main.ts diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index 92525c1169353..8620611fc469e 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -98,8 +98,8 @@ it('builds a generated plugin into a viable archive', async () => { "kibana/fooTestPlugin/server/plugin.js", "kibana/fooTestPlugin/server/routes/index.js", "kibana/fooTestPlugin/server/types.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.122.js", - "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.122.js.br", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.189.js", + "kibana/fooTestPlugin/target/public/fooTestPlugin.chunk.189.js.br", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js", "kibana/fooTestPlugin/target/public/fooTestPlugin.plugin.js.br", "kibana/fooTestPlugin/translations/ja-JP.json", diff --git a/src/platform/plugins/shared/discover/.storybook/discover.webpack.ts b/src/platform/plugins/shared/discover/.storybook/main.js similarity index 81% rename from src/platform/plugins/shared/discover/.storybook/discover.webpack.ts rename to src/platform/plugins/shared/discover/.storybook/main.js index 91c2a37df3942..aa82846a1c085 100644 --- a/src/platform/plugins/shared/discover/.storybook/discover.webpack.ts +++ b/src/platform/plugins/shared/discover/.storybook/main.js @@ -7,9 +7,9 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { defaultConfig, StorybookConfig } from '@kbn/storybook'; +import { defaultConfig } from '@kbn/storybook'; -export const discoverStorybookConfig: StorybookConfig = { +module.exports = { ...defaultConfig, stories: ['../**/*.stories.tsx'], }; diff --git a/src/platform/plugins/shared/discover/.storybook/main.ts b/src/platform/plugins/shared/discover/.storybook/main.ts deleted file mode 100644 index 6833e95dbd5a8..0000000000000 --- a/src/platform/plugins/shared/discover/.storybook/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { discoverStorybookConfig } from './discover.webpack'; - -module.exports = discoverStorybookConfig; From 423c9e604384ac7d37e43e54292c2f8a5bb9d3d8 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:23:03 +0000 Subject: [PATCH 155/157] [CI] Auto-commit changed files from 'node scripts/notice' --- yarn.lock | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5b51035171d47..2d0515c70f836 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27409,16 +27409,7 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.15, postcss@^8.4.33: - version "8.4.47" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" - integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== - dependencies: - nanoid "^3.3.7" - picocolors "^1.1.0" - source-map-js "^1.2.1" - -postcss@^8.4.19, postcss@^8.4.23, postcss@^8.4.31: +postcss@^8.2.15, postcss@^8.4.19, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.33: version "8.4.49" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== From 2112d4e2db81370b702234387d0f24e08291ea7d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Mon, 13 Jan 2025 22:37:49 +0000 Subject: [PATCH 156/157] fix(NA): quick-checks --- .../dashboard/public/dashboard_app/_dashboard_app.scss | 2 +- .../graph/.storybook/main.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/platform/plugins/shared/dashboard/public/dashboard_app/_dashboard_app.scss b/src/platform/plugins/shared/dashboard/public/dashboard_app/_dashboard_app.scss index e78e7907c9847..dfef1bf0c4ec9 100644 --- a/src/platform/plugins/shared/dashboard/public/dashboard_app/_dashboard_app.scss +++ b/src/platform/plugins/shared/dashboard/public/dashboard_app/_dashboard_app.scss @@ -1,4 +1,4 @@ -@import '../../../../../src/core/public/mixins'; +@import '../../../../../../../src/core/public/mixins'; .dshUnsavedListingItem { margin-top: $euiSizeM; diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/main.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/main.ts index b5e6c436a29b6..2936cad4c0ddb 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/main.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/main.ts @@ -18,11 +18,11 @@ const graphWebpack: Configuration = { '../src/components/mock/use_fetch_graph_data.mock.ts' ), }, - }, - node: { - fs: 'empty', - stream: false, - os: false, + fallback: { + fs: false, + stream: false, + os: false, + }, }, }; From 777c6a60d0d03380f672b66914d01887daaf9e0b Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 16 Jan 2025 03:42:19 +0000 Subject: [PATCH 157/157] chore(NA): update limits --- packages/kbn-optimizer/limits.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 9060b19312e80..3bf3bdf356242 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -122,8 +122,8 @@ pageLoadAssetSize: observabilityShared: 111036 osquery: 107090 painlessLab: 179748 - presentationPanel: 11468 - presentationUtil: 33186 + presentationPanel: 11550 + presentationUtil: 33905 productDocBase: 22500 profiling: 36694 remoteClusters: 51327