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

Bump govuk-frontend from 4.0.1 to 4.1.0 #452

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 25, 2022

Bumps govuk-frontend from 4.0.1 to 4.1.0.

Release notes

Sourced from govuk-frontend's releases.

GOV.UK Frontend v4.1.0

New features

Import GOV.UK Frontend JavaScript as ECMAScript (ES) modules

You can now import our component JavaScript into your service as ES modules, if you're using a bundler.

This change allows you to import only the JavaScript you need, and helps reduce duplication of polyfills.

Because we're shipping ES modules in addition to how we currently publish our component JavaScript, this change is backwards compatible. You will not be required to make any changes unless you want to.

If you want to import using ES modules, we recommend you only use import to import the JavaScript for components you're using in your service. For example:

import { SkipLink, Radios } from 'govuk-frontend'
var $skipLink = document.querySelector('[data-module="govuk-skip-link"]')
if ($skipLink) {
new SkipLink($skipLink).init()
}
var $radios = document.querySelectorAll('[data-module="govuk-radios]')
if ($radios) {
for (var i = 0; i < $radios.length; i++) {
new Radios($radios[i]).init()
}
}

If you need to import all of GOV.UK Frontend's components, then use the initAll function to initialise them:

import { initAll } from 'govuk-frontend'
initAll()

Depending on the bundler you use, you may also need to make changes to your JavaScript bundler configuration file. You can read more in our installation instructions about importing JavaScript using a bundler.

This was added in [pull request #2586: Publish our JavaScript as ES modules alongside Universal Module Definition (UMD)](alphagov/govuk-frontend#2586).

Recommended changes

We've recently made some non-breaking changes to GOV.UK Frontend. Implementing these changes will make your service work better.

Remove aria-live from the character count component

If you're not using the Nunjucks macros, remove the aria-live attribute from the character count message element. This element's content no longer updates, as we've moved the live counter functionality to a new element injected by JavaScript.

This change was introduced in [pull request #2577: Refactor character count to inject new element](alphagov/govuk-frontend#2577).

... (truncated)

Changelog

Sourced from govuk-frontend's changelog.

4.1.0 (Feature release)

New features

Import GOV.UK Frontend JavaScript as ECMAScript (ES) modules

You can now import our component JavaScript into your service as ES modules, if you're using a bundler.

This change allows you to import only the JavaScript you need, and helps reduce duplication of polyfills.

Because we're shipping ES modules in addition to how we currently publish our component JavaScript, this change is backwards compatible. You will not be required to make any changes unless you want to.

If you want to import using ES modules, we recommend you only use import to import the JavaScript for components you're using in your service. For example:

import { SkipLink, Radios } from 'govuk-frontend'
var $skipLink = document.querySelector('[data-module="govuk-skip-link"]')
if ($skipLink) {
new SkipLink($skipLink).init()
}
var $radios = document.querySelectorAll('[data-module="govuk-radios]')
if ($radios) {
for (var i = 0; i < $radios.length; i++) {
new Radios($radios[i]).init()
}
}

If you need to import all of GOV.UK Frontend's components, then use the initAll function to initialise them:

import { initAll } from 'govuk-frontend'
initAll()

Depending on the bundler you use, you may also need to make changes to your JavaScript bundler configuration file. You can read more in our installation instructions about importing JavaScript using a bundler.

This was added in [pull request #2586: Publish our JavaScript as ES modules alongside Universal Module Definition (UMD)](alphagov/govuk-frontend#2586).

Recommended changes

We've recently made some non-breaking changes to GOV.UK Frontend. Implementing these changes will make your service work better.

Remove aria-live from the character count component

If you're not using the Nunjucks macros, remove the aria-live attribute from the character count message element. This element's content no longer updates, as we've moved the live counter functionality to a new element injected by JavaScript.

This change was introduced in [pull request #2577: Refactor character count to inject new element](alphagov/govuk-frontend#2577).

... (truncated)

Commits
  • 137b806 Merge pull request #2630 from alphagov/release-4.1.0
  • f2bd57c Release v4.1.0
  • a39c04a Merge pull request #2627 from alphagov/options-not-arguments
  • 88cfa81 Use ‘option’ instead of ‘argument’
  • 8345855 Merge pull request #2624 from alphagov/action-2i-comments
  • 3637e33 Action 2i recommendations to improve release notes
  • d922e6e Merge pull request #2620 from alphagov/remove-slash-from-link-text
  • 4016b28 Remove slash from PR title
  • 3cdea58 Merge pull request #2615 from alphagov/disabled-hint-color
  • 0974313 Document in CHANGELOG
  • 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 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)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 25, 2022
@commitBlob
Copy link
Contributor

commitBlob commented May 30, 2022

It seems like package upgrade breaks our build

[2022-05-30T07:52:22.497Z] [webpack-cli] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /opt/app/node_modules/govuk-frontend/package.json
[2022-05-30T07:52:22.497Z]     at new NodeError (internal/errors.js:322:7)
[2022-05-30T07:52:22.497Z]     at throwExportsNotFound (internal/modules/esm/resolve.js:332:9)
[2022-05-30T07:52:22.497Z]     at packageExportsResolve (internal/modules/esm/resolve.js:565:3)
[2022-05-30T07:52:22.497Z]     at resolveExports (internal/modules/cjs/loader.js:450:36)
[2022-05-30T07:52:22.497Z]     at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
[2022-05-30T07:52:22.498Z]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
[2022-05-30T07:52:22.498Z]     at Function.resolve (internal/modules/cjs/helpers.js:107:19)
[2022-05-30T07:52:22.498Z]     at Object.<anonymous> (/opt/app/webpack/govukFrontend.js:4:29)
[2022-05-30T07:52:22.498Z]     at Module._compile (internal/modules/cjs/loader.js:1085:14)
[2022-05-30T07:52:22.498Z]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) {
[2022-05-30T07:52:22.498Z]   code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
[2022-05-30T07:52:22.498Z] }

Assuming it is due the way we import the library, as library changed import as a part of this release

@commitBlob
Copy link
Contributor

https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#import-css-assets-and-javascript
Potentially this should help us in resolving the build issues

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/govuk-frontend-4.1.0 branch from a4a5146 to be9828c Compare May 30, 2022 10:32
Bumps [govuk-frontend](https://github.com/alphagov/govuk-frontend) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/alphagov/govuk-frontend/releases)
- [Changelog](https://github.com/alphagov/govuk-frontend/blob/main/CHANGELOG.md)
- [Commits](alphagov/govuk-frontend@v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: govuk-frontend
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/govuk-frontend-4.1.0 branch from be9828c to 45f8069 Compare May 31, 2022 09:17
@commitBlob commitBlob mentioned this pull request May 31, 2022
@commitBlob
Copy link
Contributor

addressed in #481

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 14, 2022

Looks like govuk-frontend is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Jun 14, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/govuk-frontend-4.1.0 branch June 14, 2022 16:51
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants