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(utils): only run plugin for sass files #361

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

rwaskiewicz
Copy link
Member

@rwaskiewicz rwaskiewicz commented Jun 30, 2023

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Tests (npm test) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

While I do not believe this occurs in practice, it is theoretically possible to try to run the plugin if a non-string filename is somehow provided to the plugin's transform function

GitHub Issue Number: N/A

What is the new behavior?

this commit updates the utility method for checking whether the plugin should run on a file, usePlugin to return false for files that do not end in .sass/.scss.

Does this introduce a breaking change?

  • Yes
  • No

Testing

Updated unit tests.

The Ionic Framework never actually appears to hit the return statement I updated here, and should not be affected by this change

Other information

@rwaskiewicz rwaskiewicz marked this pull request as ready for review June 30, 2023 18:32
@rwaskiewicz rwaskiewicz requested a review from a team as a code owner June 30, 2023 18:32
this commit updates the utility method for checking whether the plugin
should run on a file, `usePlugin` to return `false` for files that do
not end in `.sass`/`.scss`.
@rwaskiewicz rwaskiewicz enabled auto-merge (squash) July 13, 2023 13:21
@rwaskiewicz rwaskiewicz merged commit 76c367d into main Jul 13, 2023
4 checks passed
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.

3 participants