
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
Find which files reference the target file
tsconfig.jsonesm and cjs$ npm i -g finse
$ finse -h # help
Suppose we have a project, its directory structure is like this:
finse
└─ test
└─ demo
├─ bar
├─ corge
└─ nacho.vue
└─ oop.ts
├─ foo
└─ sharp.js # sdf
└─ thud.tsx
And you want to find out which files reference oop.ts,just run:
$ finse test/demo/bar/oop.ts
Maybe you will see the output similar to this:
The yellow background represents the file you want to match, the cyan background is the file that "uses" it
--root [rootname]
--expand
--link
--ignore
It's hard to find which other files use the target file
Search in IDEA is not enough, it's difficult to give exact search keywords
package.json is located is selected as the root directoryfinse will recognize the following imports// static import
import xx from 'xxx'
if (Math.random() > 0.5) {
// dynamic import
import('xx.ts')
}
// require import
require('./xx/xx')
finse works with regular expressions, But don't worry about "accidental recognition":
// Yes, legal import
import xx from 'xxx'
// No,Imports in comments are not recognized
// comment: import xx from 'xxx'
And supports identifying paths with alias:
<script setup>
import xx from '@/xx'
// or:
import xxx from '~/xx'
</script>
But have to make sure there is such a configuration in [t|j]sconfig.json:
{
"compilerOptions": {
"paths": {
"~/*": ["test/demo/bar/*"],
"@/*": ["src/*"]
}
}
}
it's mean find use
Thanks for the proposal for jsconfig.json by Artsmp
FAQs
A command line tool template
We found that finse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.