alphagov / govuk-design-system

One place for service teams to find styles, components and patterns for designing government services.
https://www.gov.uk/design-system
MIT License
512 stars 232 forks source link

Bump slug from 9.1.0 to 10.0.0 #4231

Open dependabot[bot] opened 1 month ago

dependabot[bot] commented 1 month ago

Bumps slug from 9.1.0 to 10.0.0.

Changelog

Sourced from slug's changelog.

10.0.0 (2024-10-17)

BREAKING CHANGES

  • This module only supports ESM. CommonJS and non-ESM script tags are no longer supported.

  • chore: add web-test-runner

  • chore: add coverage reporting for CLI tests

  • chore: fail CLI tests if coverage is not 100%

Commits
  • e0df06a chore(release): 10.0.0 [skip ci]
  • a8db3ed ESM only + move to webtestrunnner (#467)
  • cf5321d chore: add Node.js 23 to test matrix (#469)
  • 0d8bbff chore(deps): bump cookie and engine.io (#468)
  • 3703bc1 chore: update package-lock.json (#466)
  • b740c0d chore(deps-dev): bump semantic-release from 24.1.1 to 24.1.2 (#465)
  • e2a3b12 chore(deps-dev): bump nyc from 17.0.0 to 17.1.0 (#464)
  • 23bab8e chore(deps): bump body-parser from 1.20.2 to 1.20.3 (#463)
  • 6630102 chore(deps-dev): bump standard from 17.1.0 to 17.1.2 (#462)
  • 82a0c65 chore(deps-dev): bump semantic-release from 24.1.0 to 24.1.1 (#461)
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
owenatgov commented 1 month ago

This problem is fairly obvious: we can't use require anymore if we want to continue using slug. We use require in all our tooling code and only use slug in one place: the slugify function in filters.js. It might be easier to look for an alternative to slug or write something ourself.

romaricpascal commented 4 weeks ago

Replacing slug by another function would be something we'd need to do cautiously as not all functions creating slugs behave the same (mostly along treatments of 'special' characters like apostrophes, parenthesis...).

I don't think there's a massive urgency to update here, and as more and more libraries switch to ESM only, we may need to consider switching to ESM altogether ourselves as well 🤔

romaricpascal commented 4 weeks ago

We could also:

romaricpascal commented 3 weeks ago

Testing locally, it seems upgrading to Node 22, which is finally LTS, makes the tests run smoothly as it allows requireing ES modules. I'll raise a separate PR for this and once it's merged, we can rebase and merge this one 😊

romaricpascal commented 3 weeks ago

@dependabot rebase

romaricpascal commented 3 weeks ago

@dependabot recreate

romaricpascal commented 3 weeks ago

Testing locally, it seems upgrading to Node 22, which is finally LTS, makes the tests run smoothly as it allows requireing ES modules. I'll raise a separate PR for this and once it's merged, we can rebase and merge this one 😊

That feature is actually behind a flag so I'm not quite sure what made it work, maybe I forgot to npm i after pulling and was still running against slug 9.x 🤔