Skip to content

Conversation

fasttime
Copy link
Member

@fasttime fasttime commented Oct 28, 2024

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain:

Update or temporarily pin dependencies

fixes #19064

What changes did you make? (Give an overview)

This PR fixes the build by excluding some recently released dependency versions that are causing various problems.

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the build This change relates to ESLint's build process label Oct 28, 2024
Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 31f5c87
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/671f8d63a6984f000812961d

Comment on lines -28 to +36
uses: trunk-io/trunk-action@v1
uses: trunk-io/trunk-action@v1.1.17
with:

# Run on everything except the docs folder.
arguments: --ignore=docs/** --filter=eslint
check-mode: all

- name: Lint Files (other)
uses: trunk-io/trunk-action@v1
uses: trunk-io/trunk-action@v1.1.17
Copy link
Member Author

@fasttime fasttime Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trunk-io/[email protected] is causing build errors in some pull requests, apparently because there are two steps trying to upload an artifact with the same name in a job. Examples:

This was working well in v1.1.17 because the artifacts would have different pathnames. I did some tests on a fork of eslint and the build errors in the PRs disappeared after pinning the trunk-io/trunk-action dependency in the main branch and rebasing the PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe do the same in a few other places where we use trunk-io/trunk-action?

uses: trunk-io/trunk-action@v1

uses: trunk-io/trunk-action@v1

uses: trunk-io/trunk-action@v1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Done in 31f5c87.

"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.11.0",
"@eslint-community/regexpp": "^4.12.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eslint-community/regexpp v4.12.0 contains a bug that was causing some unit tests to fail (eslint-community/regexpp#208):

  1) prefer-regex-literals
       invalid
         new RegExp(/a/, 'd');:

      AssertionError [ERR_ASSERTION]: Error should have no suggestions on error with message: "Use regular expression literal with flags instead of the 'RegExp' constructor."
      + expected - actual

      -false
      +true
      
      at testInvalidTemplate (lib/rule-tester/rule-tester.js:1126:40)
      at Context.<anonymous> (lib/rule-tester/rule-tester.js:1292:37)
      at process.processImmediate (node:internal/timers:491:21)

  2) prefer-regex-literals
       invalid
         new RegExp('abc', 'd');:

      AssertionError [ERR_ASSERTION]: Error should have no suggestions on error with message: "Use a regular expression literal instead of the 'RegExp' constructor."
      + expected - actual

      -false
      +true

Upgrading to v4.12.1 solves the problem.

"@types/node": "^20.11.5",
"@typescript-eslint/parser": "^8.4.0",
"@wdio/browser-runner": "^9.0.5",
"@wdio/browser-runner": "9.2.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wdio/[email protected] is currently producing an error during npm install (#19064):

npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
npm error A complete log of this run can be found in: .../.npm/_logs/2024-10-28T08_15_15_704Z-debug-0.log

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking a look !

Copy link
Contributor

@christian-bromann christian-bromann Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a fix in v9.2.3 for it.

@fasttime fasttime marked this pull request as ready for review October 28, 2024 12:57
@fasttime fasttime requested a review from a team as a code owner October 28, 2024 12:57
@nzakas
Copy link
Member

nzakas commented Oct 28, 2024

Let's make sure to also file issues for these.

cc @det @christian-bromann

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Seems like a good idea to temporarily pin trunk-io/trunk-action and @wdio/browser-runner until the problems are resolved, and to update @eslint-community/regexpp dependency to skip the problematic version.

@mdjermanovic mdjermanovic merged commit 35a8858 into main Oct 28, 2024
26 checks passed
@mdjermanovic mdjermanovic deleted the fix-build branch October 28, 2024 13:24
@fasttime
Copy link
Member Author

Here's a tracking pull request for trunk-action: trunk-io/trunk-action#266.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build This change relates to ESLint's build process github actions

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Bug: npm install fails due to upstream workspace: protocol issue in @wdio/browser-runner

4 participants