Skip to content

v0.2.7

Choose a tag to compare

@addon-owner addon-owner released this 14 Aug 16:05
· 330 commits to main since this release

๐Ÿš€ adnbn v0.2.7 Hotfix

Compare: v0.2.6...v0.2.7


๐Ÿ› ๏ธ Hotfix Summary

A hotfix release focused on stability, correct behavior, and small configuration tweaks. Includes path field renames and changes in the icons section.


โœ… Fixes

  • ๐Ÿ“ฎ MessageManager: ensured the sendResponse fallback is called when no handler returns a result.
  • ๐Ÿ”„ useMessageHandler: stabilized subscription, proper unmount handling, and async support; eliminated redundant re-subscriptions.
  • ๐Ÿงช Tests: stabilized scenarios for useMessageHandler (lifecycle, StrictMode).
  • ๐Ÿงน Infrastructure: removed stray console.log/comments, aligned Jest patterns.

๐Ÿ—‚๏ธ Config Changes โ€” before vs after

1) Path renames (naming unification)

  • Before (v0.2.6):
    • inputDir, outputDir, sourceDir, appSourceDir
  • After (v0.2.7):
    • rootDir, outDir, srcDir, appSrcDir

2) Icons section: flattened and removed icon.name

  • Before (v0.2.6):
    export default {
      icon: {
        sourceDir: "icons",
        outputDir: "icons",
        name: "default",
      },
    };
  • After (v0.2.7):
    export default {
      iconSrcDir: "icons", // previously icon.sourceDir
      iconOutDir: "icons", // previously icon.outputDir
      icon: "default" // previously icon.name
    };

Reasons: remove nesting, unify directory names with the rest of the paths, and move icon naming/group handling into the pipeline.

3) ENV: expanded declaration form

  • Now env supports shortcuts:
    • string prefix: "PUBLIC_",
    • predicate function: (name) => boolean,
    • object: { filter?: string | fn, crypt?: boolean }.

4) New: artifactName

  • Build artifact name template with placeholders: [app]/[name], [mode], [browser], [mv].

๐Ÿ”’ Breaking Changes

  • Field renames:
    • inputDir โ†’ rootDir
    • outputDir โ†’ outDir
    • sourceDir โ†’ srcDir
    • appSourceDir โ†’ appSrcDir
  • Icons section flattened:
    • icon.sourceDir โ†’ iconSrcDir
    • icon.outputDir โ†’ iconOutDir
    • icon.name โ€” icon

๐Ÿ’ก Improvements

  • ๐Ÿ” ENV: value obfuscation utilities and concise filter forms.
  • ๐Ÿงพ artifactName: clear and customizable artifact names for CI and multi-target builds.

๐Ÿงช Tests & Tooling

  • โšก Switched to @swc/jest for faster test runs.
  • ๐Ÿงช Added/refined tests for dotenv filtering/obfuscation and the messaging hook.

๐Ÿงญ Migration Guide

  • Update path field names:
    • inputDir โ†’ rootDir
    • outputDir โ†’ outDir
    • sourceDir โ†’ srcDir
    • appSourceDir โ†’ appSrcDir
  • Move icon settings:
    • icon.sourceDir โ†’ iconSrcDir
    • icon.outputDir โ†’ iconOutDir
    • icon.name โ€” icon
  • Simplify ENV if desired:
    • env: "PUBLIC_" or a predicate function.
  • If needed, set artifactName, for example:
    • artifactName: "[name]-[browser]-[mv]".

๐Ÿ“Œ Minimal config: before โ†’ after

  • Before (v0.2.6):

    export default {
      inputDir: ".",
      outputDir: "dist",
      sourceDir: "src",
      appSourceDir: ".",
      icon: { sourceDir: "icons", outputDir: "icons", name: "default" },
      env: { filter: "PUBLIC_", crypt: false },
    };
  • After (v0.2.7):

    export default {
      rootDir: ".",
      outDir: "dist",
      srcDir: "src",
      appSrcDir: ".",
      iconSrcDir: "icons",
      iconOutDir: "icons",
      icon: "default",
      env: "PUBLIC_", // shortcut
      artifactName: "[name]-[browser]-[mv]",
    };