-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cannot read properties of undefined (reading 'B') after update library caniuse-lite to 1.0.30001655 version #299
Comments
Can I Use deleted |
@ai , thank you for the help and support 🙌 |
I'm proposing to delete it in |
@zhangqiankunai My current workaround is to lock the version of caniuse-lite like this (say you're using PNPM) in package.json: {
"pnpm": {
"overrides": {
"caniuse-lite": "1.0.30001653"
},
}
} |
This brings Jest to MW Core so that Vue components can more easily be tested. Packages ending with 'icons.json' are auto-mapped to the @wikimedia/codex-icons package, establishing a new convention. Jest is needed for testing Vue, but can be used for general JS testing as well. Documentation to come at https://www.mediawiki.org/wiki/Jest Usage: to run the tests, run "npx jest" or "npm run jest" in the root folder. This could be aliased to a "test:unit" script in package.json if desired. In order to make a Vue component testable, it is required to follow the `module.exports = exports` pattern. See: https://nodejs.org/api/modules.html#exports-shortcut A default jest.setup.js is added that mocks Core's mw global object, as well as providing the $i18n Vue plugin. This is based on Extension:GrowthExperiments (GPL-3.0-or-later). See https://w.wiki/B9vM An initial test for mediawiki.special.block is added, exemplifying how to mock calls to mw.config.get(). NOTE: The "overrides" added to package.json is a temporary measure to get around a current issue with caniuse-lite and the stylelint plugin that relies on it. See: RJWadley/stylelint-no-unsupported-browser-features#299 Bug: T251790 Change-Id: I1af15e038d17b0f1c645fc5debf9db5846f6215c
anandthakker/doiuse#191 is merged. What should the next step be? |
Next step would be for @RJWadley to update the peer dependency and publish a new version. @MuTsunTsai has a workaround for the time being. |
🎉 This issue has been resolved in version 8.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
We started getting errors after updating the library caniuse-lite from 1.0.30001653 to 1.0.30001655.
It happened because caniuse-db deleted some information, which was used by stylelint-no-unsupported-browser-features
TypeError: Cannot read properties of undefined (reading 'B') at Module.unpackFeature (my-project/node_modules/.pnpm/[email protected]/node_modules/caniuse-lite/dist/unpacker/feature.js:31:29) at BrowserSelection.compileBrowserSupport (file://my-project/node_modules/.pnpm/[email protected]/node_modules/doiuse/lib/BrowserSelection.js:148:35) at BrowserSelection.missingSupport (file://my-project/node_modules/.pnpm/[email protected]/node_modules/doiuse/lib/BrowserSelection.js:178:27) at DoIUse.postcss (file://my-project/node_modules/.pnpm/[email protected]/node_modules/doiuse/lib/DoIUse.js:67:43) at file://my-project/node_modules/.pnpm/[email protected][email protected]/node_modules/stylelint-no-unsupported-browser-features/lib/index.js:99:27 at file://my-project/node_modules/.pnpm/[email protected][email protected]/node_modules/stylelint/lib/lintPostcssResult.mjs:112:8 at Array.map () at lintPostcssResult (file://my-project/node_modules/.pnpm/[email protected][email protected]/node_modules/stylelint/lib/lintPostcssResult.mjs:102:18) at async lintSource (file://my-project/node_modules/.pnpm/[email protected][email protected]/node_modules/stylelint/lib/lintSource.mjs:108:2) at async file://my-project/node_modules/.pnpm/[email protected][email protected]/node_modules/stylelint/lib/standalone.mjs:236:27
The text was updated successfully, but these errors were encountered: