mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `7.17`: - [[ci] Add node scripts/yarn_deduplicate check (main)(#169165)](https://github.com/elastic/kibana/pull/169165) --------- Co-authored-by: Jon <jon@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
e10060a559
commit
232eb0fe1c
8 changed files with 2080 additions and 7289 deletions
|
@ -22,3 +22,4 @@ export DISABLE_BOOTSTRAP_VALIDATION=false
|
|||
.buildkite/scripts/steps/checks/test_projects.sh
|
||||
.buildkite/scripts/steps/checks/test_hardening.sh
|
||||
.buildkite/scripts/steps/checks/prettier_topology.sh
|
||||
.buildkite/scripts/steps/checks/yarn_deduplicate.sh
|
||||
|
|
10
.buildkite/scripts/steps/checks/yarn_deduplicate.sh
Executable file
10
.buildkite/scripts/steps/checks/yarn_deduplicate.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source .buildkite/scripts/common/util.sh
|
||||
|
||||
echo "--- Check yarn.lock for duplicated modules"
|
||||
node scripts/yarn_deduplicate && yarn kbn bootstrap
|
||||
|
||||
check_for_changed_files 'node scripts/yarn_deduplicate' true 'TO FIX: Run node '"'"'scripts/yarn_deduplicate && yarn kbn bootstrap'"'"' locally, or add an exception to src/dev/yarn_deduplicate/index.ts and then commit the changes and push to your branch'
|
|
@ -834,6 +834,7 @@
|
|||
"xml-crypto": "^6.0.0",
|
||||
"xmlbuilder": "13.0.2",
|
||||
"yargs": "^15.4.1",
|
||||
"yarn-deduplicate": "^6.0.2",
|
||||
"zlib": "^1.0.5"
|
||||
},
|
||||
"packageManager": "yarn@1.22.21"
|
||||
|
|
|
@ -13,7 +13,7 @@ pageLoadAssetSize:
|
|||
core: 435325
|
||||
crossClusterReplication: 65408
|
||||
customIntegrations: 28810
|
||||
dashboard: 186763
|
||||
dashboard: 218038
|
||||
dashboardEnhanced: 65646
|
||||
dashboardMode: 22716
|
||||
data: 491273
|
||||
|
|
8265
packages/kbn-pm/dist/index.js
vendored
8265
packages/kbn-pm/dist/index.js
vendored
File diff suppressed because one or more lines are too long
10
scripts/yarn_deduplicate.js
Normal file
10
scripts/yarn_deduplicate.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('../src/dev/yarn_deduplicate');
|
22
src/dev/yarn_deduplicate/index.ts
Normal file
22
src/dev/yarn_deduplicate/index.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { writeFileSync, readFileSync } from 'fs';
|
||||
import { fixDuplicates } from 'yarn-deduplicate';
|
||||
import { REPO_ROOT } from '@kbn/utils';
|
||||
|
||||
const yarnLockFile = resolve(REPO_ROOT, 'yarn.lock');
|
||||
const yarnLock = readFileSync(yarnLockFile, 'utf-8');
|
||||
const output = fixDuplicates(yarnLock, {
|
||||
useMostCommon: false,
|
||||
excludeScopes: ['@types'],
|
||||
excludePackages: ['axe-core', '@babel/types', 'classnames', 'csstype', 'yaml'],
|
||||
});
|
||||
|
||||
writeFileSync(yarnLockFile, output);
|
Loading…
Add table
Add a link
Reference in a new issue