skovy / typed-scss-modules

🎁 Generate type definitions (.d.ts) for CSS Modules using SCSS
https://skovy.dev/generating-typescript-definitions-for-css-modules-using-sass/
MIT License
636 stars 67 forks source link

--listDifferent does not take --ignore into account #202

Closed Smona closed 1 year ago

Smona commented 1 year ago

Expected Behavior

When I run codegen and no files are changed, I would expect running it with --listDifferent to pass.

Current Behavior

If I ignore **/node_modules/**/*, no declaration files are generated for scss files included by my node_modules. However, if I run --listDifferent with this ignore option, it will fail because those files aren't generated. This makes it hard to verify that types which are tracked in VCS are up to date when checking out those changes.

Possible Solution

Make the behavior of --ignore consistent both with and without the --listDifferent option.

Steps to Reproduce (for bugs)

  1. Generate type declarations with some --ignore option.
  2. Run again with --listDifferent and the same --ignore option.

Context

My use case is running a CI job to make sure types are up to date in a checked-out repository, where some SCSS files are gitignored.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 7.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

skovy commented 1 year ago

@Smona do you want to try the latest release?

Smona commented 1 year ago

Awesome, thanks for the quick fix!!