build(deps): bump actions/cache from 4 to 5#442
Conversation
3d14a35 to
ebed884
Compare
| '@storybook/addon-interactions', | ||
| '@storybook/addon-a11y', | ||
| ], | ||
| framework: { |
There was a problem hiding this comment.
What: The comment indicating the type for the StorybookConfig should be updated as it's still referencing webpack. This could lead to confusion for anyone reading the code.
Why: Maintaining accurate documentation within the code is important to avoid misleading impressions about the functioning of the code. It’s especially essential for teams who may onboard new developers who rely on in-line comments to understand the codebase.
How: Change the comment from /** @type { import('@storybook/react-webpack5').StorybookConfig } */ to /** @type { import('@storybook/react-vite').StorybookConfig } */ to reflect the correct framework.
| const { mergeConfig } = await import('vite'); | ||
|
|
||
| // Remove the dts plugin from the default config. | ||
| config.plugins = [ |
There was a problem hiding this comment.
What: You need to ensure the plugins used in the config are still relevant and necessary, or if they can be optimized. For example, check if all the addons provided are being used in your storybook.
Why: Using unnecessary plugins can slow down build times, complicate configurations, and introduce security vulnerabilities if they are outdated or not well-maintained. Clean-up can lead to improved performance and reduced potential attack vectors.
How: Review your usage of each plugin, and if any are found to be unnecessary, remove them from the list.
| '@': path.resolve(__dirname, '..', 'src'), | ||
| }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
What: Check the paths defined in your resolve.alias to ensure they are correct and that there aren’t any that point to obsolete files or folders.
Why: Incorrect paths may lead to runtime errors which can be difficult to debug, especially if they lead to files or folders that were renamed or removed. Ensuring these paths are valid is essential for a stable build.
How: Run the application and see if you encounter any errors relating to these paths. If they lead to missing files, correct or remove these alias definitions accordingly.
| @@ -1,30 +1,30 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
What: Consider adhering to a consistent import order for better readability. Group similar imports together (e.g., React and type imports, followed by styles) and separate them by a comment.
Why: Consistent import ordering enhances code maintainability and makes it easier for other developers to read and understand the dependencies used in this file.
How: Refactor the imports as follows:
import React from 'react';
import type { Preview } from '@storybook/react';
import '../src/tailwind.css';| /** @type { import('@storybook/react').Preview } */ | ||
|
|
||
| const preview: Preview = { | ||
| parameters: { |
There was a problem hiding this comment.
What: The a11y parameter disables color contrast checks for the entire Storybook, which could lead to accessibility issues. It is generally advisable to enforce accessibility rules rather than disable them.
Why: Disabling accessibility checks may cause UI components to be non-compliant with accessibility standards, limiting your application's usability for users with visual impairments.
How: Instead of disabling the color-contrast rule, consider fixing the instances that trigger these alerts or providing background colors that can meet the contrast ratio requirements based on best practices.
| ], | ||
| }; | ||
|
|
||
| export default preview; |
There was a problem hiding this comment.
What: Consider providing more context in your comments for complex structures like the decorator function to aid future maintainability and understanding.
Why: While your code is clear, adding brief comments next to complex elements can prevent misunderstandings and make it easier for future maintainers to work with this code.
How: Consider adding comments such as:
// Decorator that adds a custom font family and box model to all stories.
decorators: [
(Story) => (
<div className="[&_*]:[font-family:Figtree,sans-serif] [&_*]:box-border">
<Story />
</div>
),
],| @@ -1,30 +1,30 @@ | |||
| const { getStoryContext } = require('@storybook/test-runner'); | |||
There was a problem hiding this comment.
What: You are importing the same modules without any modifications to their usage or settings. Double-check if you made any necessary changes or if this repetition is redundant.
Why: Redundant imports can clutter the code and create confusion regarding what changes were made. Keeping the code clean and understandable is crucial for maintainability.
How: Confirm if the imports are indeed necessary; if not, consider cleaning any unused or duplicate imports to improve clarity.
| }; | ||
| const { getStoryContext } = require('@storybook/test-runner'); | ||
| const { injectAxe, checkA11y, configureAxe } = require('axe-playwright'); | ||
There was a problem hiding this comment.
What: Consider adding error handling while configuring Axe and running accessibility checks to handle any potential failures gracefully.
Why: Adding error handling can prevent crashes during tests and provide helpful error messages, making it easier to debug issues that arise during accessibility checks.
How: Wrap your configureAxe and checkA11y calls in a try-catch block to gracefully handle any exceptions during execution.
| module.exports = { | ||
| async preVisit(page) { | ||
| await injectAxe(page); | ||
| }, |
There was a problem hiding this comment.
What: Review the definition and use of the element variable. Ensure that '#storybook-root' is indeed the right default element for accessibility checks.
Why: Choosing the right element is critical for accurate accessibility testing. Ensuring the default is correct can avoid false negatives in your reports.
How: Test and confirm that the element used (in this case, '#storybook-root') effectively represents the root element of your storybook instance. If needed, adjust to another selector.
| }, | ||
| }); | ||
| }, | ||
| }; |
There was a problem hiding this comment.
What: Make sure to clean up your testing strategy documentation regarding any new practices or conventions introduced by modifying this file.
Why: As your testing approaches or configurations evolve, maintaining clear documentation will ensure all team members are on the same page and can prevent future problems during test execution.
How: Update related README or documentation files in the project to include any changes pertaining to accessibility checks or test runner operations.
Bumps actions/cache from 4 to 5.
Release notes
Sourced from actions/cache's releases.
... (truncated)
Changelog
Sourced from actions/cache's changelog.
... (truncated)
Commits
27d5ce7Merge pull request #1747 from actions/yacaovsnc/update-dependencyf280785licensed changes619aeb1npm run build generated dist filesbcf16c2Update ts-http-runtime to 0.3.56682284Merge pull request #1738 from actions/prepare-v5.0.4e340396Update RELEASES8a67110Add licenses1865903Update dependencies & patch security vulnerabilities5656298Merge pull request #1722 from RyPeck/patch-14e380d1Fix cache key in examples.md for bun.lockDependabot 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)