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

fix: always auto-update the browserslist db on deploy #348

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

joanise
Copy link
Member

@joanise joanise commented Oct 3, 2024

PR Goal?

When we deploy, I often notice this message in the logs:

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

Instead of trying to remember to do it periodically, it seems wise to just automate it.

This automation here is to update the db and commit the changes when we are testing on a deb branch (i.e., a non-protected branch).

I also fixed some concurrency problems that I noticed while testing this PR.

Priority?

low

Confidence?

high

Copy link

semanticdiff-com bot commented Oct 3, 2024

Review changes with SemanticDiff.

Analyzed 1 of 4 files.

Filename Status
✔️ package-lock.json 68.97% smaller
.github/workflows/dev-preview.yml Unsupported file format
.github/workflows/end-to-end-tests.yml Unsupported file format
.github/workflows/pr-preview.yml Unsupported file format

Copy link
Contributor

github-actions bot commented Oct 3, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-10-09 16:03 UTC

@joanise joanise force-pushed the dev.ej/auto-update-browsersdb branch from bb07213 to 77da39c Compare October 4, 2024 15:23
Copy link
Contributor

github-actions bot commented Oct 4, 2024

The browserslist db is out of date.
diff --git a/package-lock.json b/package-lock.json
index 52db926..eb71102 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11088,9 +11088,9 @@
       }
     },
     "node_modules/caniuse-lite": {
-      "version": "1.0.30001600",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz",
-      "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==",
+      "version": "1.0.30001667",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz",
+      "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==",
       "dev": true,
       "funding": [
         {
@@ -11105,7 +11105,8 @@
           "type": "github",
           "url": "https://github.com/sponsors/ai"
         }
-      ]
+      ],
+      "license": "CC-BY-4.0"
     },
     "node_modules/caseless": {
       "version": "0.12.0",
Please run 'npx update-browserslist-db@latest' and commit the changes.

@joanise joanise force-pushed the dev.ej/auto-update-browsersdb branch 2 times, most recently from a7cb3ca to a88c33e Compare October 4, 2024 18:02
@joanise joanise force-pushed the dev.ej/auto-update-browsersdb branch from e2b8827 to e752637 Compare October 4, 2024 18:39
Copy link
Collaborator

@dhdaines dhdaines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good!

@joanise joanise merged commit e752637 into main Oct 9, 2024
2 checks passed
@joanise joanise deleted the dev.ej/auto-update-browsersdb branch October 9, 2024 16:03
joanise added a commit that referenced this pull request Nov 14, 2024
The strategy I implemented in #348 to always update the browserslist-db
on install *and commit the results* creates a lot of noise: a lot of
similar commits, and we still want to update this db in deploy anyway,
so it's not the right strategy.

This commit removes the code that commits the changes, and instead
updates the db in every workflow that tests or deploys Studio-Web.

Furthermore, Del is going to add a build-time dependency that will do
this update automatically when you build or serve locally, so we do the
same everywhere, automatically, and reasonably quietly.
joanise added a commit that referenced this pull request Nov 22, 2024
The strategy I implemented in #348 to always update the browserslist-db
on install *and commit the results* creates a lot of noise: a lot of
similar commits, and we still want to update this db in deploy anyway,
so it's not the right strategy.

This commit removes the code that commits the changes, and instead
updates the db in every workflow that tests or deploys Studio-Web.

Furthermore, Del is going to add a build-time dependency that will do
this update automatically when you build or serve locally, so we do the
same everywhere, automatically, and reasonably quietly.
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