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.
@kaizen/package-bundler
Advanced tools
Bundle packages as CJS and ESM with TypeScript types.
ESM code is tree-shakeable.
pnpm add -D @kaizen/package-bundler
Depending on the compatibility you wish to provide for your consumer, you may need to define your package.json
differently.
Read more about the different types of package.json entrypoints here.
If your consumers are all using Node 12+ (including using TypeScript moduleResolution
node16
/nodenext
/bundler
), you should be able to use the exports
field if you have multiple entrypoints.
If your consumers may be using version 10 or lower (or are using TypeScript moduleResolution
classic
/node
/node10
), the exports
field will not be resolved. Your only option will be to utilise main
(resolves CJS), module
(resolves ESM), and types
(resolves TypeScript).
Should you want multiple entrypoints, you will need to create a directory relative from the root of the package and create a package.json
within that contains the extra resolutions.
Eg. If we want to create an entrypoint at @kaizen/package-bundler/future
:
Folder structure:
- future/
- package.json
- src/...
- package.json
Contents for future/package.json
(adjust your paths based on your defined dist structure).
{
"main": "../dist/cjs/future.cjs",
"module": "../dist/esm/future.mjs",
"types": "../dist/types/__future__/index.d.ts"
}
You will also need to ensure that this directory is included in your distributed package, so in the main package.json
, ensure the directory is included in files
.
"files": [
"dist",
"future"
]
FAQs
Bundles libraries
The npm package @kaizen/package-bundler receives a total of 12,670 weekly downloads. As such, @kaizen/package-bundler popularity was classified as popular.
We found that @kaizen/package-bundler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
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.