Package
this-file
If you are an author of open source repository, you may want to support both CJS and ESM for users since it's a confused period. It's hard to use `__dirname` and `import.meta.url` in one file specially for typescript project.
v2.0.3MITESM + CommonJSTypes: None
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 117.5k
- -51% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 0
- Direct, from package.json
- Last release
- -
- v2.0.3
- GitHub stars
- 4
- 0 forks
- Open issues / PRs
- 0 / 0
- Contributors
- -
- Commits, last 52 weeks
- 0
Downloads
Last week 2026-09-15 to 2026-09-21
117,517 downloads last week, 634,396 in the last month. The 12-month change of -51% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- -
- Latest version
- 2.0.3
- First published
- -
- Last push to GitHub
- 9 Jun 20211,933 days before the snapshot
- Repository archived
- No
- Open issues
- 0
- Open pull requests
- 0
- Commits, last 52 weeks
- 0
- Dependents on npm
- -
Major versions
-
Recent releases
-
- Module format
- ESM + CommonJSFrom package.json type, main and exports fields
- TypeScript types
- None
- Node.js engine range
- >=14.15.0
- Runtimes
- -
- Unpacked size (npm)
- 4.9 kB
- Dependencies (0)
- None
npm install this-file- jsDelivr
https://cdn.jsdelivr.net/npm/this-file@2.0.3/ - unpkg
https://unpkg.com/this-file@2.0.3/ - esm.sh
https://esm.sh/this-file@2.0.3
Indexability: Not indexed (discovery only): no category.