rollup-plugin-zephyr

raw JSON →
1.0.2 verified Mon Apr 27 auth: no javascript

Rollup plugin for Zephyr, a cloud deployment platform. Current stable version is 1.0.2 (released after v1.0.0 breaking changes). This plugin integrates Rollup builds with Zephyr's deployment pipeline, enabling automatic upload of build artifacts. It requires Rollup ^4.0.0 as a peer dependency. Key differentiators: built-in support for Zephyr's staged deployments, automatic version tracking, and integration with Zephyr's cloud infrastructure. Release cadence is irregular with patches for dependency updates and security fixes.

error TypeError: zephyr is not a function
cause Using default import incorrectly (e.g., named import '{ zephyr }' instead of default).
fix
Change to: import zephyr from 'rollup-plugin-zephyr'
error Error: Cannot find module 'rollup'
cause Missing peer dependency rollup ^4.0.0.
fix
Install rollup: npm install rollup@^4.0.0
error SyntaxError: Unexpected token 'export'
cause Using CommonJS require with named destructuring on a default export package.
fix
Use: const zephyr = require('rollup-plugin-zephyr')
breaking Version 1.0.0 introduced breaking changes. Check migration guide from v0.x.
fix Update plugin configuration to match v1 API. Review changelog at https://github.com/ZephyrCloudIO/zephyr-packages/releases/tag/v1.0.0
deprecated Plugin now requires Rollup ^4.0.0; older Rollup versions are not supported.
fix Upgrade Rollup to v4+: npm install rollup@^4.0.0
gotcha Named export 'zephyrPlugin' is available but default export is the plugin function. CommonJS require only gives default.
fix Use default import: import zephyr from 'rollup-plugin-zephyr' or require('rollup-plugin-zephyr') (no destructuring).
gotcha Plugin may require specific Node.js version or Zephyr agent. Check documentation for compatibility.
fix Ensure Node.js >=18 and zephyr-agent properly installed (if applicable).
deprecated Older versions (v0.1.x) may have security vulnerabilities; remediations in v1.0.1+ include pnpm advisory patches.
fix Upgrade to v1.0.2: npm install rollup-plugin-zephyr@latest
npm install rollup-plugin-zephyr
yarn add rollup-plugin-zephyr
pnpm add rollup-plugin-zephyr

Basic Rollup configuration using rollup-plugin-zephyr with environment variables for authentication and deployment settings.

import zephyr from 'rollup-plugin-zephyr';

export default {
  input: 'src/index.js',
  output: {
    dir: 'dist',
    format: 'esm',
  },
  plugins: [
    zephyr({
      // Zephyr deployment configuration
      url: process.env.ZEPHYR_URL ?? '',
      apiKey: process.env.ZEPHYR_API_KEY ?? '',
      // Optional: specify project
      project: 'my-app',
    }),
  ],
};