{"id":19168,"library":"babel-plugin-streamline","title":"babel-plugin-streamline","description":"Babel plugin that enables compile-time transformation of Streamline.js async syntax (callback-, fiber-, and generator-based) within the Babel ecosystem. This package (version 2.0.26, last stable) allows you to combine Streamline's non-blocking control flow with Babel's transpilation pipeline. Key differentiators: integrates Streamline's _ (callback) / fiber / generator modes as Babel plugins, requires matching Babel major version, and is primarily for legacy projects using Streamline.js. Release cadence is low; mainly maintenance updates.","status":"maintenance","version":"2.0.26","language":"javascript","source_language":"en","source_url":"git://github.com/Sage/babel-plugin-streamline","tags":["javascript"],"install":[{"cmd":"npm install babel-plugin-streamline","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-streamline","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-streamline","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the runtime for Streamline.js callbacks/fibers/generators","package":"streamline-runtime","optional":true},{"reason":"Required peer dependency for Babel plugin interface; version must match Babel 5/6","package":"babel-core","optional":true}],"imports":[{"note":"Babel plugin name is 'streamline' not full package name","wrong":"{\n  plugins: [\"babel-plugin-streamline\"]\n}","symbol":"plugin","correct":"{\n  plugins: [\"streamline\"]\n}"},{"note":"Options are passed via extra.streamline, not plugin array args","wrong":"{\n  plugins: [[\"streamline\", { runtime: 'callbacks' }]]\n}","symbol":"options","correct":"{\n  extra: {\n    streamline: {\n      runtime: 'callbacks'\n    }\n  }\n}"},{"note":"Must blacklist regenerator plugin when using generators runtime","wrong":"{\n  extra: {\n    streamline: {\n      runtime: 'generators'\n    }\n  }\n}","symbol":"use with generators","correct":"{\n  extra: {\n    streamline: {\n      runtime: 'generators'\n    }\n  },\n  blacklist: ['regenerator']\n}"}],"quickstart":{"code":"// Install: npm install babel-plugin-streamline babel-core\n// .babelrc\n{\n  \"plugins\": [\"streamline\"],\n  \"extra\": {\n    \"streamline\": {\n      \"runtime\": \"callbacks\"\n    }\n  }\n}\n// Input file (app._js)\nfunction delay(ms, callback) {\n  setTimeout(callback, ms);\n}\nfunction test() {\n  console.log('before');\n  delay(1000, _);\n  console.log('after');\n}","lang":"javascript","description":"Configures Babel to transform Streamline.js callback-style async code using the callbacks runtime."},"warnings":[{"fix":"Do not use with Babel 7; consider switching to @babel/plugin or alternative async transform.","message":"babel-plugin-streamline only works with Babel 5.x and 6.x; not compatible with Babel 7+","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Set options via extra.streamline in Babel config.","message":"Options must be placed under babel's extra object, not as plugin arguments.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Add 'blacklist': ['regenerator'] to Babel config when runtime is not 'callbacks'.","message":"When using 'generators' or 'fibers' runtime, you must blacklist Babel's regenerator plugin to avoid conflicts.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Replace Streamline.js with async/await or other modern async patterns.","message":"Package is in maintenance mode; no active development; consider migrating away from Streamline.js.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add require('streamline').register() at entry point or use runtime option 'callbacks' which auto-includes helpers.","cause":"Missing or incorrect require of streamline runtime (e.g., require('streamline').register())","error":"ReferenceError: _ is not defined"},{"fix":"Downgrade to Babel 6 or use an alternative async transform (e.g., @babel/plugin-transform-runtime).","cause":"babel-plugin-streamline is not compatible with Babel 7; npm install may fail or resolve incorrectly.","error":"Babel 7: Cannot find module 'babel-plugin-streamline'"},{"fix":"Move options to extra.streamline in Babel config; do not pass options as second element in plugins array.","cause":"Using plugin array syntax with options instead of extra object.","error":"TypeError: Cannot read property 'transpile' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}