Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Tags: smeijer/unimported

Tags

v1.31.1

Toggle v1.31.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
chore(deps-dev): bump @babel/traverse from 7.23.0 to 7.23.2 (#188)

Co-authored-by: dependabot[bot] <49699333 dependabot[bot]@users.noreply.github.com>

v1.31.0

Toggle v1.31.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: `ignoreUnresolved` (#191)

v1.30.0

Toggle v1.30.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add support for alternative config files with cosmiconfig (#178)

Fixes #118 

Introduces `cosmiconfig` as requested in #118 in order to support
loading the config from alternative file formats like:
```
.unimportedrc.js
.unimportedrc.yml
package.json > "unimported" key
```

I'm using `cosmiconfigSync` utilities instead of the async version,
despite them being available since the `getConfig` is an async method.
When we use the async equivalent, we hit a segfault in Node as a result
of `cosmiconfig` trying to call a dynamic import on the file within a
Jest context that doesn't allow it to. Patched in a recent version of
Node, and once the test infra can require the latest version it should
be fine to switch to the async version.

See nodejs/node#35889 and
jestjs/jest#11438

I haven't made any efforts to change the `update` function to write
updates to the loaded files, as this would be difficult/impossible to
update something like a .js or .yml (if using features like anchors) in
a meaningful way.

A few notes on the other changes included:
1. `cosmiconfig` pulls in a newer version of TypeScript which was
incompatible with the version of `@types/node` we used, updated it
2. One of the tests produced invalid JSON to a config file, which failed
silently before and passed the test, but now fails loudly when
`cosmiconfig` tries to read and parse the JSON. Updated it to be valid
to fulfill the spirit of the test.

---------

Co-authored-by: Stephan Meijer <[email protected]>

v1.29.2

Toggle v1.29.2's commit message
fix: remove console.log (#158)

v1.29.1

Toggle v1.29.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: ensure package.json can be resolved on windows (#157)

v1.29.0

Toggle v1.29.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
docs: add @vimutti77 as a contributor for code (#153)

v1.28.0

Toggle v1.28.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: support unimported assets (#148)

closes #91 
closes #57

Add `assetsExtensions` on config for tracing assets files like jpeg,
png, etc.
Files with extensions in `assetsExtensions` are not ignored when
detecting unimported files and marked as resolved if imported.

---------

Co-authored-by: Stephan Meijer <[email protected]>

v1.27.1

Toggle v1.27.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: don't exit with non-zero when provided scope is clean (#146)

v1.27.0

Toggle v1.27.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: show source file that tries to include unresolved file (#105)

Co-authored-by: Stephan Meijer <[email protected]>

v1.26.0

Toggle v1.26.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: added format flags for unused, unimported and unresolved to pri…

…nt them separately (#139)

* feat: added format flags for unused, unimported and unresolved to print them separately

* feat: removed unwanted console

---------

Co-authored-by: Aditya Vandan Sharma <[email protected]>