
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@naturalcycles/linked
Advanced tools
npm link
for TypeScript projects.
npm link
is good, but TypeScript projects require a build step (transpilation from *.ts
to
*.js
), otherwise your project will use stale *.js
files.
Running compile/watch in a separate terminal is an extra step, which may fail and again result in stale .js file being used. One terminal window with watcher needed for each linked project.
Sometimes you want to create a universal module, to be consumed by both Node and Browser.
You will have a hard choice to define a tsconfig compilation target.
For Node you want it high, e.g es2018
. You don't want to transpile down e.g async/await
, cause
it creates weird stacktraces, compared to native stacktraces with es2018
.
For Browser you want to be safe and transpile down to es2015
or even es5
(really?). This means,
e.g transpiling down async/await
and getting weird stacktraces in Node as a result.
Isn't it better if you can just publish source files (*.ts
in this case) and let the target
project decide how to transpile it?
You may have your dependencies in 2 modes:
npm link
)Projects are installed under /src/@linked
.
In linked mode - symlink is created from the source dir of your project (e.g ../../SomeProject
).
In unlinked mode - files are copied from node_modules/SomeProject
.
yarn linked
- enable linked mode
yarn unlinked
- disable linked mode
yarn linked postinstall
- needs to be called in your project's postinstall
AND after each
yarn upgrade
of linked project.
FAQs
> `npm link` for TypeScript projects.
We found that @naturalcycles/linked demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.