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

Upgrade all dependencies (including 11ty 2.0) #33

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Gaelan
Copy link

@Gaelan Gaelan commented Jun 23, 2023

Changes proposed in this pull request:

I've split each major upgrade into a separate commit, then one npm upgrade at the end to catch all the minor upgrades. See individual commit messages for notes on the breaking changes in the various packages, but a few significant notes:

  • 11ty 2.0 drops browsersync, which means our existing configuration for 404s in dev doesn't work; but it adds its own native support for showing a 404.html. I don't have access to Cloud.gov Pages, so please double-check this doesn't affect 404 pages in production.
  • eleventy-plugin-svg-sprite has a bug: it depends on glob, but doesn't specify this dependency in its package.json. Previously it got away with it, presumably because 11ty itself depended on glob, but this isn't the case anymore. As a workaround, we add a dependency on glob@8, the last version that works with eleventy-plugin-svg-sprite, which causes the correct version of glob to be present in node_modules. See May not play nicely with 11ty 2.0 patrickxchong/eleventy-plugin-svg-sprite#11 and Update to 11ty 2.0.1 11ta/11ta-template#52.
  • We previously pinned exactly USWDS 3.1.0. I couldn't find any documentation for why we pinned this exact version (it happened with the USWDS v3 upgrade PR), so I switched to a ^ dependency. If there's a reason that's a bad idea, let me know!
  • I'm only taking into account what's in this repo; downstream sites originally based on this template may have their own breaking changes to contend with. I suspect they won't be trying to merge back updates from here anyway, though hopefully this PR can serve as documentation for what needs to be done.
  • Several packages now depend on newer versions of Node. Cloud.gov Pages already uses Node 16, which is fine, but developer machines might be affected.

security considerations

New versions always carry the risk of new bugs, but the risk should be fairly minor.

Gaelan added 10 commits June 22, 2023 16:22
The only backwards-incompatible change for us is the switch from
browsersync to 11ty's own web server, which required a change in how the
404 page is provided.
This also requires adding a dependency on glob@8, as a workaround for a
missing dependency in eleventy-plugin-svg-sprite.
The breaking changes are a dependency on Node 14 (Cloud.gov Pages
defaults to Node 16 anyway) and a change in cache location which they
note arguably isn't a breaking change at all.
The only breaking change relates to the "system" time zone, but we
always specify utc.
We don't use either of the features with breaking changes.
The only breaking change is dropping Node 12 support; Cloud.gov Pages
defaults to Node 16.
The only breaking change affecting the CLI is loss of glob support by
default, which we don't use.
I'm not entirely sure why it was pinned to a specific version in the
first place, but USWDS follows semver, so there should be no need.
Big jump! Version-by-version notes:

0.15.0 contains breaking changes related to Yarn, which we don't use.

0.16.0 changes the names of some internal packages used by non-standard
scripts, and changes the behavior of imports with the `assert { type:
'json' }` syntax. Neither affects us.

0.17.0 affects esbuild's native rebuild, serve, and watch features. We
don't use these, in favor of wrapping esbuild in chokidar.

0.18.0 affects TypeScript, which we don't use.
After this, the only thing `npm outdated` reports is glob, which we
intentionally added in f4b9e86 to work around a bug.
@patrickxchong
Copy link

patrickxchong commented Aug 11, 2023

@Gaelan I've fixed the glob issue in eleventy-plugin-svg-sprite. Can refer to patrickxchong/eleventy-plugin-svg-sprite#11 for more details. Apologies for all inconveniences caused. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants