Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(deps-dev): bump commitlint from 18.6.1 to 19.1.0 #1871

Merged
merged 2 commits into from Mar 12, 2024

Conversation

galtm
Copy link
Collaborator

@galtm galtm commented Mar 5, 2024

This PR bumps both @commitlint/cli and @commitlint/config-angular to the latest bug-fix version of major version 19.

It seems that v19 of these packages has some breaking changes, and maybe that's why #1869 and #1868 had errors,

/home/runner/work/xspec/xspec/node_modules/@commitlint/cli/lib/cli.js:123
        throw err;
        ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/xspec/xspec/node_modules/@commitlint/config-angular/index.js from /home/runner/work/xspec/xspec/node_modules/@commitlint/resolve-extends/lib/index.js not supported.
Instead change the require of /home/runner/work/xspec/xspec/node_modules/@commitlint/config-angular/index.js in /home/runner/work/xspec/xspec/node_modules/@commitlint/resolve-extends/lib/index.js to a dynamic import() which is available in all CommonJS modules.
    at /home/runner/work/xspec/xspec/node_modules/@commitlint/resolve-extends/lib/index.js:48:19
    at Array.reduce (<anonymous>)
    at loadExtends (/home/runner/work/xspec/xspec/node_modules/@commitlint/resolve-extends/lib/index.js:45:[16](https://github.com/xspec/xspec/actions/runs/8093925522/job/22117537139?pr=1869#step:3:17))
    at resolveExtends (/home/runner/work/xspec/xspec/node_modules/@commitlint/resolve-extends/lib/index.js:25:22)
    at load (/home/runner/work/xspec/xspec/node_modules/@commitlint/load/lib/load.js:42:52)
    at async main (/home/runner/work/xspec/xspec/node_modules/@commitlint/cli/lib/cli.js:196:20) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v[18](https://github.com/xspec/xspec/actions/runs/8093925522/job/22117537139?pr=1869#step:3:19).[19](https://github.com/xspec/xspec/actions/runs/8093925522/job/22117537139?pr=1869#step:3:20).1
Error: Process completed with exit code 1.

Without understanding the root cause of the error, I thought maybe bumping both packages to the same major version in the same PR would help. I tried it in my own fork. There was a nonfatal warning (below), but the process didn't fail except when the PR title was too long and triggered a legitimate failure.

Run commitlint
(node:1741) [DEP0[15](https://github.com/galtm/xspec/actions/runs/8161083672/job/22309078267#step:3:16)1] DeprecationWarning: No "main" or "exports" field defined in the package.json for /home/runner/work/xspec/xspec/node_modules/@commitlint/config-angular-type-enum/ resolving the main entry point "index.js", imported from /home/runner/work/xspec/xspec/node_modules/@commitlint/config-angular/index.js.
Default "index" lookups for the main are deprecated for ES modules.
(Use `node --trace-deprecation ...` to show where the warning was created)
⧗   input: ci(deps-dev): commitlint to [19](https://github.com/galtm/xspec/actions/runs/8161083672/job/22309078267#step:3:20).0.3 (EXPERIMENT, my fork only)
✔   found 0 problems, 0 warnings

Both @commitlint/cli and @commitlint/config-angular
@galtm galtm added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Mar 5, 2024
@galtm galtm added this to the v3.0 milestone Mar 5, 2024
@galtm
Copy link
Collaborator Author

galtm commented Mar 5, 2024

The nonfatal warning looks like conventional-changelog/commitlint#3952 for which a fix is pending. Maybe v19.0.4 will resolve the warning.

@galtm
Copy link
Collaborator Author

galtm commented Mar 5, 2024

First run of AppVeyor check failed with this message:

Build execution time has reached the maximum allowed time for your plan (60 minutes).

In the log, I see bats, XSpec, and end-to-end test results with nothing that looks like a failure or problem. It looks like the process merely took too long.

I restarted it in the hope that the second run would finish in time.

@galtm
Copy link
Collaborator Author

galtm commented Mar 5, 2024

Second AppVeyor run was successful and took 55 min 4 sec.

Both @commitlint/cli and @commitlint/config-angular
@galtm galtm changed the title ci(deps-dev): bump commitlint from 18.6.0 to 19.0.3 ci(deps-dev): bump commitlint from 18.6.1 to 19.1.0 Mar 12, 2024
@galtm
Copy link
Collaborator Author

galtm commented Mar 12, 2024

v19.1.0 was released, so I updated this PR to use that instead of v19.0.3. With v19.1.0, I don't see the nonfatal warning that I mentioned earlier with v19.0.3.

@galtm
Copy link
Collaborator Author

galtm commented Mar 12, 2024

v19 of the commitlint packages had this breaking change: conventional-changelog/commitlint#3850

But if we bump both the config-angular and the cli packages to v19 together, they seem to work fine in this repo.

@galtm galtm merged commit c8effed into xspec:master Mar 12, 2024
39 checks passed
@galtm galtm deleted the commitlint-v19 branch March 12, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant