Problem/Motivation

The pipeline for the latest commit to the dev branch failed: https://git.drupalcode.org/project/a11y_autocomplete/-/pipelines/389284

Steps to reproduce

Trigger the pipeline on Gitlab.

Proposed resolution

Update dependencies and .gitlab-ci.yml as needed.

Remaining tasks

  1. Fix failing test
  2. Update Browserlist DB
  3. Manually confirm that build artifacts are working as expected after rollup upgrades. [automated tests are passing, so this may be unnecessary]

User interface changes

API changes

The logic change removes the autocomplete-change event from any case of the input losing focus.

Any code that depends on autocomplete-change events in this case will need to adapt.

In most cases that are listening for autocomplete-change events from the input, a standard blur event listener will work as a substitute. Though the blur event wasn't fired on Firefox in the automated tests, it is fired in manual testing on a real browser.

In cases where the blur event doesn't fire from the input, the autocomplete-change event also wouldn't fire because it is triggered from within a blur event handler.

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

darvanen created an issue. See original summary.

darvanen’s picture

Assigned: darvanen » Unassigned
Issue summary: View changes
Status: Active » Needs work

Well, the yml is now compatible, but the tests are all broken. I had a go at repairing the dependency scanning job using https://docs.gitlab.com/ee/user/application_security/dependency_scanning... but I think I would need maintainer access to do it fully.

The audit fails because there's an old dependency on rollup:2.57.0 which is brought in by test-runner among other things:

a11y_autocomplete % yarn why rollup -R
└─ @drupal/autocomplete@workspace:.
   ├─ @web/test-runner@npm:0.13.22 (via npm:^0.13.22)
   │  └─ @web/dev-server@npm:0.1.24 (via npm:^0.1.24)
   │     ├─ @web/dev-server-rollup@npm:0.3.10 (via npm:^0.3.10)
   │     │  └─ rollup@npm:2.57.0 (via npm:^2.56.2)
   │     └─ rollup@npm:2.57.0 (via npm:*)
   └─ rollup@npm:2.60.1 (via npm:^2.60.1)

The tests don't run with the current set up dependencies because pnp is complaining about short circuits. I tried adding the explicit shortCircuit: true return parameters in resolve and load but then it failed on webpack (only). (didn't commit)

This needs someone who understands this setup to give it an overhaul, I'm out of my depth :(

kentr’s picture

Assigned: Unassigned » kentr
kentr’s picture

Assigned: kentr » Unassigned

lint and audit jobs are passing.

Tests are running, but one is failing in Firefox. Can someone familiar with the tests look at it?

One of the audit errors was for eslint. Upgrading that and eslint-plugin-jsdoc as required introduced a lot of jsdoc lint warnings. Therefore, I set --max-warnings=-1 temporarily to keep the warnings from causing job failure. Someone will need to review the warnings and tweak the rules or the code.

I upgraded both the playwright and main docker images.

For the main image, I used drupalci/php-8.3-apache:production because the drupalci images are used in the gitlab_templates project.

I reasoned that there would be maintenance benefits with using the "official" images, and there might be a caching benefit in Gitlab. Also, the drupalci image already has git.

Another audit error was for rollup-plugin-terser, which minifies the build artifact a11y.autocomplete.min.js. After switching to @rollup/plugin-terser, the resulting a11y.autocomplete.min.js is slightly different than before. So, it should be checked.

The browserlist DB still needs updating.

kentr’s picture

Issue summary: View changes
kentr’s picture

Issue summary: View changes
Status: Needs work » Needs review

I made the changes discussed in Slack and updated the IS.

Details on the logic changes are in the comments and commit messages.

Pipeline is green.

nod_ made their first commit to this issue’s fork.

  • nod_ committed 6bef9cea on 1.0.x authored by darvanen
    Issue #3498078 by kentr, darvanen: Gitlab yml is out of date
    
nod_’s picture

Status: Needs review » Fixed

Thanks a lot for getting that resolved!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.