mirror of
https://github.com/grafana/grafana.git
synced 2026-08-14 07:04:57 -05:00
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:
co-authored by
Hugo Häggmark
parent
1b2a1a9621
commit
b2e94d0733
@@ -54,6 +54,7 @@
|
||||
"rollup-plugin-visualizer": "4.2.0",
|
||||
"sinon": "8.1.1",
|
||||
"tinycolor2": "1.4.1",
|
||||
"tslib": "2.3.1",
|
||||
"typescript": "4.4.3"
|
||||
},
|
||||
"volta": {
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
"execa": "5.1.1",
|
||||
"resolve-as-bin": "2.1.0",
|
||||
"ts-loader": "6.2.1",
|
||||
"tslib": "2.3.1",
|
||||
"typescript": "4.4.3",
|
||||
"yaml": "^1.8.3"
|
||||
},
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/css": "11.1.3",
|
||||
"@grafana/data": "8.3.0-pre",
|
||||
"@grafana/e2e-selectors": "8.3.0-pre",
|
||||
"@grafana/ui": "8.3.0-pre",
|
||||
"history": "4.10.1",
|
||||
"systemjs": "0.20.19",
|
||||
"systemjs-plugin-css": "0.1.37"
|
||||
"systemjs-plugin-css": "0.1.37",
|
||||
"tslib": "2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@grafana/tsconfig": "^1.0.0-rc1",
|
||||
|
||||
@@ -59,7 +59,7 @@ executors:
|
||||
default_exec: # declares a reusable executor
|
||||
docker:
|
||||
- image: srclosson/grafana-plugin-ci-alpine:latest
|
||||
e2e_exec:
|
||||
e2e_exec:
|
||||
docker:
|
||||
- image: srclosson/grafana-plugin-ci-e2e:latest
|
||||
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
mkdir ci
|
||||
[ -f ~/project/node_modules/.bin/grafana-toolkit ] || yarn install --frozen-lockfile
|
||||
[ -f ~/project/node_modules/.bin/grafana-toolkit ] || yarn install --immutable
|
||||
- save_cache:
|
||||
name: save node_modules
|
||||
paths:
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
command: |
|
||||
mkdir ci # Avoid error if not exists
|
||||
mkdir ci/jobs # Avoid error if not exists
|
||||
mkdir ci/jobs/provisioning
|
||||
mkdir ci/jobs/provisioning
|
||||
mv plugin-provisioning/${PROVISIONING_REPO_PATH}/* ci/jobs/provisioning
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
@@ -228,7 +228,7 @@ jobs:
|
||||
ginstall canary
|
||||
/opt/grafana/bin/grafana-server -config ci/grafana-test-env/custom.ini -homepath /opt/grafana &
|
||||
## To make sure grafana has started up
|
||||
while ! $(netstat -tulpn | grep 3000 >/dev/null 2>&1); do sleep 1; done
|
||||
while ! $(netstat -tulpn | grep 3000 >/dev/null 2>&1); do sleep 1; done
|
||||
/opt/grafana/bin/grafana-cli --version
|
||||
- run:
|
||||
name: Copy provisioning files
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"@grafana/eslint-config": "2.5.0",
|
||||
"@grafana/tsconfig": "^1.0.0-rc1",
|
||||
"@grafana/ui": "8.3.0-pre",
|
||||
"@rushstack/eslint-patch": "1.0.6",
|
||||
"@types/command-exists": "^1.2.0",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/inquirer": "^6.0.3",
|
||||
@@ -43,8 +44,6 @@
|
||||
"@types/semver": "^6.0.0",
|
||||
"@types/tmp": "^0.1.0",
|
||||
"@types/webpack": "4.41.7",
|
||||
"@typescript-eslint/eslint-plugin": "4.28.0",
|
||||
"@typescript-eslint/parser": "4.28.0",
|
||||
"axios": "0.21.2",
|
||||
"babel-jest": "26.6.3",
|
||||
"babel-loader": "8.2.2",
|
||||
@@ -56,10 +55,6 @@
|
||||
"copy-webpack-plugin": "5.1.2",
|
||||
"css-loader": "3.4.2",
|
||||
"eslint": "7.21.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-jsdoc": "36.1.0",
|
||||
"eslint-plugin-prettier": "3.3.1",
|
||||
"eslint-plugin-react-hooks": "4.2.0",
|
||||
"execa": "^5.1.1",
|
||||
"file-loader": "5.0.2",
|
||||
"fork-ts-checker-webpack-plugin": "1.0.0",
|
||||
|
||||
@@ -100,7 +100,7 @@ export const lintPlugin = ({ fix }: Fixable = {}) =>
|
||||
if (filePaths.length > 0) {
|
||||
return filePaths[0];
|
||||
} else {
|
||||
return resolvePath(__dirname, '../../config/eslint.plugin.json');
|
||||
return resolvePath(__dirname, '../../config/eslint.plugin.js');
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -108,6 +108,7 @@ export const lintPlugin = ({ fix }: Fixable = {}) =>
|
||||
const cli = new CLIEngine({
|
||||
configFile,
|
||||
fix,
|
||||
useEslintrc: false,
|
||||
});
|
||||
|
||||
const report = cli.executeOnFiles(await getTypescriptSources());
|
||||
|
||||
@@ -25,6 +25,7 @@ export const bundlePlugin = async ({ watch, production, preserveConsole }: Plugi
|
||||
console.log('Started watching plugin for changes...');
|
||||
compiler.watch({}, (err, stats) => {});
|
||||
|
||||
// @ts-ignore
|
||||
compiler.hooks.invalid.tap('invalid', () => {
|
||||
clearConsole();
|
||||
console.log('Compiling...');
|
||||
|
||||
@@ -54,7 +54,7 @@ const copyFiles = () => {
|
||||
'src/config/prettier.plugin.rc.js',
|
||||
'src/config/tsconfig.plugin.json',
|
||||
'src/config/tsconfig.plugin.local.json',
|
||||
'src/config/eslint.plugin.json',
|
||||
'src/config/eslint.plugin.js',
|
||||
'src/config/styles.mock.js',
|
||||
'src/config/jest.plugin.config.local.js',
|
||||
'src/config/matchMedia.js',
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { flow, camelCase, upperFirst } from 'lodash';
|
||||
|
||||
export const pascalCase = flow(camelCase, upperFirst);
|
||||
export const pascalCase = flow([camelCase, upperFirst]);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
require('@rushstack/eslint-patch/modern-module-resolution');
|
||||
|
||||
module.exports = {
|
||||
extends: ['@grafana/eslint-config'],
|
||||
rules: {
|
||||
'react/prop-types': 'off',
|
||||
},
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": ["@grafana/eslint-config"],
|
||||
"rules": {
|
||||
"react/prop-types": "off"
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,7 @@
|
||||
"react-transition-group": "4.4.1",
|
||||
"slate": "0.47.8",
|
||||
"tinycolor2": "1.4.1",
|
||||
"tslib": "2.3.1",
|
||||
"uplot": "1.6.16"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -112,7 +113,10 @@
|
||||
"@types/slate": "0.47.2",
|
||||
"@types/slate-react": "0.22.5",
|
||||
"@types/tinycolor2": "1.4.1",
|
||||
"@wojtekmaj/enzyme-adapter-react-17": "0.6.2",
|
||||
"common-tags": "^1.8.0",
|
||||
"csstype": "3.0.9",
|
||||
"enzyme": "3.11.0",
|
||||
"mock-raf": "1.0.1",
|
||||
"react-docgen-typescript-loader": "3.7.2",
|
||||
"react-test-renderer": "17.0.1",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ThemeVizHue } from '@grafana/data';
|
||||
import { Color } from 'csstype';
|
||||
import { Property } from 'csstype';
|
||||
import { ColorSwatch, ColorSwatchVariant } from './ColorSwatch';
|
||||
import { upperFirst } from 'lodash';
|
||||
|
||||
interface NamedColorsGroupProps {
|
||||
hue: ThemeVizHue;
|
||||
selectedColor?: Color;
|
||||
selectedColor?: Property.Color;
|
||||
onColorSelect: (colorName: string) => void;
|
||||
key?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import '../../node_modules/rc-time-picker/assets/index.css';
|
||||
@import '~rc-time-picker/assets/index.css';
|
||||
|
||||
.rc-time-picker-input,
|
||||
.rc-time-picker-panel-input-wrap,
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// Need to import this to get default styles from rc-drawer
|
||||
@import '../../node_modules/rc-drawer/assets/index.css';
|
||||
@import '~rc-drawer/assets/index.css';
|
||||
|
||||
@@ -11,6 +11,7 @@ export const Link = forwardRef<HTMLAnchorElement, Props>(({ href, children, ...r
|
||||
const validUrl = locationUtil.stripBaseFromUrl(textUtil.sanitizeUrl(href ?? ''));
|
||||
|
||||
return (
|
||||
// @ts-ignore
|
||||
<RouterLink ref={ref as React.Ref<HTMLAnchorElement>} to={validUrl} {...rest}>
|
||||
{children}
|
||||
</RouterLink>
|
||||
|
||||
@@ -1 +1 @@
|
||||
@import '../../node_modules/rc-slider/assets/index.css';
|
||||
@import '~rc-slider/assets/index.css';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Column, Row } from 'react-table';
|
||||
import memoizeOne from 'memoize-one';
|
||||
import { ContentPosition } from 'csstype';
|
||||
import { Property } from 'csstype';
|
||||
import {
|
||||
DataFrame,
|
||||
Field,
|
||||
@@ -17,7 +17,7 @@ import { JSONViewCell } from './JSONViewCell';
|
||||
import { ImageCell } from './ImageCell';
|
||||
import { getFooterValue } from './FooterRow';
|
||||
|
||||
export function getTextAlign(field?: Field): ContentPosition {
|
||||
export function getTextAlign(field?: Field): Property.JustifyContent {
|
||||
if (!field) {
|
||||
return 'flex-start';
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// importing the uPlot css so it will be bundled with the rest of the styling.
|
||||
@import '../../node_modules/uplot/dist/uPlot.min.css';
|
||||
@import '~uplot/dist/uPlot.min.css';
|
||||
|
||||
.uplot {
|
||||
font-family: inherit;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"@types/deep-freeze": "^0.1.1",
|
||||
"@types/hoist-non-react-statics": "^3.3.1",
|
||||
"@types/lodash": "^4.14.123",
|
||||
"@types/react": "16.9.9",
|
||||
"@types/react-icons": "2.2.7",
|
||||
"@types/recompose": "^0.30.7",
|
||||
"@types/slate-react": "0.22.5",
|
||||
@@ -37,9 +38,11 @@
|
||||
"lru-memoize": "^1.1.0",
|
||||
"memoize-one": "^5.0.0",
|
||||
"moment": "2.29.1",
|
||||
"react": "17.0.1",
|
||||
"react-icons": "2.2.7",
|
||||
"recompose": "^0.25.0",
|
||||
"tinycolor2": "1.4.1",
|
||||
"tslib": "2.3.1",
|
||||
"tween-functions": "^1.2.0"
|
||||
},
|
||||
"volta": {
|
||||
|
||||
Reference in New Issue
Block a user