github spaansba/ForesightJS V3.0.0
🎉 V3.0.0 - Standalone Development Tools & Events System

latest releases: V3.3.2, V3.3.1, V3.3.0...
4 months ago

Overview

This major release focuses on package size reduction by separating development tools from the core package. The biggest change is the introduction of a standalone js.foresight-devtools package, which dramatically reduces the core package size while maintaining all existing functionality.

Version Minified Minified + gzipped Download Time Dependencies
2.2.0 77.6 kB 18.6 kB 372 ms 3
3.0.0 25 kB 7.7 kB 155 ms 2
Result -68% -58% -58% -1

Features

Standalone Development Tools Package

  • NEW: js.foresight-devtools is now a separate package
  • BREAKING: Debugger functionality removed from core js.foresight package
  • NEW: ForesightDebugger class for managing development tools
  • IMPROVED: Development tools are now optional and don't bloat production builds

Event System

  • NEW: Event system for monitoring ForesightJS operations
  • NEW: Events for element registration, callbacks, trajectory updates, and settings changes
  • NEW: Support for AbortController signals for easy event listener cleanup

Monorepo

  • NEW: Foresightjs is now a monorepo making it way easier for contributors to make PR's

Documentation

New Documentation Pages

Migration Guide

If you didnt use the debug functionality, nothing changes and you can safely update

  1. Update core package:

    pnpm add js.foresight@latest
  2. Install development tools separately (if needed):

    pnpm add -D js.foresight-devtools@latest
  3. Update initialization code:

    • Remove debug property from ForesightManager.initialize()
    • Add separate ForesightDebugger.initialize() call if using development tools
  4. Use the new ForesightDebugger

    // v2.x (OLD)
    import { ForesightManager } from "js.foresight"
    ForesightManager.initialize({
      debug: true, // This no longer works
    })
    
    // v3.0 (NEW)
    import { ForesightManager } from "js.foresight"
    import { ForesightDebugger } from "js.foresight-devtools"
    
    ForesightManager.initialize({
      // Core settings only
    })
    
    // Separate debugger initialization
    ForesightDebugger.initialize(ForesightManager.instance, {
      showDebugger: true,
      isControlPanelDefaultMinimized: false,
    })

Removed Properties

  • REMOVED: debug property from ForesightManagerSettings
  • REMOVED: All debugger-related properties from core manager
  • MOVED: Debug functionality to js.foresight-devtools package
  • REMOVED: unregisterOnCallback

Don't miss a new ForesightJS release

NewReleases is sending notifications on new releases.