
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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.
The npm package @naturalcycles/linked receives a total of 0 weekly downloads. As such, @naturalcycles/linked popularity was classified as not popular.
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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.