chore: migrate from yarn to pnpm

Replace yarn 4.11.0 with pnpm 9.15.0 as the package manager:

- Delete yarn.lock and .yarnrc.yml
- Add pnpm-lock.yaml, pnpm-workspace.yaml, and .npmrc
- Convert resolutions to pnpm.overrides and patchedDependencies
- Move .yarn/patches/ to patches/ for pnpm compatibility
- Update all scripts in package.json (yarn -> pnpm)
- Update Makefile, e2e scripts, build scripts, Tiltfile
- Update Go e2e test runners (a11y/cmd.go, cypress/cmd.go)
- Update contributor documentation
This commit is contained in:
Hanzo Dev
2026-03-03 07:06:38 -08:00
parent e9a2fc56fe
commit 8b7d8453d2
31 changed files with 38228 additions and 36569 deletions
+5 -9
View File
@@ -18,12 +18,8 @@ tsconfig.tsbuildinfo
__debug_bin*
*.cov
# yarn
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# pnpm
.pnpm-store/
# Enterprise emails
/emails/templates/enterprise_*
@@ -159,10 +155,10 @@ pkg/services/quota/quotaimpl/storage/storage.json
/scripts/build/release_publisher/release_publisher
*.patch
!.yarn/patches/*.patch
!patches/*.patch
# Ignoring frontend packages specifics
/packages/grafana-ui/.yarn/.cache
/packages/grafana-ui/.cache
/packages/grafana-ui/.storybook/static
/packages/grafana-ui/unstable
/packages/grafana-flamegraph/.storybook/static
@@ -181,7 +177,7 @@ manifest-react19.json
# Ignore go local build dependencies
/scripts/go/bin/**
# Ignore compilation stats from `yarn stats`
# Ignore compilation stats from `pnpm run stats`
compilation-stats.json
# e2e tests
+5
View File
@@ -0,0 +1,5 @@
enable-pre-post-scripts=true
auto-install-peers=true
strict-peer-dependencies=false
shamefully-hoist=true
link-workspace-packages=true
-30
View File
@@ -1,30 +0,0 @@
compressionLevel: mixed
enableGlobalCache: false
enableTelemetry: false
nodeLinker: node-modules
packageExtensions:
croact-css-styled@1.1.9:
dependencies:
croact: 1.0.4
doctrine@3.0.0:
dependencies:
assert: 2.0.0
rc-trigger@2.6.5:
peerDependencies:
react: 17.0.1
react-dom: 17.0.1
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v2"
- checksum: 374f735053958b77583ef7b70e56a59540d1d9c681f04b8ab7a600f4325301d2e1fb67c51d34ba75bbbc4e71f8c003fbc52b1f22d7daa30dca655f1a1bf205a1
path: .yarn/plugins/@yarnpkg/plugin-licenses.cjs
spec: "https://raw.githubusercontent.com/mhassan1/yarn-plugin-licenses/v0.15.0/bundles/@yarnpkg/plugin-licenses.js"
yarnPath: .yarn/releases/yarn-4.11.0.cjs
enableScripts: false
+9 -9
View File
@@ -46,9 +46,9 @@ deps-js: node_modules ## Install frontend dependencies.
deps: deps-js ## Install all dependencies.
.PHONY: node_modules
node_modules: package.json yarn.lock ## Install node modules.
node_modules: package.json pnpm-lock.yaml ## Install node modules.
@echo "install frontend dependencies"
YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable
pnpm install --frozen-lockfile
##@ Swagger
SPEC_TARGET = public/api-spec.json
@@ -136,17 +136,17 @@ i18n-extract-enterprise:
else
i18n-extract-enterprise:
@echo "Extracting i18n strings for Enterprise"
cd public/locales/enterprise && LANG=en_US.UTF-8 yarn run i18next-cli extract --sync-primary
cd public/locales/enterprise && LANG=en_US.UTF-8 pnpm run i18next-cli extract --sync-primary
endif
.PHONY: i18n-extract
i18n-extract: i18n-extract-enterprise
@echo "Extracting i18n strings for OSS"
LANG=en_US.UTF-8 yarn run i18next-cli extract --sync-primary
LANG=en_US.UTF-8 pnpm run i18next-cli extract --sync-primary
@echo "Extracting i18n strings for packages"
LANG=en_US.UTF-8 yarn run packages:i18n-extract
LANG=en_US.UTF-8 pnpm run packages:i18n-extract
@echo "Extracting i18n strings for plugins"
LANG=en_US.UTF-8 yarn run plugin:i18n-extract
LANG=en_US.UTF-8 pnpm run plugin:i18n-extract
##@ Building
.PHONY: gen-cue
@@ -300,7 +300,7 @@ build-cli: ## Build Grafana CLI application.
.PHONY: build-js
build-js: ## Build frontend assets.
@echo "build frontend"
yarn run build
pnpm run build
PLUGIN_ID ?=
@@ -328,7 +328,7 @@ run-go: ## Build and run web server immediately.
.PHONY: run-frontend
run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
yarn start
pnpm start
.PHONY: run-bra
run-bra: ## [Deprecated] Build and run web server on filesystem changes. See /.bra.toml for configuration.
@@ -414,7 +414,7 @@ test-go-integration-memcached: ## Run integration tests for memcached cache.
.PHONY: test-js
test-js: ## Run tests for frontend.
@echo "test frontend"
yarn test
pnpm test
.PHONY: test
test: test-go test-js ## Run all tests.
+1 -1
View File
@@ -43,7 +43,7 @@ To do so, execute `go mod tidy` to ensure that `go.mod` and `go.sum` are updated
## Node.js dependencies
Updated using `yarn`:
Updated using `pnpm`:
- `package.json`
+2 -2
View File
@@ -69,8 +69,8 @@ We use [ESLint](https://eslint.org/) to enforce code style and best practices, a
- You may get an error when trying to commit something that decreases the overall code quality. You can either fix these errors or temporarily override the checks (for example, to commit something that's a work in progress). To do so, use `git commit --no-verify`. All errors will eventually have to be fixed before your code can be merged because...
- **ESLint also runs as part of our CI**:
- If you have fixed suppressed issues but not updated the suppressions file, you may see the following error message in the CI: `There are suppressions left that do not occur anymore.`.
To resolve the error, run the following command: `yarn lint:prune` and commit the changes.
- You may see merge conflicts for the `eslint-suppressions.json` file. To resolve, merge with the target branch (usually `main`) and resolve conflicts however you like, and then run `yarn lint:prune` to ensure the file is up to date and commit.
To resolve the error, run the following command: `pnpm run lint:prune` and commit the changes.
- You may see merge conflicts for the `eslint-suppressions.json` file. To resolve, merge with the target branch (usually `main`) and resolve conflicts however you like, and then run `pnpm run lint:prune` to ensure the file is up to date and commit.
## Guidelines for backend development
+20 -23
View File
@@ -36,18 +36,17 @@ For alternative ways of cloning the Grafana repository, refer to [GitHub's docum
> **Caution:** Do not use `go get` to download Grafana. Recent versions of Go have added behavior which isn't compatible with the way the Grafana repository is structured.
### Set up yarn
### Set up pnpm
In the repository enable and install yarn via corepack
Install pnpm if you haven't already:
```
corepack enable
corepack install
npm install -g pnpm@9.15.0
```
### Configure precommit hooks
We use pre-commit hooks (via [lefthook](https://github.com/evilmartians/lefthook)) to lint, fix, and format code as you commit your changes. Previously, the Grafana repository automatically installed these hook when you ran `yarn install`, but they are now opt-in for all contributors.
We use pre-commit hooks (via [lefthook](https://github.com/evilmartians/lefthook)) to lint, fix, and format code as you commit your changes. Previously, the Grafana repository automatically installed these hook when you ran `pnpm install`, but they are now opt-in for all contributors.
To install the precommit hooks:
@@ -75,20 +74,18 @@ When building Grafana, be aware that it consists of two components:
Before you can build the frontend assets, you need to install the related dependencies:
```
yarn install --immutable
pnpm install --frozen-lockfile
```
> If you get the error `The remote archive doesn't match the expected checksum` for a dependency pulled from a link (for example, `"tether-drop": "https://github.com/torkelo/drop"`): this is a temporary mismatch. To work around the error (while someone corrects the issue), you can prefix your `yarn install --immutable` command with [`YARN_CHECKSUM_BEHAVIOR=update`](https://yarnpkg.com/advanced/error-codes#yn0018---cache_checksum_mismatch).
After the command has finished, you can start building the source code:
```
yarn start
pnpm start
```
This command generates SASS theme files, builds all external plugins, and then builds the frontend assets.
After `yarn start` has built the assets, it will continue to do so whenever any of the files change. This means you don't have to manually build the assets every time you change the code.
After `pnpm start` has built the assets, it will continue to do so whenever any of the files change. This means you don't have to manually build the assets every time you change the code.
> **Troubleshooting:** if your first build works, after pulling updates you may see unexpected errors in the "Type-checking in progress..." stage. These errors can be caused by the [tsbuildinfo cache supporting incremental builds](https://www.typescriptlang.org/tsconfig#incremental). In this case, you can enter `rm tsconfig.tsbuildinfo` and re-try.
@@ -111,24 +108,24 @@ If you want to contribute to any of the plugins listed below (that are found wit
To build and watch all these plugins you can run the following command. Note this can be quite resource intensive as it will start separate build processes for each plugin.
```
yarn plugin:build:dev
pnpm run plugin:build:dev
```
If, instead, you would like to build and watch a specific plugin you can run the following command. Make sure to substitute `<name_of_plugin>` with the plugins name field found in its package.json. e.g. `@grafana-plugins/tempo`.
```
yarn workspace <name_of_plugin> dev
pnpm --filter <name_of_plugin> dev
```
If you want to run multiple specific plugins, you can use the following command.
```
yarn nx run-many -t dev --projects="@grafana-plugins/grafana-azure-monitor-datasource,@grafana-plugins/jaeger"
pnpm exec nx run-many -t dev --projects="@grafana-plugins/grafana-azure-monitor-datasource,@grafana-plugins/jaeger"
```
If you're unsure of the name of the plugins you'd like to run you can query nx with the following command to get a list of all plugins:
`yarn nx show projects --projects="@grafana-plugins/*"`
`pnpm exec nx show projects --projects="@grafana-plugins/*"`
Next, we'll explain how to build and run the web server that serves these frontend assets.
@@ -185,10 +182,10 @@ The test suite consists of three types of tests: _Frontend tests_, _backend test
### Run frontend tests
We use [Jest](https://jestjs.io/) for our frontend tests. Run them using Yarn:
We use [Jest](https://jestjs.io/) for our frontend tests. Run them using pnpm:
```
yarn test
pnpm test
```
### Run backend tests
@@ -233,15 +230,15 @@ make test-go-integration-postgres
- Grafana uses [Playwright](https://playwright.dev/) to run automated end-to-end tests. You can find more information [in our end-to-end testing style guide](./style-guides/e2e-playwright.md#playwright-for-plugins)
- Each version of Playwright needs specific versions of browser binaries to operate. You need to use the Playwright CLI to install these browsers: `yarn playwright install chromium`.
- Run tests with `yarn e2e:playwright [optional path to test file]`.
- Each version of Playwright needs specific versions of browser binaries to operate. You need to use the Playwright CLI to install these browsers: `pnpm exec playwright install chromium`.
- Run tests with `pnpm run e2e:playwright [optional path to test file]`.
- To open the last HTML report, you can run `yarn playwright show-report`. You can also open an arbitrary report with `yarn playwright show-report <reportLocation>`. The reports are also downloadable from CI by:
- To open the last HTML report, you can run `pnpm exec playwright show-report`. You can also open an arbitrary report with `pnpm exec playwright show-report <reportLocation>`. The reports are also downloadable from CI by:
- Clicking through to _End-to-end tests_/_All Playwright tests complete_.
- Clicking _Summary_.
- Download the _playwright-html-<number>_ artifact.
- Unzip.
- Run `yarn playwright show-report <reportLocation>`
- Run `pnpm exec playwright show-report <reportLocation>`
If you are curious about other commands, you can see the full list in [the Playwright documentation](https://playwright.dev/docs/test-cli#all-options).
@@ -350,7 +347,7 @@ ulimit: open files: cannot modify limit: Operation not permitted
If that happens to you, chances are you've already set a lower limit and your shell won't let you set a higher one. Try looking in your shell initialization files (`~/.bashrc`, typically), to see if there's already an `ulimit` command that you can tweak.
### System limit for number of file watchers reached while running `yarn start`
### System limit for number of file watchers reached while running `pnpm start`
Depending on your environment, you may need to increase the number of file watchers allowed by `inotify` package to monitor filesystem changes. You may encounter an error `Error: ENOSPC: System limit for number of file watchers reached` otherwise.
@@ -382,9 +379,9 @@ On macOS:
sysctl kern.maxfiles
```
### JavaScript heap out of memory while running `yarn start`
### JavaScript heap out of memory while running `pnpm start`
Running `yarn start` requires a substantial amount of memory space. You may check the currently allocated heap space to `node` by running the command:
Running `pnpm start` requires a substantial amount of memory space. You may check the currently allocated heap space to `node` by running the command:
```bash
node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'
+1 -1
View File
@@ -74,6 +74,6 @@ We use [pa11y-ci](https://github.com/pa11y/pa11y-ci) to collect accessibility er
If the contribution introduces new a11y errors, our continuous integration will fail, preventing you from merging to the main branch. In those cases there are two alternatives for moving forward:
- Check the error log on the pipeline step `test-a11y-frontend-pr`, identify the nature of the error, and then fix it.
- Locally run the command `yarn test:accessibility-report` that generates an HTML accessibility report, and then go to the URL that contains your change. On this URL, identify the error, and then fix it. Keep in mind that a local end-to-end Grafana instance is going to be running on `http://localhost:3001`.
- Locally run the command `pnpm run test:accessibility-report` that generates an HTML accessibility report, and then go to the URL that contains your change. On this URL, identify the error, and then fix it. Keep in mind that a local end-to-end Grafana instance is going to be running on `http://localhost:3001`.
You can also avoid introducing accessibility errors by installing an a11y plugin in your browser. For example, you could use axe DevTools or Accessibility Insights for Web, among others.
+13 -13
View File
@@ -24,19 +24,19 @@ Our framework structure is inspired by [Martin Fowler's Page Object](https://mar
Each version of Playwright needs specific versions of browser binaries to operate. You need to use the Playwright CLI to install these browsers.
```
yarn playwright install chromium
pnpm exec playwright install chromium
```
The following script starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) (same server that is being used when running e2e tests in CI) on port 3001 and runs all the Playwright tests. The development server is provisioned with the [devenv](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#add-data-sources) dashboards, data sources and apps.
```
yarn e2e:playwright
pnpm run e2e:playwright
```
You can run against an arbitrary instance by setting the `GRAFANA_URL` environment variable:
```
GRAFANA_URL=http://localhost:3000 yarn e2e:playwright
GRAFANA_URL=http://localhost:3000 pnpm run e2e:playwright
```
Note this will not start a development server, so you must ensure that Grafana is running and accessible at the specified URL.
@@ -46,40 +46,40 @@ Note this will not start a development server, so you must ensure that Grafana i
1 - **To open the Playwright UI**. It starts the Grafana server and then Playwright, which runs against this server.
```
yarn e2e:playwright --ui
pnpm run e2e:playwright --ui
```
2 - **To run an individual test**. It will run the test that matches the string passed to _grep_. Playwright will run all of them if you use a string that matches multiple tests.
```
yarn e2e:playwright --grep <testname>
pnpm run e2e:playwright --grep <testname>
```
You can also run all the tests matching a specific tag with _@tagName_.
```
yarn e2e:playwright --grep @<tagname>
pnpm run e2e:playwright --grep @<tagname>
```
3 - **To run a project**. It will run the entire project. You can find them in [grafana/playwright.config.ts](https://github.com/grafana/grafana/blob/main/playwright.config.ts#L90).
```
yarn e2e:playwright --project <projectname>
pnpm run e2e:playwright --project <projectname>
```
4- **To open the last HTML report**. It will open a Chrome window with the test list and the related info (success/error, name, time, steps, ...).
```
yarn playwright show-report
pnpm exec playwright show-report
```
You can open an arbitrary report with `yarn playwright show-report <reportLocation>`. The reports are also downloadable from CI by:
You can open an arbitrary report with `pnpm exec playwright show-report <reportLocation>`. The reports are also downloadable from CI by:
- Clicking through to _End-to-end tests_/_All Playwright tests complete_.
- Clicking _Summary_.
- Download the _playwright-html-<number>_ artifact.
- Unzip.
- Run `yarn playwright show-report <reportLocation>`
- Run `pnpm exec playwright show-report <reportLocation>`
You can see the full list in [the Playwright documentation](https://playwright.dev/docs/test-cli#all-options) if you are curious about other commands.
@@ -277,13 +277,13 @@ You can add Playwright end-to-end tests for plugins to the [`e2e-playwright/plug
## Commands
- `yarn e2e:playwright` runs all Playwright tests. Optionally, you can provide the `--project mysql` argument to run tests in a specific project.
- `pnpm run e2e:playwright` runs all Playwright tests. Optionally, you can provide the `--project mysql` argument to run tests in a specific project.
The `yarn e2e:playwright` command starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) on port 3001 and runs the Playwright tests.
The `pnpm run e2e:playwright` command starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) on port 3001 and runs the Playwright tests.
You can run against an arbitrary instance by setting the `GRAFANA_URL` environment variable:
`GRAFANA_URL=http://localhost:3000 yarn e2e:playwright`
`GRAFANA_URL=http://localhost:3000 pnpm run e2e:playwright`
Note this will not start a development server, so you must ensure that Grafana is running and accessible at the specified URL.
+1 -1
View File
@@ -181,7 +181,7 @@ describe('MyComponent', () => {
If you need to modify the Sass variable files, we recommend that you migrate the styles to [Emotion](https://emotion.sh/docs/introduction).
For the following variables to apply, you need to run this `yarn dev` task:
For the following variables to apply, you need to run this `pnpm dev` task:
- `[_variables|_variables.dark|_variables.light].generated.scss`: These files must be referenced in the main Sass files for Sass variables to be available.
+8 -8
View File
@@ -1,18 +1,18 @@
# --- Frontend processes
local_resource(
'yarn install',
cmd='yarn install',
'pnpm install',
cmd='pnpm install',
deps=[
'yarn.lock',
'pnpm-lock.yaml',
],
labels=["local"]
)
local_resource(
'yarn start',
'pnpm start',
cmd='rm -rf public/build/assets-manifest.json',
serve_cmd='yarn start:noLint',
resource_deps=['yarn install'],
serve_cmd='pnpm run start:noLint',
resource_deps=['pnpm install'],
# Note: this doesn't seem to work as expected - the assets-manifest is somehow created before
# the webpack build is complete?
@@ -57,11 +57,11 @@ dc_resource("proxy",
labels=["services"]
)
dc_resource("grafana-api",
resource_deps=["yarn start", "backend-build"],
resource_deps=["pnpm start", "backend-build"],
labels=["services"]
)
dc_resource("frontend-service",
resource_deps=["yarn start", "backend-build"],
resource_deps=["pnpm start", "backend-build"],
labels=["services"],
)
dc_resource("alloy", labels=["observability"])
+1 -1
View File
@@ -114,7 +114,7 @@ func runAction(ctx context.Context, c *cli.Command) error {
args = append(args, "--json")
}
//nolint:gosec
cmd := exec.CommandContext(ctx, "yarn", args...)
cmd := exec.CommandContext(ctx, "pnpm", args...)
cmd.Dir = repoRoot
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env,
+1 -1
View File
@@ -232,7 +232,7 @@ func runAction(ctx context.Context, c *cli.Command) error {
"--browser", c.String("browser")}
args = append(args, c.StringSlice("parameters")...)
//nolint:gosec
cmd := exec.CommandContext(ctx, "yarn", args...)
cmd := exec.CommandContext(ctx, "pnpm", args...)
cmd.Dir = repoRoot
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, fmt.Sprintf("TZ=%s", c.String("timezone")))
+1 -1
View File
@@ -161,7 +161,7 @@ function join () {
export TZ="Pacific/Honolulu"
yarn run $CMD --env "$(join env)" \
pnpm run $CMD --env "$(join env)" \
--config "$(join cypressConfig)" \
$PARAMS
+74 -71
View File
@@ -7,9 +7,9 @@
"repository": "github:grafana/grafana",
"scripts": {
"check-frontend-dev": "./scripts/check-frontend-dev.sh",
"build": "NODE_ENV=production nx exec --verbose -- webpack --config scripts/webpack/webpack.prod.js && yarn build:react19",
"build": "NODE_ENV=production nx exec --verbose -- webpack --config scripts/webpack/webpack.prod.js && pnpm run build:react19",
"build:react19": "NODE_ENV=production nx exec --verbose -- webpack --config scripts/webpack/webpack.prod.js --env react19=1",
"build:nominify": "yarn run build -- --env noMinify=1",
"build:nominify": "pnpm run build -- --env noMinify=1",
"build:stats": "NODE_ENV=production webpack --progress --config scripts/webpack/webpack.stats.js",
"codeowners-manifest": "node ./scripts/codeowners-manifest/index.js",
"codeowners-manifest:clean": "rm -rf codeowners-manifest && mkdir -p codeowners-manifest",
@@ -19,7 +19,7 @@
"dev": "NODE_ENV=dev nx exec -- webpack --config scripts/webpack/webpack.dev.js",
"e2e": "./e2e/start-and-run-suite",
"e2e:old-arch": "./e2e/start-and-run-suite old-arch",
"e2e:schema-v2": "KUBERNETES_DASHBOARDS=true yarn playwright test --project dashboards",
"e2e:schema-v2": "KUBERNETES_DASHBOARDS=true pnpm exec playwright test --project dashboards",
"e2e:dashboards-search": "./e2e/start-and-run-suite dashboards-search",
"e2e:debug": "./e2e/start-and-run-suite debug",
"e2e:dev": "./e2e/start-and-run-suite dev",
@@ -27,51 +27,51 @@
"e2e:enterprise": "./e2e/start-and-run-suite enterprise",
"e2e:enterprise:dev": "./e2e/start-and-run-suite enterprise dev",
"e2e:enterprise:debug": "./e2e/start-and-run-suite enterprise debug",
"e2e:playwright": "NODE_OPTIONS='-C @grafana-app/source' yarn playwright test --grep-invert @cloud-plugins",
"e2e:pw": "NODE_OPTIONS='-C @grafana-app/source' yarn playwright test",
"e2e:playwright:debug": "yarn e2e:pw --debug -x --trace on",
"e2e:playwright:10x": "yarn e2e:pw --repeat-each=10",
"e2e:playwright:cloud-plugins": "NODE_OPTIONS='-C @grafana-app/source' yarn playwright test --grep @cloud-plugins",
"e2e:playwright:storybook": "NODE_OPTIONS='-C @grafana-app/source' yarn playwright test -c playwright.storybook.config.ts",
"e2e:acceptance": "NODE_OPTIONS='-C @grafana-app/source' yarn playwright test --grep @acceptance",
"e2e:playwright": "NODE_OPTIONS='-C @grafana-app/source' pnpm exec playwright test --grep-invert @cloud-plugins",
"e2e:pw": "NODE_OPTIONS='-C @grafana-app/source' pnpm exec playwright test",
"e2e:playwright:debug": "pnpm run e2e:pw --debug -x --trace on",
"e2e:playwright:10x": "pnpm run e2e:pw --repeat-each=10",
"e2e:playwright:cloud-plugins": "NODE_OPTIONS='-C @grafana-app/source' pnpm exec playwright test --grep @cloud-plugins",
"e2e:playwright:storybook": "NODE_OPTIONS='-C @grafana-app/source' pnpm exec playwright test -c playwright.storybook.config.ts",
"e2e:acceptance": "NODE_OPTIONS='-C @grafana-app/source' pnpm exec playwright test --grep @acceptance",
"e2e:storybook": "PORT=9001 ./e2e/run-suite storybook true",
"e2e:plugin:build": "nx run-many -t build --projects='@test-plugins/*'",
"e2e:plugin:build:dev": "nx run-many -t dev --projects='@test-plugins/*' --maxParallel=100",
"test": "jest --notify --watch",
"test:coverage": "jest --coverage",
"test:coverage:by-codeowner": "yarn codeowners-manifest && node scripts/test-coverage-by-codeowner.js",
"test:coverage:by-codeowner": "pnpm run codeowners-manifest && node scripts/test-coverage-by-codeowner.js",
"test:coverage:changes": "jest --coverage --changedSince=origin/main",
"test:storybook": "yarn workspace @grafana/ui storybook:test",
"test:storybook": "pnpm --filter @grafana/ui storybook:test",
"test:accessibility-report": "./scripts/generate-a11y-report.sh",
"test:ci": "mkdir -p reports/junit && JEST_JUNIT_OUTPUT_DIR=reports/junit jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%} --shard=${TEST_SHARD:-1}/${TEST_SHARD_TOTAL:-1}",
"lint": "yarn run lint:ts && yarn run lint:sass",
"lint": "pnpm run lint:ts && pnpm run lint:sass",
"lint:ts": "eslint ./ ./public/app/extensions/ --cache --no-error-on-unmatched-pattern",
"lint:sass": "yarn stylelint '{public/sass,packages}/**/*.scss' --cache",
"lint:fix": "yarn lint:ts --fix",
"lint:prune": "yarn lint:ts --prune-suppressions",
"lint:sass": "pnpm exec stylelint '{public/sass,packages}/**/*.scss' --cache",
"lint:fix": "pnpm run lint:ts --fix",
"lint:prune": "pnpm run lint:ts --prune-suppressions",
"lint:circular": "madge --circular --extensions ts,tsx --no-count --no-spinner .",
"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:i18n-extract": "nx run-many -t i18n-extract --projects='tag:scope:package'",
"packages:prepare": "lerna version --no-push --no-git-tag-version --force-publish --exact",
"packages:pack": "mkdir -p ./npm-artifacts && lerna exec --no-private -- yarn pack --out \"../../npm-artifacts/%s-%v.tgz\"",
"packages:pack": "mkdir -p ./npm-artifacts && lerna exec --no-private -- pnpm pack --pack-destination \"../../npm-artifacts\"",
"packages:typecheck": "nx run-many -t typecheck --projects='tag:scope:package'",
"packages:test:ci": "nx run-many -t test:ci --projects='tag:scope:package'",
"prettier:check": "prettier --check --ignore-path .prettierignore --list-different=false --log-level=warn \"**/*.{ts,tsx,scss,md,mdx,json,js,cjs}\"",
"prettier:checkDocs": "prettier --check --list-different=false --log-level=warn \"docs/**/*.md\" \"*.md\" \"packages/**/*.{ts,tsx,scss,md,mdx,json,js,cjs}\"",
"prettier:write": "prettier --ignore-path .prettierignore --list-different \"**/*.{js,ts,tsx,scss,md,mdx,json,cjs}\" --write",
"start": "NODE_ENV=dev nx exec -- webpack --config scripts/webpack/webpack.dev.js --watch",
"start:liveReload": "yarn start -- --env liveReload=1",
"start:noTsCheck": "yarn start -- --env noTsCheck=1",
"start:noLint": "yarn start -- --env noTsCheck=1 --env noLint=1",
"start:liveReload": "pnpm run start -- --env liveReload=1",
"start:noTsCheck": "pnpm run start -- --env noTsCheck=1",
"start:noLint": "pnpm run start -- --env noTsCheck=1 --env noLint=1",
"stats": "webpack --mode production --config scripts/webpack/webpack.prod.js --profile --json > compilation-stats.json",
"storybook": "yarn workspace @grafana/ui storybook --ci",
"storybook:build": "yarn workspace @grafana/ui storybook:build",
"themes-generate": "yarn workspace @grafana/data themes-schema && esbuild --target=es6 ./scripts/cli/generateSassVariableFiles.ts --bundle --conditions=@grafana-app/source --platform=node --tsconfig=./scripts/cli/tsconfig.json | node",
"storybook": "pnpm --filter @grafana/ui storybook --ci",
"storybook:build": "pnpm --filter @grafana/ui storybook:build",
"themes-generate": "pnpm --filter @grafana/data themes-schema && esbuild --target=es6 ./scripts/cli/generateSassVariableFiles.ts --bundle --conditions=@grafana-app/source --platform=node --tsconfig=./scripts/cli/tsconfig.json | node",
"themes:usage": "eslint . --ignore-pattern '*.test.ts*' --ignore-pattern '*.spec.ts*' --cache --plugin '@grafana' --rule '{ @grafana/theme-token-usage: \"error\" }'",
"typecheck": "tsc --noEmit && yarn run packages:typecheck",
"typecheck": "tsc --noEmit && pnpm run packages:typecheck",
"plugins:build-bundled": "echo 'bundled plugins are no longer supported'",
"watch": "yarn start -d watch,start core:start --watchTheme",
"watch": "pnpm run start -d watch,start core:start --watchTheme",
"i18n:stats": "node ./scripts/cli/reportI18nStats.mjs",
"i18n-extract": "LANG=en_US.UTF-8 make i18n-extract",
"plugin:build": "nx run-many -t build --projects='tag:scope:plugin'",
@@ -79,8 +79,8 @@
"plugin:build:dev": "nx run-many -t dev --projects='tag:scope:plugin' --maxParallel=100",
"plugin:test:ci": "nx run-many -t test:ci --projects='tag:scope:plugin' --maxParallel=2",
"plugin:i18n-extract": "nx run-many -t i18n-extract --projects='tag:scope:plugin'",
"generate-apis": "yarn workspace @grafana/api-clients generate-apis",
"generate:api-client": "yarn workspace @grafana/api-clients generate:api-client"
"generate-apis": "pnpm --filter @grafana/api-clients generate-apis",
"generate:api-client": "pnpm --filter @grafana/api-clients generate:api-client"
},
"grafana": {
"whatsNewUrl": "https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v%[1]s-%[2]s/",
@@ -404,7 +404,7 @@
"react-dom-19": "npm:react-dom@^19.2.4",
"react-draggable": "4.5.0",
"react-dropzone": "^14.2.3",
"react-grid-layout": "patch:react-grid-layout@npm%3A1.4.4#~/.yarn/patches/react-grid-layout-npm-1.4.4-4024c5395b.patch",
"react-grid-layout": "1.4.4",
"react-highlight-words": "0.21.0",
"react-hook-form": "^7.49.2",
"react-i18next": "^15.0.0",
@@ -449,53 +449,56 @@
"vis-network": "10.0.2",
"whatwg-fetch": "3.6.20"
},
"resolutions": {
"underscore": "1.13.7",
"@types/slate": "0.47.11",
"semver@npm:~7.3.5": "^7.3.5",
"debug@npm:^0.7.2": "2.6.9",
"debug@npm:^0.7.4": "2.6.9",
"slate-dev-environment@^0.2.2": "patch:slate-dev-environment@npm:0.2.5#.yarn/patches/slate-dev-environment-npm-0.2.5-9aeb7da7b5.patch",
"react-split-pane@0.1.92": "patch:react-split-pane@npm:0.1.92#.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch",
"history@4.10.1": "patch:history@npm%3A4.10.1#./.yarn/patches/history-npm-4.10.1-ee217563ae.patch",
"redux": "^5.0.0",
"react-grid-layout": "patch:react-grid-layout@npm%3A1.4.4#~/.yarn/patches/react-grid-layout-npm-1.4.4-4024c5395b.patch",
"@grafana/plugin-e2e/@grafana/e2e-selectors": "workspace:*",
"@grafana/scenes/@grafana/e2e-selectors": "workspace:*",
"@grafana/scenes-react/@grafana/e2e-selectors": "workspace:*",
"swagger-ui-react/dompurify": "3.3.1",
"refractor/prismjs": "^1.27.0",
"@mapbox/jsonlint-lines-primitives": "github:mapbox/jsonlint#commit=e31b7289baedf3e1000d7ae7edd42268212c9954",
"get-document": "github:webmodules/get-document#commit=a04ccb499d6e0433a368c3bb150b4899b698461f",
"gitconfiglocal": "2.1.0",
"tmp@npm:^0.0.33": "~0.2.1",
"js-yaml@npm:4.1.0": "^4.1.0",
"js-yaml@npm:=4.1.0": "^4.1.0",
"nodemailer": "7.0.12",
"@storybook/core@npm:8.6.15": "patch:@storybook/core@npm%3A8.6.15#~/.yarn/patches/@storybook-core-npm-8.6.15-a468a35170.patch"
},
"workspaces": {
"packages": [
"packages/*",
"public/app/plugins/*/*",
"e2e-playwright/test-plugins/*"
]
"pnpm": {
"overrides": {
"underscore": "1.13.7",
"@types/slate": "0.47.11",
"semver@~7.3.5": "^7.3.5",
"debug@^0.7.2": "2.6.9",
"debug@^0.7.4": "2.6.9",
"redux": "^5.0.0",
"@grafana/plugin-e2e>@grafana/e2e-selectors": "workspace:*",
"@grafana/scenes>@grafana/e2e-selectors": "workspace:*",
"@grafana/scenes-react>@grafana/e2e-selectors": "workspace:*",
"swagger-ui-react>dompurify": "3.3.1",
"refractor>prismjs": "^1.27.0",
"@mapbox/jsonlint-lines-primitives": "github:mapbox/jsonlint#e31b7289baedf3e1000d7ae7edd42268212c9954",
"get-document": "github:webmodules/get-document#a04ccb499d6e0433a368c3bb150b4899b698461f",
"gitconfiglocal": "2.1.0",
"tmp@^0.0.33": "~0.2.1",
"js-yaml@4.1.0": "^4.1.0",
"js-yaml@=4.1.0": "^4.1.0",
"nodemailer": "7.0.12"
},
"patchedDependencies": {
"react-grid-layout@1.4.4": "patches/react-grid-layout-npm-1.4.4-4024c5395b.patch",
"react-split-pane@0.1.92": "patches/react-split-pane-npm-0.1.92-93dbf51dff.patch",
"history@4.10.1": "patches/history-npm-4.10.1-ee217563ae.patch",
"slate-dev-environment@0.2.5": "patches/slate-dev-environment-npm-0.2.5-9aeb7da7b5.patch"
},
"packageExtensions": {
"croact-css-styled@1.1.9": {
"dependencies": {
"croact": "1.0.4"
}
},
"doctrine@3.0.0": {
"dependencies": {
"assert": "2.0.0"
}
},
"rc-trigger@2.6.5": {
"peerDependencies": {
"react": "17.0.1",
"react-dom": "17.0.1"
}
}
}
},
"engines": {
"node": ">= 22 <25"
},
"packageManager": "yarn@4.11.0",
"dependenciesMeta": {
"cypress": {
"built": true
},
"msw": {
"built": true
},
"prettier@3.6.2": {
"unplugged": true
}
},
"packageManager": "pnpm@9.15.0",
"msw": {
"workerDirectory": [
"public"
@@ -0,0 +1,13 @@
diff --git a/dist/builder-manager/index.js b/dist/builder-manager/index.js
index ac8ac6a5f6a3b7852c4064e93dc9acd3201289e6..34a0a5a5c38dd7fe525c9ebd382a10a451d4d4f3 100644
--- a/dist/builder-manager/index.js
+++ b/dist/builder-manager/index.js
@@ -1974,7 +1974,7 @@ var pa = /^\/($|\?)/, G, C, xt = /* @__PURE__ */ o(async (e) => {
bundle: !0,
minify: !0,
sourcemap: !1,
- conditions: ["browser", "module", "default"],
+ conditions: ["@grafana-app/source", "browser", "module", "default"],
jsxFactory: "React.createElement",
jsxFragment: "React.Fragment",
jsx: "transform",
@@ -0,0 +1,63 @@
diff --git a/cjs/history.js b/cjs/history.js
index fcd8ebab613c6d87b9ac824feb30ab1080cf0ef2..4df20d5cb2f9ba5fc8777899aada53f49399560b 100644
--- a/cjs/history.js
+++ b/cjs/history.js
@@ -103,16 +103,6 @@ function createLocation(path, state, key, currentLocation) {
if (state !== undefined && location.state === undefined) location.state = state;
}
- try {
- location.pathname = decodeURI(location.pathname);
- } catch (e) {
- if (e instanceof URIError) {
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
- } else {
- throw e;
- }
- }
-
if (key) location.key = key;
if (currentLocation) {
diff --git a/esm/history.js b/esm/history.js
index df67820fe3eed558c44fca07a82b0cd409d46720..e0e0d4f69a407e8de782b3fdf8297d42708e110a 100644
--- a/esm/history.js
+++ b/esm/history.js
@@ -80,16 +80,6 @@ function createLocation(path, state, key, currentLocation) {
if (state !== undefined && location.state === undefined) location.state = state;
}
- try {
- location.pathname = decodeURI(location.pathname);
- } catch (e) {
- if (e instanceof URIError) {
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
- } else {
- throw e;
- }
- }
-
if (key) location.key = key;
if (currentLocation) {
diff --git a/umd/history.js b/umd/history.js
index 80e4ff66c44a2a71d4f842cc05a252e48dd18e9a..f8f4901be95e48c66f5626fbf051747a2ffbe41d 100644
--- a/umd/history.js
+++ b/umd/history.js
@@ -207,16 +207,6 @@
if (state !== undefined && location.state === undefined) location.state = state;
}
- try {
- location.pathname = decodeURI(location.pathname);
- } catch (e) {
- if (e instanceof URIError) {
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
- } else {
- throw e;
- }
- }
-
if (key) location.key = key;
if (currentLocation) {
@@ -0,0 +1,121 @@
diff --git a/build/GridItem.js b/build/GridItem.js
index 0a700da9f1180ca532e32e04dc7ea50f2e67b96c..a2e4673fa1133aeaa4018cc01312ca386c3395f5 100644
--- a/build/GridItem.js
+++ b/build/GridItem.js
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
+var _reactDOM = require("react-dom");
var _propTypes = _interopRequireDefault(require("prop-types"));
var _reactDraggable = require("react-draggable");
var _reactResizable = require("react-resizable");
@@ -147,8 +148,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
const pTop = parentRect.top / transformScale;
newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;
newPosition.top = cTop - pTop + offsetParent.scrollTop;
- this.setState({
- dragging: newPosition
+ _reactDOM.flushSync(() => {
+ this.setState({
+ dragging: newPosition
+ });
});
// Call callback with this data
@@ -213,8 +216,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
top,
left
};
- this.setState({
- dragging: newPosition
+ _reactDOM.flushSync(() => {
+ this.setState({
+ dragging: newPosition
+ });
});
// Call callback with this data
@@ -261,8 +266,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
top,
left
};
- this.setState({
- dragging: null
+ _reactDOM.flushSync(() => {
+ this.setState({
+ dragging: null
+ });
});
const {
x,
@@ -485,8 +492,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
let updatedSize = size;
if (node) {
updatedSize = (0, _utils.resizeItemInDirection)(handle, position, size, containerWidth);
- this.setState({
- resizing: handlerName === "onResizeStop" ? null : updatedSize
+ _reactDOM.flushSync(() => {
+ this.setState({
+ resizing: handlerName === "onResizeStop" ? null : updatedSize
+ });
});
}
diff --git a/lib/GridItem.jsx b/lib/GridItem.jsx
index dbe41f92388f19d3e476690fa0ee5584ab9d5bb4..1e4713667cd7dadd6618fe06176804a02ee3ccc2 100644
--- a/lib/GridItem.jsx
+++ b/lib/GridItem.jsx
@@ -1,5 +1,6 @@
// @flow
import React from "react";
+import { flushSync } from "react-dom";
import PropTypes from "prop-types";
import { DraggableCore } from "react-draggable";
import { Resizable } from "react-resizable";
@@ -459,7 +460,9 @@ export default class GridItem extends React.Component<Props, State> {
const pTop = parentRect.top / transformScale;
newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;
newPosition.top = cTop - pTop + offsetParent.scrollTop;
- this.setState({ dragging: newPosition });
+ flushSync(() => {
+ this.setState({ dragging: newPosition });
+ });
// Call callback with this data
const { x, y } = calcXY(
@@ -516,7 +519,9 @@ export default class GridItem extends React.Component<Props, State> {
}
const newPosition: PartialPosition = { top, left };
- this.setState({ dragging: newPosition });
+ flushSync(() => {
+ this.setState({ dragging: newPosition });
+ });
// Call callback with this data
const { containerPadding } = this.props;
@@ -549,7 +554,9 @@ export default class GridItem extends React.Component<Props, State> {
const { w, h, i, containerPadding } = this.props;
const { left, top } = this.state.dragging;
const newPosition: PartialPosition = { top, left };
- this.setState({ dragging: null });
+ flushSync(() => {
+ this.setState({ dragging: null });
+ });
const { x, y } = calcXY(
this.getPositionParams(),
@@ -605,8 +612,10 @@ export default class GridItem extends React.Component<Props, State> {
size,
containerWidth
);
- this.setState({
- resizing: handlerName === "onResizeStop" ? null : updatedSize
+ flushSync(() => {
+ this.setState({
+ resizing: handlerName === "onResizeStop" ? null : updatedSize
+ });
});
}
@@ -0,0 +1,12 @@
diff --git a/index.d.ts b/index.d.ts
index d116f54d6da12d24b48e24ff3636c9066059aa58..93290945d8b1818cab893d6466179b33869a47b9 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -25,6 +25,7 @@ export type SplitPaneProps = {
pane2Style?: React.CSSProperties;
resizerClassName?: string;
step?: number;
+ children?: React.ReactNode;
};
export type SplitPaneState = {
File diff suppressed because one or more lines are too long
+37776
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
packages:
- "packages/*"
- "public/app/plugins/*/*"
- "e2e-playwright/test-plugins/*"
+1 -1
View File
@@ -96,7 +96,7 @@ function build_frontend() {
if [ ! -d "dist" ]; then
mkdir dist
fi
YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable
pnpm install --frozen-lockfile
echo "Building frontend"
start=$(date +%s%N)
+5 -5
View File
@@ -11,8 +11,8 @@ CLASSNAME_PROP="$(grep -r -o -E --include="*.ts*" "\.*.className=\W.*\W.*" publi
EMOTION_IMPORTS="$(grep -r -o -E --include="*.ts*" --exclude="*.test*" "\{.*css.*\} from '@emotion/css'" public/app | wc -l)"
TS_FILES="$(find public/app -type f -name "*.ts*" -not -name "*.test*" | wc -l)"
SCSS_FILES="$(find public packages -name '*.scss' | wc -l)"
OUTDATED_DEPENDENCIES="$(yarn outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')"
CIRCULAR_DEPENDENCIES="$(yarn lint:circular 2>&1 >/dev/null | sed -n 's/.*Found \([0-9]*\) circular.*/\1/p')"
OUTDATED_DEPENDENCIES="$(pnpm outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')"
CIRCULAR_DEPENDENCIES="$(pnpm run lint:circular 2>&1 >/dev/null | sed -n 's/.*Found \([0-9]*\) circular.*/\1/p')"
TOTAL_CIRCULAR_DEPENDENCIES="${CIRCULAR_DEPENDENCIES:-0}"
echo -e "Typescript errors: $ERROR_COUNT"
@@ -29,7 +29,7 @@ echo -e "Total SCSS files: $SCSS_FILES"
echo -e "Total circular dependencies: $TOTAL_CIRCULAR_DEPENDENCIES"
ESLINT_STATS=""
yarn lint:ts --format ./scripts/cli/eslint-stats-reporter.mjs -o eslint-stats.txt
pnpm run lint:ts --format ./scripts/cli/eslint-stats-reporter.mjs -o eslint-stats.txt
while read -r name value
do
ESLINT_STATS+=$'\n '
@@ -44,14 +44,14 @@ while read -r name value
do
I18N_STATS+=$'\n '
I18N_STATS+="\"grafana.ci-code.i18n.${name}\": \"${value}\","
done <<< "$(yarn i18n:stats)"
done <<< "$(pnpm run i18n:stats)"
THEME_TOKEN_USAGE=""
while read -r name value
do
THEME_TOKEN_USAGE+=$'\n '
THEME_TOKEN_USAGE+="\"grafana.ci-code.themeUsage.${name}\": \"${value}\","
done <<< "$(yarn themes:usage | awk '$4 == "@grafana/theme-token-usage" {print $3}' | awk '{!seen[$0]++}END{for (i in seen) print i, seen[i]}')"
done <<< "$(pnpm run themes:usage | awk '$4 == "@grafana/theme-token-usage" {print $3}' | awk '{!seen[$0]++}END{for (i in seen) print i, seen[i]}')"
echo "Metrics: {
$THEME_TOKEN_USAGE
+1 -1
View File
@@ -27,7 +27,7 @@ async function generateCodeownersManifest(
const hasRawAuditJsonl = await stat(rawAuditPath);
if (!hasRawAuditJsonl) {
throw new Error(
`No raw CODEOWNERS audit JSONL file found at: ${rawAuditPath} ... run "yarn codeowners-manifest:raw"`
`No raw CODEOWNERS audit JSONL file found at: ${rawAuditPath} ... run "pnpm run codeowners-manifest:raw"`
);
}
+2 -2
View File
@@ -21,7 +21,7 @@ async function generateCodeownersRawAudit(codeownersPath, outputPath) {
return new Promise((resolve, reject) => {
const outputStream = fs.createWriteStream(outputPath);
const child = spawn('yarn', ['github-codeowners', 'audit', '--output', 'jsonl'], {
const child = spawn('pnpm', ['exec', 'github-codeowners', 'audit', '--output', 'jsonl'], {
stdio: ['ignore', 'pipe', 'pipe'],
cwd: process.cwd(),
shell: true,
@@ -55,7 +55,7 @@ async function generateCodeownersRawAudit(codeownersPath, outputPath) {
child.on('error', (err) => {
outputStream.end();
if (err.code === 'ENOENT') {
reject(new Error('yarn command not found. Please ensure yarn and github-codeowners are available'));
reject(new Error('pnpm command not found. Please ensure pnpm and github-codeowners are available'));
} else {
reject(err);
}
+1 -1
View File
@@ -132,7 +132,7 @@ function generateMarkdown(mainCoverage, prCoverage) {
|--------|------|----|----|--------|
${tableRows}
**Run locally:** 💻 \`yarn test:coverage:by-codeowner ${teamName}\`
**Run locally:** 💻 \`pnpm run test:coverage:by-codeowner ${teamName}\`
**Break glass:** 🚨 In case of emergency, adding the \`no-check-frontend-test-coverage\` label to this PR will skip checks.
`;
+2 -2
View File
@@ -33,7 +33,7 @@ fi
HOST=host.docker.internal docker run --add-host host.docker.internal:host-gateway -e HOST -v "$PWD":/grafana grafana/docker-puppeteer:1.1.0 pa11y-ci --config /grafana/.pa11yci.conf.js --json > pa11y-ci-results.json
# Generate HTML report
yarn dlx pa11y-ci-reporter-html@3.0.1 pa11y-ci-reporter-html
pnpm dlx pa11y-ci-reporter-html@3.0.1 pa11y-ci-reporter-html
# Start local server
yarn http-server pa11y-ci-report -p 1234
pnpm exec http-server pa11y-ci-report -p 1234
+4 -4
View File
@@ -12,16 +12,16 @@ for file in "$ARTIFACTS_DIR"/*.tgz; do
echo "🔍 Checking NPM package: $file"
# If you need to debug ATTW issues, pass "--format json" to get verbose output.
if ! NODE_OPTIONS="-C @grafana-app/source" yarn attw "$file" --ignore-rules "false-cjs" --profile "node16"; then
if ! NODE_OPTIONS="-C @grafana-app/source" pnpm exec attw "$file" --ignore-rules "false-cjs" --profile "node16"; then
echo "attw check failed for $file"
echo ""
failed_checks+=("$file - yarn attw")
failed_checks+=("$file - pnpm exec attw")
fi
if ! yarn publint "$file"; then
if ! pnpm exec publint "$file"; then
echo "publint check failed for $file"
echo ""
failed_checks+=("$file - yarn publint")
failed_checks+=("$file - pnpm exec publint")
fi
done
+2 -2
View File
@@ -7,7 +7,7 @@ const prodConfig = require('./webpack.prod.js');
module.exports = (env = {}) => {
const config = { plugins: [new BundleAnalyzerPlugin()] };
// yarn build:stats --env doctor
// pnpm run build:stats --env doctor
if (env.doctor) {
config.plugins.push(
new RsdoctorWebpackPlugin({
@@ -20,7 +20,7 @@ module.exports = (env = {}) => {
}
// disable hashing in output filenames to make them easier to identify
// yarn build:stats --env doctor --env namedChunks
// pnpm run build:stats --env doctor --env namedChunks
if (env.namedChunks) {
config.optimization = {
chunkIds: 'named',
-36380
View File
File diff suppressed because it is too large Load Diff