Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@tsconfig/node12
Advanced tools
@tsconfig/node12 is a TypeScript configuration preset specifically tailored for Node.js version 12. It provides a set of default TypeScript compiler options that are optimized for developing Node.js applications using TypeScript.
TypeScript Configuration Preset
This feature allows you to extend the default TypeScript configuration for Node.js 12 by simply referencing the preset in your `tsconfig.json` file. This simplifies the setup process and ensures that your TypeScript configuration is optimized for Node.js 12.
{
"extends": "@tsconfig/node12/tsconfig.json"
}
Node.js 12 Compatibility
The configuration preset includes compiler options that are compatible with Node.js 12, such as targeting ES2019 and using the CommonJS module system. This ensures that your TypeScript code is transpiled in a way that is compatible with the features and capabilities of Node.js 12.
{
"compilerOptions": {
"lib": ["es2019"],
"module": "commonjs",
"target": "es2019"
}
}
@tsconfig/node14 is a TypeScript configuration preset for Node.js version 14. It provides a similar set of default TypeScript compiler options optimized for Node.js 14, including support for newer JavaScript features available in ES2020.
@tsconfig/node10 is a TypeScript configuration preset for Node.js version 10. It offers a set of default TypeScript compiler options tailored for Node.js 10, ensuring compatibility with the features and limitations of that version.
@tsconfig/recommended is a general-purpose TypeScript configuration preset that provides a set of recommended compiler options for most TypeScript projects. It is not specific to any Node.js version but offers a good starting point for TypeScript development.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/node12
yarn add --dev @tsconfig/node12
Add to your tsconfig.json
:
"extends": "@tsconfig/node12/tsconfig.json"
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 12",
"compilerOptions": {
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
"module": "commonjs",
"target": "es2019",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
You can find the code here.
FAQs
A base TSConfig for working with Node 12.
The npm package @tsconfig/node12 receives a total of 14,198,864 weekly downloads. As such, @tsconfig/node12 popularity was classified as popular.
We found that @tsconfig/node12 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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.