Compare commits
33 Commits
sriram/SQL
...
jackw/repl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60722380dc | ||
|
|
bfbc3c048f | ||
|
|
c6ffb5f880 | ||
|
|
245be481fd | ||
|
|
f07375a66b | ||
|
|
ec8b528610 | ||
|
|
1588e42c54 | ||
|
|
f47bc26c37 | ||
|
|
84ed75a4d8 | ||
|
|
c0211b88b2 | ||
|
|
6c545e9aaa | ||
|
|
ac18fe202d | ||
|
|
a66530585d | ||
|
|
4d13e996b4 | ||
|
|
2fd491d101 | ||
|
|
331b18df7f | ||
|
|
9499057f6e | ||
|
|
6a6747ae81 | ||
|
|
7328089b30 | ||
|
|
9435637082 | ||
|
|
73a5cb4610 | ||
|
|
fe555d134d | ||
|
|
c6f100b4d7 | ||
|
|
2698ca3a90 | ||
|
|
ccdf1ff82c | ||
|
|
0bff060af2 | ||
|
|
353401617e | ||
|
|
45f958a714 | ||
|
|
b17abed582 | ||
|
|
2228726c0d | ||
|
|
3a4f57c1ee | ||
|
|
a19528fa05 | ||
|
|
742de5210a |
@@ -2106,8 +2106,7 @@ steps:
|
|||||||
- apk add --update jq
|
- apk add --update jq
|
||||||
- new_version=$(cat package.json | jq -r .version | sed s/pre/${DRONE_BUILD_NUMBER}/g)
|
- new_version=$(cat package.json | jq -r .version | sed s/pre/${DRONE_BUILD_NUMBER}/g)
|
||||||
- 'echo "New version: $new_version"'
|
- 'echo "New version: $new_version"'
|
||||||
- yarn run lerna version $new_version --exact --no-git-tag-version --no-push --force-publish
|
- yarn nx release version $new_version --group grafanaPackages,privatePackages,plugins
|
||||||
-y
|
|
||||||
- yarn install --mode=update-lockfile
|
- yarn install --mode=update-lockfile
|
||||||
depends_on:
|
depends_on:
|
||||||
- yarn-install
|
- yarn-install
|
||||||
@@ -5564,6 +5563,6 @@ kind: secret
|
|||||||
name: gcr_credentials
|
name: gcr_credentials
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: f16a4715c7a4e6a4ffb1fe041b42fb966310fd5da455239614e9a239493aff82
|
hmac: 950ed494abe239bcbd1771dcd1a49e365a2b5fba7f8e8613e015e14b21c13341
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@@ -450,7 +450,6 @@
|
|||||||
/.yarn @grafana/frontend-ops
|
/.yarn @grafana/frontend-ops
|
||||||
/.yarnrc.yml @grafana/frontend-ops
|
/.yarnrc.yml @grafana/frontend-ops
|
||||||
/yarn.lock @grafana/frontend-ops
|
/yarn.lock @grafana/frontend-ops
|
||||||
/lerna.json @grafana/frontend-ops
|
|
||||||
/.prettierrc.js @grafana/frontend-ops
|
/.prettierrc.js @grafana/frontend-ops
|
||||||
/.vim @zoltanbedi
|
/.vim @zoltanbedi
|
||||||
/jest.config.js @grafana/frontend-ops
|
/jest.config.js @grafana/frontend-ops
|
||||||
|
|||||||
2
.github/pr-commands.json
vendored
2
.github/pr-commands.json
vendored
@@ -21,7 +21,7 @@
|
|||||||
"scripts/webpack/**/*",
|
"scripts/webpack/**/*",
|
||||||
"package.json",
|
"package.json",
|
||||||
"tsconfig.json",
|
"tsconfig.json",
|
||||||
"lerna.json",
|
"nx.json",
|
||||||
".prettierrc.js",
|
".prettierrc.js",
|
||||||
".eslintrc",
|
".eslintrc",
|
||||||
"**/*.mdx"
|
"**/*.mdx"
|
||||||
|
|||||||
2
.github/workflows/release-pr.yml
vendored
2
.github/workflows/release-pr.yml
vendored
@@ -145,7 +145,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Add package.json changes
|
- name: Add package.json changes
|
||||||
run: |
|
run: |
|
||||||
git add package.json lerna.json yarn.lock packages public
|
git add package.json yarn.lock packages public
|
||||||
test -e e2e/test-plugins && git add e2e/test-plugins
|
test -e e2e/test-plugins && git add e2e/test-plugins
|
||||||
git commit -m "Update version to ${{ inputs.version }}"
|
git commit -m "Update version to ${{ inputs.version }}"
|
||||||
|
|
||||||
|
|||||||
@@ -33,3 +33,6 @@ public/mockServiceWorker.js
|
|||||||
|
|
||||||
# Crowdin files
|
# Crowdin files
|
||||||
public/locales/**/*.json
|
public/locales/**/*.json
|
||||||
|
|
||||||
|
/.nx/cache
|
||||||
|
/.nx/workspace-data
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
|
||||||
"npmClient": "yarn",
|
|
||||||
"version": "11.6.0-pre"
|
|
||||||
}
|
|
||||||
54
nx.json
54
nx.json
@@ -1,15 +1,51 @@
|
|||||||
{
|
{
|
||||||
"tasksRunnerOptions": {
|
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
||||||
"default": {
|
|
||||||
"runner": "nx/tasks-runners/default",
|
|
||||||
"options": {
|
|
||||||
"cacheableOperations": ["build", "generate"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targetDefaults": {
|
"targetDefaults": {
|
||||||
"build": {
|
"build": {
|
||||||
"outputs": ["{projectRoot}/dist"]
|
"outputs": ["{projectRoot}/dist"],
|
||||||
|
"cache": true
|
||||||
|
},
|
||||||
|
"pack": {
|
||||||
|
"executor": "nx:run-commands",
|
||||||
|
"options": {
|
||||||
|
"command": "yarn pack --out \"../../npm-artifacts/%s-%v.tgz\"",
|
||||||
|
"cwd": "{projectRoot}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"generate": {
|
||||||
|
"cache": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"projectsRelationship": "fixed",
|
||||||
|
"groups": {
|
||||||
|
"grafanaPackages": {
|
||||||
|
"projects": [
|
||||||
|
"@grafana/data",
|
||||||
|
"@grafana/e2e-selectors",
|
||||||
|
"@grafana/flamegraph",
|
||||||
|
"@grafana/prometheus",
|
||||||
|
"@grafana/runtime",
|
||||||
|
"@grafana/schema",
|
||||||
|
"@grafana/ui"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"privatePackages": {
|
||||||
|
"projects": ["@grafana/sql", "@grafana/o11y-ds-frontend"]
|
||||||
|
},
|
||||||
|
"plugins": {
|
||||||
|
"projects": ["@grafana-plugins/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"generatorOptions": {
|
||||||
|
"skipLockFileUpdate": true
|
||||||
|
},
|
||||||
|
"git": {
|
||||||
|
"commit": false,
|
||||||
|
"stageChanges": false,
|
||||||
|
"tag": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultBase": "main"
|
"defaultBase": "main"
|
||||||
|
|||||||
11
package.json
11
package.json
@@ -35,8 +35,8 @@
|
|||||||
"lint:fix": "yarn lint:ts --fix",
|
"lint:fix": "yarn lint:ts --fix",
|
||||||
"packages:build": "nx run-many -t build --projects='tag:scope:package'",
|
"packages:build": "nx run-many -t build --projects='tag:scope:package'",
|
||||||
"packages:clean": "rimraf ./npm-artifacts && nx run-many -t clean --projects='tag:scope:package' --maxParallel=100",
|
"packages:clean": "rimraf ./npm-artifacts && nx run-many -t clean --projects='tag:scope:package' --maxParallel=100",
|
||||||
"packages:prepare": "lerna version --no-push --no-git-tag-version --force-publish --exact",
|
"packages:prepare": "nx release version --group grafanaPackages",
|
||||||
"packages:pack": "mkdir -p ./npm-artifacts && lerna exec --no-private -- yarn pack --out \"../../npm-artifacts/%s-%v.tgz\"",
|
"packages:pack": "mkdir -p ./npm-artifacts && nx run-many -t pack --projects='tag:scope:package'",
|
||||||
"packages:typecheck": "nx run-many -t typecheck --projects='tag:scope:package'",
|
"packages:typecheck": "nx run-many -t typecheck --projects='tag:scope:package'",
|
||||||
"prettier:check": "prettier --check --list-different=false --log-level=warn \"**/*.{ts,tsx,scss,md,mdx,json,js}\"",
|
"prettier:check": "prettier --check --list-different=false --log-level=warn \"**/*.{ts,tsx,scss,md,mdx,json,js}\"",
|
||||||
"prettier:checkDocs": "prettier --check --list-different=false --log-level=warn \"docs/**/*.md\" \"*.md\" \"packages/**/*.{ts,tsx,scss,md,mdx,json}\"",
|
"prettier:checkDocs": "prettier --check --list-different=false --log-level=warn \"docs/**/*.md\" \"*.md\" \"packages/**/*.{ts,tsx,scss,md,mdx,json}\"",
|
||||||
@@ -79,10 +79,11 @@
|
|||||||
"@cypress/webpack-preprocessor": "6.0.2",
|
"@cypress/webpack-preprocessor": "6.0.2",
|
||||||
"@emotion/eslint-plugin": "11.12.0",
|
"@emotion/eslint-plugin": "11.12.0",
|
||||||
"@grafana/eslint-config": "8.0.0",
|
"@grafana/eslint-config": "8.0.0",
|
||||||
"@grafana/eslint-plugin": "link:./packages/grafana-eslint-rules",
|
"@grafana/eslint-plugin": "workspace:*",
|
||||||
"@grafana/plugin-e2e": "1.17.1",
|
"@grafana/plugin-e2e": "1.17.1",
|
||||||
"@grafana/tsconfig": "^2.0.0",
|
"@grafana/tsconfig": "^2.0.0",
|
||||||
"@manypkg/get-packages": "^2.2.0",
|
"@manypkg/get-packages": "^2.2.0",
|
||||||
|
"@nx/js": "20.4.6",
|
||||||
"@playwright/test": "1.50.1",
|
"@playwright/test": "1.50.1",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
|
||||||
"@react-types/button": "3.10.2",
|
"@react-types/button": "3.10.2",
|
||||||
@@ -93,6 +94,7 @@
|
|||||||
"@rtk-query/codegen-openapi": "^2.0.0",
|
"@rtk-query/codegen-openapi": "^2.0.0",
|
||||||
"@rtsao/plugin-proposal-class-properties": "7.0.1-patch.1",
|
"@rtsao/plugin-proposal-class-properties": "7.0.1-patch.1",
|
||||||
"@stylistic/eslint-plugin-ts": "^3.0.0",
|
"@stylistic/eslint-plugin-ts": "^3.0.0",
|
||||||
|
"@swc-node/register": "1.8.0",
|
||||||
"@swc/core": "1.10.12",
|
"@swc/core": "1.10.12",
|
||||||
"@swc/helpers": "0.5.15",
|
"@swc/helpers": "0.5.15",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
@@ -208,13 +210,12 @@
|
|||||||
"jest-watch-typeahead": "^2.2.2",
|
"jest-watch-typeahead": "^2.2.2",
|
||||||
"jimp": "^1.6.0",
|
"jimp": "^1.6.0",
|
||||||
"jsdom-testing-mocks": "^1.13.1",
|
"jsdom-testing-mocks": "^1.13.1",
|
||||||
"lerna": "8.1.8",
|
|
||||||
"mini-css-extract-plugin": "2.9.2",
|
"mini-css-extract-plugin": "2.9.2",
|
||||||
"msw": "2.7.0",
|
"msw": "2.7.0",
|
||||||
"mutationobserver-shim": "0.3.7",
|
"mutationobserver-shim": "0.3.7",
|
||||||
"ngtemplate-loader": "2.1.0",
|
"ngtemplate-loader": "2.1.0",
|
||||||
"node-notifier": "10.0.1",
|
"node-notifier": "10.0.1",
|
||||||
"nx": "19.8.2",
|
"nx": "20.4.6",
|
||||||
"openapi-types": "^12.1.3",
|
"openapi-types": "^12.1.3",
|
||||||
"pdf-parse": "^1.1.1",
|
"pdf-parse": "^1.1.1",
|
||||||
"postcss": "8.5.1",
|
"postcss": "8.5.1",
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ This document contains information about Grafana frontend package versioning and
|
|||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
We use [Lerna](https://github.com/lerna/lerna) for packages versioning and releases.
|
We use [Nx](https://nx.dev/recipes/nx-release/get-started-with-nx-release) for package versioning.
|
||||||
|
|
||||||
All packages are versioned according to the current Grafana version:
|
All packages defined within the [nx.json `grafanaPackages` release group](../nx.json) are versioned according to the current Grafana version:
|
||||||
|
|
||||||
- Grafana v6.3.0-alpha1 -> @grafana/\* packages @ 6.3.0-alpha.1
|
- Grafana v6.3.0-alpha1 -> @grafana/\* packages @ 6.3.0-alpha.1
|
||||||
- Grafana v6.2.5 -> @grafana/\* packages @ 6.2.5
|
- Grafana v6.2.5 -> @grafana/\* packages @ 6.2.5
|
||||||
@@ -26,10 +26,10 @@ Alpha and beta releases are published under the `next` tag on npm.
|
|||||||
|
|
||||||
### Automatic prereleases
|
### Automatic prereleases
|
||||||
|
|
||||||
Every commit to main that has changes within the `packages` directory is a subject of npm packages release. _ALL_ packages must be released under version from lerna.json file with the drone build number added to it:
|
Every commit to main that has changes within the `packages` directory is subject to an npm release. _ALL_ packages must be released under version from package.json file with the drone build number added to it:
|
||||||
|
|
||||||
```
|
```
|
||||||
<lerna.json version>-<DRONE_BUILD_NUMBER>
|
<package.json version>-<DRONE_BUILD_NUMBER>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Manual release
|
### Manual release
|
||||||
@@ -39,7 +39,7 @@ Every commit to main that has changes within the `packages` directory is a subje
|
|||||||
> You must be logged in to NPM as part of Grafana NPM org before attempting to publish to the npm registry.
|
> You must be logged in to NPM as part of Grafana NPM org before attempting to publish to the npm registry.
|
||||||
|
|
||||||
1. Run `yarn packages:clean` script from the root directory. This will delete any previous builds of the packages.
|
1. Run `yarn packages:clean` script from the root directory. This will delete any previous builds of the packages.
|
||||||
2. Run `yarn packages:prepare` script from the root directory. This performs tests on the packages and prompts for the version of the packages. The version should be the same as the one being released.
|
2. Run `yarn packages:prepare` script from the root directory. This prompts for the version of the packages. The version should be the same as the one being released.
|
||||||
- Make sure you use semver convention. So, _place a dot between prerelease id and prerelease number_, i.e. 6.3.0-alpha.1
|
- Make sure you use semver convention. So, _place a dot between prerelease id and prerelease number_, i.e. 6.3.0-alpha.1
|
||||||
- Make sure you confirm the version bump when prompted!
|
- Make sure you confirm the version bump when prompted!
|
||||||
3. Run `yarn packages:build` script that compiles distribution code in `packages/grafana-*/dist`.
|
3. Run `yarn packages:build` script that compiles distribution code in `packages/grafana-*/dist`.
|
||||||
@@ -57,7 +57,7 @@ Every commit to main that has changes within the `packages` directory is a subje
|
|||||||
To build individual packages, run:
|
To build individual packages, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn packages:build --scope=@grafana/<data|e2e|e2e-selectors|runtime|schema|ui>
|
yarn nx run @grafana/<data|e2e-selectors|runtime|schema|ui>:build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setting up @grafana/\* packages for local development
|
### Setting up @grafana/\* packages for local development
|
||||||
@@ -74,7 +74,7 @@ From your terminal:
|
|||||||
|
|
||||||
1. Navigate to `devenv/local-npm` directory.
|
1. Navigate to `devenv/local-npm` directory.
|
||||||
2. Run `docker compose up`. This will start your local npm registry, available at http://localhost:4873/.
|
2. Run `docker compose up`. This will start your local npm registry, available at http://localhost:4873/.
|
||||||
3. To test `@grafana` packages published to your local npm registry uncomment `npmScopes` and `unsafeHttpWhitelist` properties in the `.yarnrc` file.
|
3. To test `@grafana` packages published to your local npm registry uncomment `npmScopes` and `unsafeHttpWhitelist` properties in the [`.yarnrc`](../.yarnrc.yml) file.
|
||||||
|
|
||||||
#### Publishing packages to local npm registry
|
#### Publishing packages to local npm registry
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@grafana/eslint-plugin",
|
"name": "@grafana/eslint-plugin",
|
||||||
"description": "ESLint rules for use within the Grafana repo. Not suitable (or supported) for external use.",
|
"description": "ESLint rules for use within the Grafana repo. Not suitable (or supported) for external use.",
|
||||||
"version": "11.6.0-pre",
|
"version": "1.0.0",
|
||||||
|
"private": true,
|
||||||
"main": "./index.cjs",
|
"main": "./index.cjs",
|
||||||
"author": "Grafana Labs",
|
"author": "Grafana Labs",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -20,6 +21,5 @@
|
|||||||
"@typescript-eslint/types": "^8.9.0",
|
"@typescript-eslint/types": "^8.9.0",
|
||||||
"eslint": "9.19.0",
|
"eslint": "9.19.0",
|
||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
}
|
||||||
"private": true
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/schema": "11.6.0-pre",
|
"@grafana/schema": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"react-select": "5.10.0",
|
"react-select": "5.10.0",
|
||||||
"react-use": "17.6.0",
|
"react-use": "17.6.0",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "@grafana/plugin-configs",
|
"name": "@grafana/plugin-configs",
|
||||||
"description": "Shared dependencies and files for core plugins",
|
"description": "Shared dependencies and files for core plugins",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "11.6.0-pre",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"@react-awesome-query-builder/ui": "6.6.4",
|
"@react-awesome-query-builder/ui": "6.6.4",
|
||||||
"immutable": "5.0.3",
|
"immutable": "5.0.3",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"tags": ["scope:package", "type:ui"],
|
"tags": ["scope:package", "type:ui"],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {}
|
"build": {},
|
||||||
|
"pack": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ func main() {
|
|||||||
".yarnrc.yml",
|
".yarnrc.yml",
|
||||||
"nx.json",
|
"nx.json",
|
||||||
"project.json",
|
"project.json",
|
||||||
"lerna.json",
|
|
||||||
"**/package.json",
|
"**/package.json",
|
||||||
"**/yarn.lock",
|
"**/yarn.lock",
|
||||||
},
|
},
|
||||||
@@ -70,7 +69,7 @@ func WithUpdatedVersion(d *dagger.Client, src *dagger.Directory, nodeVersion, ve
|
|||||||
WithWorkdir("/src").
|
WithWorkdir("/src").
|
||||||
WithExec([]string{"yarn", "install"}).
|
WithExec([]string{"yarn", "install"}).
|
||||||
WithExec([]string{"npm", "version", version, "--no-git-tag-version"}).
|
WithExec([]string{"npm", "version", version, "--no-git-tag-version"}).
|
||||||
WithExec([]string{"yarn", "run", "lerna", "version", version, "--no-push", "--no-git-tag-version", "--force-publish", "--exact", "--yes"}).
|
WithExec([]string{"yarn", "nx", "release", "version", version, "--no-git-commit", "--no-git-tag", "--no-stage-changes", "--group grafanaPackages"}).
|
||||||
WithExec([]string{"yarn", "install"}).
|
WithExec([]string{"yarn", "install"}).
|
||||||
WithExec([]string{"yarn", "prettier:write"}).
|
WithExec([]string{"yarn", "prettier:write"}).
|
||||||
Directory("/src").
|
Directory("/src").
|
||||||
|
|||||||
@@ -2,9 +2,12 @@ package lerna
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/build/fsutil"
|
"github.com/grafana/grafana/pkg/build/fsutil"
|
||||||
)
|
)
|
||||||
@@ -25,8 +28,24 @@ func PackFrontendPackages(ctx context.Context, tag, grafanaDir, artifactsDir str
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nxJSONPath := filepath.Join(grafanaDir, "nx.json")
|
||||||
// nolint:gosec
|
// nolint:gosec
|
||||||
cmd := exec.CommandContext(ctx, "yarn", "lerna", "exec", "--no-private", "--", "yarn", "pack", "--out", fmt.Sprintf("../../npm-artifacts/%%s-%v.tgz", tag))
|
nxJson, err := os.ReadFile(nxJSONPath)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to read nx.json: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var nxConf NxConf
|
||||||
|
|
||||||
|
if err := json.Unmarshal(nxJson, &nxConf); err != nil {
|
||||||
|
return fmt.Errorf("failed to unmarshall nx.json: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
packagesToPack := nxConf.Release.Groups.GrafanaPackages.Projects
|
||||||
|
grafanaPackages := strings.Join(packagesToPack, ",")
|
||||||
|
|
||||||
|
// nolint:gosec
|
||||||
|
cmd := exec.CommandContext(ctx, "yarn", "nx", "exec", fmt.Sprintf(`--projects="%s"`, grafanaPackages), "--", "yarn", "pack", "--out", fmt.Sprintf("%s/%%s-%v.tgz", artifactsDir, tag))
|
||||||
cmd.Dir = grafanaDir
|
cmd.Dir = grafanaDir
|
||||||
if output, err := cmd.CombinedOutput(); err != nil {
|
if output, err := cmd.CombinedOutput(); err != nil {
|
||||||
return fmt.Errorf("command '%s' failed to run, output: %s, err: %q", cmd.String(), output, err)
|
return fmt.Errorf("command '%s' failed to run, output: %s, err: %q", cmd.String(), output, err)
|
||||||
@@ -34,3 +53,17 @@ func PackFrontendPackages(ctx context.Context, tag, grafanaDir, artifactsDir str
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type NxConf struct {
|
||||||
|
Release Release `json:"release"`
|
||||||
|
}
|
||||||
|
type GrafanaPackages struct {
|
||||||
|
Projects []string `json:"projects"`
|
||||||
|
}
|
||||||
|
type Groups struct {
|
||||||
|
GrafanaPackages GrafanaPackages `json:"grafanaPackages"`
|
||||||
|
}
|
||||||
|
type Release struct {
|
||||||
|
ProjectsRelationship string `json:"projectsRelationship"`
|
||||||
|
Groups Groups `json:"groups"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import (
|
|||||||
const GrafanaDir = "."
|
const GrafanaDir = "."
|
||||||
const NpmArtifactDir = "./npm-artifacts"
|
const NpmArtifactDir = "./npm-artifacts"
|
||||||
|
|
||||||
// TODO: could this be replaced by `yarn lerna list -p` ?
|
|
||||||
var packages = []string{
|
var packages = []string{
|
||||||
"@grafana/ui",
|
"@grafana/ui",
|
||||||
"@grafana/data",
|
"@grafana/data",
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/schema": "11.6.0-pre",
|
"@grafana/schema": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"@kusto/monaco-kusto": "^10.0.0",
|
"@kusto/monaco-kusto": "^10.0.0",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"i18next": "^24.0.0",
|
"i18next": "^24.0.0",
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/jest-dom": "6.6.3",
|
"@testing-library/jest-dom": "6.6.3",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/google-sdk": "0.1.2",
|
"@grafana/google-sdk": "0.1.2",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/schema": "11.6.0-pre",
|
"@grafana/schema": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"debounce-promise": "3.1.2",
|
"debounce-promise": "3.1.2",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"i18next": "^24.0.0",
|
"i18next": "^24.0.0",
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/jest-dom": "6.6.3",
|
"@testing-library/jest-dom": "6.6.3",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
|
|||||||
@@ -5,19 +5,19 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/sql": "11.6.0-pre",
|
"@grafana/sql": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
"@testing-library/user-event": "14.6.1",
|
"@testing-library/user-event": "14.6.1",
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/schema": "11.6.0-pre",
|
"@grafana/schema": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"monaco-editor": "0.34.1",
|
"monaco-editor": "0.34.1",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/jest-dom": "6.6.3",
|
"@testing-library/jest-dom": "6.6.3",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/schema": "11.6.0-pre",
|
"@grafana/schema": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"d3-random": "^3.0.1",
|
"d3-random": "^3.0.1",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"micro-memoize": "^4.1.2",
|
"micro-memoize": "^4.1.2",
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
"uuid": "11.0.5"
|
"uuid": "11.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
"@testing-library/user-event": "14.6.1",
|
"@testing-library/user-event": "14.6.1",
|
||||||
|
|||||||
@@ -5,19 +5,19 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/sql": "11.6.0-pre",
|
"@grafana/sql": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
"@testing-library/user-event": "14.6.1",
|
"@testing-library/user-event": "14.6.1",
|
||||||
|
|||||||
@@ -5,19 +5,19 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/plugin-ui": "0.10.1",
|
"@grafana/plugin-ui": "0.10.1",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/sql": "11.6.0-pre",
|
"@grafana/sql": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/e2e-selectors": "11.6.0-pre",
|
"@grafana/e2e-selectors": "workspace:*",
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
"@testing-library/user-event": "14.6.1",
|
"@testing-library/user-event": "14.6.1",
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
"version": "11.6.0-pre",
|
"version": "11.6.0-pre",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "11.13.5",
|
"@emotion/css": "11.13.5",
|
||||||
"@grafana/data": "11.6.0-pre",
|
"@grafana/data": "workspace:*",
|
||||||
"@grafana/runtime": "11.6.0-pre",
|
"@grafana/runtime": "workspace:*",
|
||||||
"@grafana/schema": "11.6.0-pre",
|
"@grafana/schema": "workspace:*",
|
||||||
"@grafana/ui": "11.6.0-pre",
|
"@grafana/ui": "workspace:*",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"monaco-editor": "0.34.1",
|
"monaco-editor": "0.34.1",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
"@testing-library/user-event": "14.6.1",
|
"@testing-library/user-event": "14.6.1",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"uuid": "11.0.5"
|
"uuid": "11.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/plugin-configs": "11.6.0-pre",
|
"@grafana/plugin-configs": "workspace:*",
|
||||||
"@testing-library/dom": "10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/jest-dom": "6.6.3",
|
"@testing-library/jest-dom": "6.6.3",
|
||||||
"@testing-library/react": "16.2.0",
|
"@testing-library/react": "16.2.0",
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ def update_package_json_version():
|
|||||||
"apk add --update jq",
|
"apk add --update jq",
|
||||||
"new_version=$(cat package.json | jq -r .version | sed s/pre/${DRONE_BUILD_NUMBER}/g)",
|
"new_version=$(cat package.json | jq -r .version | sed s/pre/${DRONE_BUILD_NUMBER}/g)",
|
||||||
"echo \"New version: $new_version\"",
|
"echo \"New version: $new_version\"",
|
||||||
"yarn run lerna version $new_version --exact --no-git-tag-version --no-push --force-publish -y",
|
"yarn nx release version $new_version --group grafanaPackages,privatePackages,plugins",
|
||||||
"yarn install --mode=update-lockfile",
|
"yarn install --mode=update-lockfile",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user