Skip to content

Fix stylelint CI failure caused by missing balanced-match dependency#2989

Merged
llastflowers merged 2 commits intocopilot/fix-stylelint-workflowfrom
copilot/fix-stylelint-workflow-failure
Feb 26, 2026
Merged

Fix stylelint CI failure caused by missing balanced-match dependency#2989
llastflowers merged 2 commits intocopilot/fix-stylelint-workflowfrom
copilot/fix-stylelint-workflow-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

What are you trying to accomplish?

stylelint@17.3.0 introduced functionArgumentsSearch.mjs which imports balanced-match, but balanced-match was never recorded in package-lock.json as a stylelint dependency. npm ci in CI installs exactly what's in the lock file, so balanced-match was never present where stylelint could resolve it, causing the workflow to fail with ERR_MODULE_NOT_FOUND.

What approach did you choose and why?

Ran npm update stylelint, which bumped the lock file to stylelint@17.4.0. That version dropped balanced-match as a dependency entirely, resolving the issue with a minimal 4-line change to package-lock.json.

What should reviewers focus on?

Only package-lock.json changes — stylelint bumped from 17.3.017.4.0 and @csstools/css-syntax-patches-for-csstree from ^1.0.26^1.0.27 (a transitive dep update from stylelint).

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢
Original prompt

Fix the failing GitHub Actions workflow "CI / stylelint (pull_request)".
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 65054332192
Job URL: /primer/css/actions/runs/22460824518/job/65054332192?pr=2988


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 26, 2026

⚠️ No Changeset found

Latest commit: ac2725a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…7.4.0

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow for stylelint Fix stylelint CI failure caused by missing balanced-match dependency Feb 26, 2026
@llastflowers llastflowers marked this pull request as ready for review February 26, 2026 21:02
@llastflowers llastflowers requested review from a team as code owners February 26, 2026 21:02
@github-actions github-actions Bot temporarily deployed to Storybook Preview February 26, 2026 21:03 Inactive
@llastflowers llastflowers merged commit 47be475 into copilot/fix-stylelint-workflow Feb 26, 2026
17 of 18 checks passed
@llastflowers llastflowers deleted the copilot/fix-stylelint-workflow-failure branch February 26, 2026 21:22
llastflowers added a commit that referenced this pull request Feb 26, 2026
* Bump the all group across 1 directory with 8 updates

