Skip to content

Suppress caniuse-lite outdated error

Chad Woolley requested to merge suppress-caniuse-lite-outdated-error into master

When the caniuse-lite dependency is more than 6 months old, it starts showing a warning. We could update it every six months, but there can be issues trying to update it, and it will get updated eventually as its parent dependencies get updated, so it's less work to disable the warning message. UPDATE: This MR updates it, and documents the process of how to do it

Although !22447 (merged) prevented this message from causing CI failures, it still appears when running yarn stylelint from the command lint.

This MR sets the env var BROWSERSLIST_IGNORE_OLD_DATA which browserslist provides to suppress the error.


NOTE: This doesn't fix the error in Rubymine or other Jetbrains IDEs. To fix these, you can use this approach of using launchd.plist to get the BROWSERSLIST_IGNORE_OLD_DATA to be recognized by RubyMine started via Jetbrains Toolbox. e.g.:

cat << EOF | sudo tee /Library/LaunchDaemons/setenv.BROWSERSLIST_IGNORE_OLD_DATA.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
  <key>Label</key>
  <string>setenv.BROWSERSLIST_IGNORE_OLD_DATA</string>
  <key>ProgramArguments</key>
  <array>
    <string>/bin/launchctl</string>
    <string>setenv</string>
    <string>BROWSERSLIST_IGNORE_OLD_DATA</string>
    <string>true</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>ServiceIPC</key>
  <false/>
</dict>
</plist>
EOF

Then:

launchctl load -w /Library/LaunchDaemons/setenv.BROWSERSLIST_IGNORE_OLD_DATA.plist
Edited by Chad Woolley

Merge request reports