Chore: Migrate yarn from v1 to v2 (#39082)

* Chore: Migrate yarn from v1 to v2

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
kay delaney
2021-10-08 15:19:10 +01:00
committed by GitHub
co-authored by Hugo Häggmark
parent 1b2a1a9621
commit b2e94d0733
41 changed files with 34840 additions and 24788 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ function build_frontend() {
if [ ! -d "dist" ]; then
mkdir dist
fi
yarn install --pure-lockfile --no-progress
YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable
echo "Building frontend"
start=$(date +%s%N)
+1 -1
View File
@@ -109,7 +109,7 @@ ENV GOVERSION=1.17 \
PATH=/usr/local/go/bin:$PATH \
GOPATH=/go \
NODEVERSION=14.17.6-1nodesource1 \
YARNVERSION=1.22.5-1
YARNVERSION=3.1.0-rc.5
# Use ARG so as not to persist environment variable in image
ARG DEBIAN_FRONTEND=noninteractive
+1 -1
View File
@@ -14,7 +14,7 @@ install:
# install nodejs and npm
- ps: Install-Product node $env:nodejs_version
- npm install -g yarn --silent
- yarn install --pure-lockfile --no-progress
- YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable
- npm install -g grunt-cli
- appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip
- 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL
+4 -4
View File
@@ -62,7 +62,7 @@ def initialize_step(edition, platform, ver_mode, is_downstream=False, install_de
if install_deps:
common_cmds.extend([
'yarn install --frozen-lockfile --no-progress',
'yarn install --immutable',
])
if edition in ('enterprise', 'enterprise2'):
source_commit = ''
@@ -427,7 +427,7 @@ def test_a11y_frontend_step(edition, port=3001):
'failure': 'ignore',
'commands': [
'yarn wait-on http://$HOST:$PORT',
'yarn -s test:accessibility --json > pa11y-ci-results.json',
'yarn run test:accessibility --json > pa11y-ci-results.json',
],
}
@@ -446,7 +446,7 @@ def test_a11y_frontend_step_pr(edition, port=3001):
'failure': 'ignore',
'commands': [
'yarn wait-on http://$HOST:$PORT',
'yarn -s test:accessibility-pr',
'yarn run test:accessibility-pr',
],
}
@@ -632,7 +632,7 @@ def e2e_tests_step(edition, port=3001, tries=None):
'commands': [
# Have to re-install Cypress since it insists on searching for its binary beneath /root/.cache,
# even though the Yarn cache directory is beneath /usr/local/share somewhere
'./node_modules/.bin/cypress install',
'yarn run cypress install',
cmd,
],
}
+6
View File
@@ -38,6 +38,11 @@ module.exports = {
// storybook v6 bump caused the app to bundle multiple versions of react breaking hooks
// make sure to resolve only from the project: https://github.com/facebook/react/issues/13991#issuecomment-435587809
react: path.resolve(__dirname, '../../node_modules/react'),
// Needed as these don't work across different execution contexts, which can cause
// problems with @grafana/ui
'react-router': require.resolve('react-router'),
'react-router-dom': require.resolve('react-router-dom'),
jquery: require.resolve('jquery'),
// some of data source pluginis use global Prism object to add the language definition
// we want to have same Prism object in core and in grafana/ui
prismjs: path.resolve(__dirname, '../../node_modules/prismjs'),
@@ -49,6 +54,7 @@ module.exports = {
path.resolve('node_modules'),
],
fallback: {
buffer: false,
fs: false,
stream: false,
http: false,