
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
@tsconfig/node16
Advanced tools
The @tsconfig/node16 npm package provides a set of TypeScript configuration presets specifically tailored for Node.js 16. This package helps developers to quickly set up a TypeScript project that is compatible with Node.js 16 features and runtime behavior, ensuring that TypeScript code is compiled with the appropriate settings for this version of Node.js.
Pre-configured TypeScript settings for Node.js 16
This feature allows developers to extend their TypeScript configuration with a preset that is optimized for Node.js 16. By doing so, it automatically configures TypeScript compiler options such as `module`, `target`, and others to values that are compatible with Node.js 16, simplifying project setup.
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
}
}
Similar to @tsconfig/node16, this package provides TypeScript configuration presets but for Node.js 14. It helps developers to set up TypeScript projects that are compatible with Node.js 14, ensuring the compiled code works as expected in that environment. The main difference is the target Node.js version, with each package catering to the specific features and runtime behavior of its respective Node.js version.
This package offers TypeScript configuration presets for Node.js 12. Like the other @tsconfig packages, it aims to simplify the TypeScript setup process for projects targeting Node.js 12. The difference lies in the Node.js version compatibility, with each package providing presets tailored to the nuances of the specified Node.js version.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/node16
yarn add --dev @tsconfig/node16
Add to your tsconfig.json
:
"extends": "@tsconfig/node16/tsconfig.json"
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"_version": "16.1.0",
"compilerOptions": {
"lib": ["es2021"],
"module": "node16",
"target": "es2021",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16"
}
}
You can find the code here.
FAQs
A base TSConfig for working with Node 16.
The npm package @tsconfig/node16 receives a total of 14,426,046 weekly downloads. As such, @tsconfig/node16 popularity was classified as popular.
We found that @tsconfig/node16 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.