alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.17k stars 320 forks source link

Remove deprecated Husky setup code #5188

Closed querkmachine closed 1 month ago

querkmachine commented 1 month ago

govuk-frontend repo duplicate of this PR: https://github.com/alphagov/govuk-design-system/pull/3970

As this is solely related to internal tooling, it's my understanding that this doesn't require a changelog entry.

github-actions[bot] commented 1 month ago

:clipboard: Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 112.61 KiB
dist/govuk-frontend-development.min.js 41.83 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.33 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 82.03 KiB
packages/govuk-frontend/dist/govuk/all.mjs 981 B
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 112.6 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 41.82 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 4.86 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 79.16 KiB 39.79 KiB
accordion.mjs 23.5 KiB 12.39 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.05 KiB 6.06 KiB

View stats and visualisations on the review app


Action run for e54b53a3e889c8adc4a87f8c0f41a9ea421ac6bb

querkmachine commented 1 month ago

I guess since we're specifying --no-install, we can't jettison npx as per the 9.1.1 release notes? https://github.com/typicode/husky/releases/tag/v9.1.1

@domoscargin It's a bit of a poorly named flag.[^1] It doesn't run lint-staged without installing it, but instead automatically aborts running lint-staged if the CLI prompts to install it. Thus it requires lint-staged to already be installed if Husky is to do anything.

My assumption is that's intentional? I'm not totally sure why (maybe release scripts don't necessarily have lint-staged, maybe it's a developer consideration). Either way, it seems harmless to keep it.

[^1]: It's also the deprecated name for the flag. It's just --no in more recent versions of npm.

querkmachine commented 1 month ago

I've updated the PR to swap the deprecated --no-install flag for the replacement --no flag as well.