
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Fixes the file extensions in TypeScript files so they may be loaded as ES modules.
ES Modules require imports to contain the file extension.
Currently, TypeScript doesn't add the file extensions for you. (issue) 🤞
Although, they could be added in the TS file this makes using the non-module (nodejs / mocha testing) difficult.
This simple program allows you to continue writing your TS files without the extension and will append .js to all your local imports.
This:
import Default from "no-change";
import { func } from "./local/function";
// ...
Turns into:
* import Default from "no-change";
* import { func } from "./local/function.js";
// ...
$ npm i -D tsc-esm
After you have compiled your TypeScript run it through this CLI.
$ tsc && tsc-esm index.js dist/*.js
FAQs
Fixes the file extensions in TypeScript files so they may be loaded as ES modules
We found that tsc-esm 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.