Skip to content

fix(utils): only run plugin for sass files#361

Merged
rwaskiewicz merged 1 commit intomainfrom
rwaskiewicz/fix-use-plugin
Jul 13, 2023
Merged

fix(utils): only run plugin for sass files#361
rwaskiewicz merged 1 commit intomainfrom
rwaskiewicz/fix-use-plugin

Conversation

@rwaskiewicz
Copy link
Copy Markdown
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 force-pushed the rwaskiewicz/fix-use-plugin branch from bf2231d to 546858b Compare July 13, 2023 13:21
@rwaskiewicz rwaskiewicz enabled auto-merge (squash) July 13, 2023 13:21
@rwaskiewicz rwaskiewicz merged commit 76c367d into main Jul 13, 2023
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