BDR (BunDleR) is a JavaScript/TypeScript bundler inspired by `bili` and `poi`, originally designed for bundling, transforming, and developing JavaScript projects. It aimed to provide a lightweight alternative for building modern applications, leveraging TypeScript. Originally released with features for source code transformation and development server capabilities, its latest version is 1.7.0, released in September 2019. The project is currently abandoned, with its GitHub repository archived, indicating no further development or maintenance. Users should be aware that it lacks support for newer JavaScript features, security updates, and compatibility with recent Node.js and TypeScript versions, making it unsuitable for new projects or active development.
npm install bdrVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically use BDR's `build` function to bundle a simple JavaScript file, including temporary file setup and cleanup for execution.
Migrate to an actively maintained and supported bundler such as Rollup, esbuild, Vite (which leverages Rollup/esbuild), or Webpack.
Projects requiring modern language features or recent runtime compatibility must use an alternative, maintained bundler to avoid parsing errors or unexpected behavior.
If 'bdr' must be used for legacy projects, ensure 'typescript@^3.1.3' is installed as a peer dependency. Consider migration as the long-term, recommended solution.
Thoroughly audit any existing project using 'bdr' for transitive vulnerabilities. The most effective mitigation is to migrate to a current bundler with active security maintenance.
Ensure you are using the correct ESM import: `import { build } from 'bdr'`. If using CommonJS, verify the module target in your `tsconfig.json` or try `const bdr = require('bdr'); bdr.build(...)` if it's a default export with properties.Install the specific TypeScript version required by 'bdr': `npm install typescript@^3.1.3` or `yarn add typescript@^3.1.3`.
Use `npx bdr` to execute the local installation of the CLI, or ensure 'bdr' is listed in your project's `package.json` scripts (e.g., `"build": "bdr build"`) and run via `npm run build`.
This issue is fundamental to 'bdr' being an abandoned project with an outdated parser. It cannot be fixed within 'bdr'. The only resolution is to migrate your project to a current bundler that supports these modern language features.