Bumps the all group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@primer/primitives](https://github.com/primer/primitives) | `11.3.2` | `11.4.0` |
| [@primer/stylelint-config](https://github.com/primer/stylelint-config) | `13.4.1` | `13.4.2` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.23` | `10.4.24` |
| [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.0.0` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `29.12.1` | `29.15.0` |
| [globby](https://github.com/sindresorhus/globby) | `16.1.0` | `16.1.1` |
| [semver](https://github.com/npm/node-semver) | `7.7.3` | `7.7.4` |
| [stylelint](https://github.com/stylelint/stylelint) | `17.0.0` | `17.3.0` |



Updates `@primer/primitives` from 11.3.2 to 11.4.0
- [Release notes](https://github.com/primer/primitives/releases)
- [Changelog](https://github.com/primer/primitives/blob/main/CHANGELOG.md)
- [Commits](primer/primitives@v11.3.2...v11.4.0)

Updates `@primer/stylelint-config` from 13.4.1 to 13.4.2
- [Release notes](https://github.com/primer/stylelint-config/releases)
- [Changelog](https://github.com/primer/stylelint-config/blob/main/CHANGELOG.md)
- [Commits](primer/stylelint-config@v13.4.1...v13.4.2)

Updates `autoprefixer` from 10.4.23 to 10.4.24
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.4.23...10.4.24)

Updates `eslint` from 9.39.2 to 10.0.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.0.0)

Updates `eslint-plugin-jest` from 29.12.1 to 29.15.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v29.12.1...v29.15.0)

Updates `globby` from 16.1.0 to 16.1.1
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](sindresorhus/globby@v16.1.0...v16.1.1)

Updates `semver` from 7.7.3 to 7.7.4
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.7.3...v7.7.4)

Updates `stylelint` from 17.0.0 to 17.3.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint@17.0.0...17.3.0)

---
updated-dependencies:
- dependency-name: "@primer/primitives"
  dependency-version: 11.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: "@primer/stylelint-config"
  dependency-version: 13.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: autoprefixer
  dependency-version: 10.4.24
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: eslint
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: eslint-plugin-jest
  dependency-version: 29.15.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: globby
  dependency-version: 16.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: semver
  dependency-version: 7.7.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: stylelint
  dependency-version: 17.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>

* Initial plan

* Fix all stylelint errors causing CI workflow failure

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Fix stylelint CI failure caused by missing `balanced-match` dependency (#2989)

* Initial plan

* Fix stylelint CI failure: update package-lock.json to use stylelint@17.4.0

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Brittany L. Houtz <55068883+llastflowers@users.noreply.github.com>
llastflowers added a commit that referenced this pull request Feb 26, 2026
* Bump the all group across 1 directory with 8 updates

Bumps the all group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@primer/primitives](https://github.com/primer/primitives) | `11.3.2` | `11.4.0` |
| [@primer/stylelint-config](https://github.com/primer/stylelint-config) | `13.4.1` | `13.4.2` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.23` | `10.4.24` |
| [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.0.0` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `29.12.1` | `29.15.0` |
| [globby](https://github.com/sindresorhus/globby) | `16.1.0` | `16.1.1` |
| [semver](https://github.com/npm/node-semver) | `7.7.3` | `7.7.4` |
| [stylelint](https://github.com/stylelint/stylelint) | `17.0.0` | `17.3.0` |



Updates `@primer/primitives` from 11.3.2 to 11.4.0
- [Release notes](https://github.com/primer/primitives/releases)
- [Changelog](https://github.com/primer/primitives/blob/main/CHANGELOG.md)
- [Commits](primer/primitives@v11.3.2...v11.4.0)

Updates `@primer/stylelint-config` from 13.4.1 to 13.4.2
- [Release notes](https://github.com/primer/stylelint-config/releases)
- [Changelog](https://github.com/primer/stylelint-config/blob/main/CHANGELOG.md)
- [Commits](primer/stylelint-config@v13.4.1...v13.4.2)

Updates `autoprefixer` from 10.4.23 to 10.4.24
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.4.23...10.4.24)

Updates `eslint` from 9.39.2 to 10.0.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.0.0)

Updates `eslint-plugin-jest` from 29.12.1 to 29.15.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v29.12.1...v29.15.0)

Updates `globby` from 16.1.0 to 16.1.1
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](sindresorhus/globby@v16.1.0...v16.1.1)

Updates `semver` from 7.7.3 to 7.7.4
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.7.3...v7.7.4)

Updates `stylelint` from 17.0.0 to 17.3.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint@17.0.0...17.3.0)

---
updated-dependencies:
- dependency-name: "@primer/primitives"
  dependency-version: 11.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: "@primer/stylelint-config"
  dependency-version: 13.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: autoprefixer
  dependency-version: 10.4.24
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: eslint
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: eslint-plugin-jest
  dependency-version: 29.15.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: globby
  dependency-version: 16.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: semver
  dependency-version: 7.7.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: stylelint
  dependency-version: 17.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix failing stylelint CI workflow (#2988)

* Bump the all group across 1 directory with 8 updates

Bumps the all group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@primer/primitives](https://github.com/primer/primitives) | `11.3.2` | `11.4.0` |
| [@primer/stylelint-config](https://github.com/primer/stylelint-config) | `13.4.1` | `13.4.2` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.23` | `10.4.24` |
| [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.0.0` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `29.12.1` | `29.15.0` |
| [globby](https://github.com/sindresorhus/globby) | `16.1.0` | `16.1.1` |
| [semver](https://github.com/npm/node-semver) | `7.7.3` | `7.7.4` |
| [stylelint](https://github.com/stylelint/stylelint) | `17.0.0` | `17.3.0` |



Updates `@primer/primitives` from 11.3.2 to 11.4.0
- [Release notes](https://github.com/primer/primitives/releases)
- [Changelog](https://github.com/primer/primitives/blob/main/CHANGELOG.md)
- [Commits](primer/primitives@v11.3.2...v11.4.0)

Updates `@primer/stylelint-config` from 13.4.1 to 13.4.2
- [Release notes](https://github.com/primer/stylelint-config/releases)
- [Changelog](https://github.com/primer/stylelint-config/blob/main/CHANGELOG.md)
- [Commits](primer/stylelint-config@v13.4.1...v13.4.2)

Updates `autoprefixer` from 10.4.23 to 10.4.24
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.4.23...10.4.24)

Updates `eslint` from 9.39.2 to 10.0.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.0.0)

Updates `eslint-plugin-jest` from 29.12.1 to 29.15.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v29.12.1...v29.15.0)

Updates `globby` from 16.1.0 to 16.1.1
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](sindresorhus/globby@v16.1.0...v16.1.1)

Updates `semver` from 7.7.3 to 7.7.4
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.7.3...v7.7.4)

Updates `stylelint` from 17.0.0 to 17.3.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint@17.0.0...17.3.0)

---
updated-dependencies:
- dependency-name: "@primer/primitives"
  dependency-version: 11.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: "@primer/stylelint-config"
  dependency-version: 13.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: autoprefixer
  dependency-version: 10.4.24
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: eslint
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: eslint-plugin-jest
  dependency-version: 29.15.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: globby
  dependency-version: 16.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: semver
  dependency-version: 7.7.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: stylelint
  dependency-version: 17.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>

* Initial plan

* Fix all stylelint errors causing CI workflow failure

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Fix stylelint CI failure caused by missing `balanced-match` dependency (#2989)

* Initial plan

* Fix stylelint CI failure: update package-lock.json to use stylelint@17.4.0

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Brittany L. Houtz <55068883+llastflowers@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Brittany L. Houtz <55068883+llastflowers@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants