From f93ffd269324d8b8205686778c1b1ff997285a6d Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 25 Nov 2020 02:39:01 +0000 Subject: [PATCH] chore(NA): enable yarn prefer offline and local mirror for development (#84124) (#84297) * chore(NA): enable --prefer-offline by default * chore(NA): use prefer offline in the yarnrc * chore(NA): update kbn pm * chore(NA): add yarn offline mirror integration * chore(NA): remove non wanted prune feature due to switching between branches * chore(NA): re-introduce babel require hook # Conflicts: # .ci/packer_cache_for_branch.sh # .gitignore # vars/kibanaCoverage.groovy # vars/kibanaTeamAssign.groovy --- .gitignore | 3 +++ .yarnrc | 5 +++++ package.json | 6 +++--- src/dev/ci_setup/setup.sh | 2 +- yarn.lock | 6 +++--- 5 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .yarnrc diff --git a/.gitignore b/.gitignore index 1f9a4d415062..0fba24984916 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,6 @@ report.asciidoc # Ignore code owners to avoid pings on backports .github/CODEOWNERS + +# Yarn local mirror content +.yarn-local-mirror diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 000000000000..eceec9ca34a2 --- /dev/null +++ b/.yarnrc @@ -0,0 +1,5 @@ +# Configure an offline yarn mirror in the data folder +yarn-offline-mirror ".yarn-local-mirror" + +# Always look into the cache first before fetching online +--install.prefer-offline true diff --git a/package.json b/package.json index 914a514488e2..55a866e6e00a 100644 --- a/package.json +++ b/package.json @@ -240,7 +240,7 @@ "moment": "^2.24.0", "moment-duration-format": "^2.3.2", "moment-timezone": "^0.5.27", - "monaco-editor": "~0.17.0", + "monaco-editor": "^0.17.0", "mustache": "^2.3.2", "ngreact": "^0.5.1", "nock": "12.0.3", @@ -587,7 +587,7 @@ "babel-loader": "^8.0.6", "babel-plugin-add-module-exports": "^1.0.2", "babel-plugin-istanbul": "^6.0.0", - "babel-plugin-require-context-hook": "npm:babel-plugin-require-context-hook-babel7@1.0.0", + "babel-plugin-require-context-hook": "^1.0.0", "babel-plugin-styled-components": "^1.10.7", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "backport": "5.6.0", @@ -773,7 +773,7 @@ "react-fast-compare": "^2.0.4", "react-grid-layout": "^0.16.2", "react-markdown": "^4.3.1", - "react-monaco-editor": "~0.27.0", + "react-monaco-editor": "^0.27.0", "react-popper-tooltip": "^2.10.1", "react-resize-detector": "^4.2.0", "react-reverse-portal": "^1.0.4", diff --git a/src/dev/ci_setup/setup.sh b/src/dev/ci_setup/setup.sh index aabc1e75b902..61f578ba3397 100755 --- a/src/dev/ci_setup/setup.sh +++ b/src/dev/ci_setup/setup.sh @@ -14,7 +14,7 @@ echo " -- TEST_ES_SNAPSHOT_VERSION='$TEST_ES_SNAPSHOT_VERSION'" ### install dependencies ### echo " -- installing node.js dependencies" -yarn kbn bootstrap --prefer-offline +yarn kbn bootstrap ### ### Download es snapshots diff --git a/yarn.lock b/yarn.lock index 3932104261b4..5dc850ff5f25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7936,7 +7936,7 @@ babel-plugin-react-docgen@^4.1.0: react-docgen "^5.0.0" recast "^0.14.7" -babel-plugin-require-context-hook@^1.0.0, "babel-plugin-require-context-hook@npm:babel-plugin-require-context-hook-babel7@1.0.0": +babel-plugin-require-context-hook@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-require-context-hook-babel7/-/babel-plugin-require-context-hook-babel7-1.0.0.tgz#1273d4cee7e343d0860966653759a45d727e815d" integrity sha512-kez0BAN/cQoyO1Yu1nre1bQSYZEF93Fg7VQiBHFfMWuaZTy7vJSTT4FY68FwHTYG53Nyt0A7vpSObSVxwweQeQ== @@ -20423,7 +20423,7 @@ moment-timezone@^0.5.27: resolved "https://registry.yarnpkg.com/moment/-/moment-2.28.0.tgz#cdfe73ce01327cee6537b0fafac2e0f21a237d75" integrity sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw== -monaco-editor@~0.17.0: +monaco-editor@^0.17.0: version "0.17.1" resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.17.1.tgz#8fbe96ca54bfa75262706e044f8f780e904aa45c" integrity sha512-JAc0mtW7NeO+0SwPRcdkfDbWLgkqL9WfP1NbpP9wNASsW6oWqgZqNIWt4teymGjZIXTElx3dnQmUYHmVrJ7HxA== @@ -23495,7 +23495,7 @@ react-moment-proptypes@^1.7.0: dependencies: moment ">=1.6.0" -react-monaco-editor@~0.27.0: +react-monaco-editor@^0.27.0: version "0.27.0" resolved "https://registry.yarnpkg.com/react-monaco-editor/-/react-monaco-editor-0.27.0.tgz#2dbf47b8fd4d8e4763934051f07291d9b128bb89" integrity sha512-Im40xO4DuFlQ6kVcSBHC+p70fD/5aErUy1uyLT9RZ4nlehn6BOPpwmcw/2IN/LfMvy8X4WmLuuvrNftBZLH+vA==