{"library":"karma-commonjs","type":"library","category":null,"description":"The `karma-commonjs` plugin facilitates the testing of JavaScript modules written in the CommonJS format within a Karma test runner environment. Rather than bundling, it applies a lightweight wrapper to individual modules, allowing them to interpret `require()` calls directly in the browser. The current stable version, 1.0.0, was last updated in 2016, making it effectively abandoned, especially given that its primary peer dependency, Karma, has also been officially deprecated since 2024. While `karma-commonjs` boasts potentially faster reloads for individual file changes and provides cleaner stack traces by avoiding full bundling, it requires developers to manually list all module files in the Karma configuration. This contrasts with more modern alternatives like `karma-browserify`, which leverage bundlers to automatically discover and include dependencies while also supporting the full Browserify API for transforms and Node.js shims.","language":"javascript","status":"abandoned","version":"1.0.0","tags":["javascript","karma-plugin","commonjs"],"last_verified":"Wed May 27","install":[{"cmd":"npm install karma-commonjs","imports":["// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['jasmine', 'commonjs'],\n    // ...\n  });\n};","// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    // ...\n    preprocessors: {\n      '**/*.js': ['commonjs']\n    }\n  });\n};","// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    // ...\n    commonjsPreprocessor: {\n      modulesRoot: 'src/modules'\n    }\n  });\n};"]},{"cmd":"yarn add karma-commonjs","imports":[]},{"cmd":"pnpm add karma-commonjs","imports":[]}],"homepage":null,"github":"https://github.com/karma-runner/karma-commonjs","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/karma-commonjs","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/karma-commonjs/compatibility"}}