Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
extensionless
Advanced tools
Node.js loader for import specifiers as file paths without extensions or as directory paths
Node.js loader for import specifiers as file paths without extensions or as directory paths
Install:
npm i extensionless
Start node
with the following flag added:
--experimental-loader=extensionless
You can now use import specifiers as file paths without extensions or as directory paths:
import mod from './mod'
// imports from the first existing file in the candidates list as follows
// ['./mod.js', './mod.json', './mod/index.js', './mod/index.json']
If the specifier ends with a path separator, it only looks for index files in that directory:
import mod from '../mod/'
// imports from the first existing file in the candidates list as follows
// ['../mod/index.js', '../mod/index.json']
To configure this package, you can add the field extensionless
to package.json
:
"extensionless": {
"lookFor": ["mjs", "js", "json"]
}
Field | Default Value |
---|---|
lookFor | ["js", "json"] |
FAQs
Node.js loader for import specifiers as file paths without extensions or as directory paths
The npm package extensionless receives a total of 21,576 weekly downloads. As such, extensionless popularity was classified as popular.
We found that extensionless demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.