Skip to content

[2d] Delete legacy arfset.api.js and asm.js build targets (major version breaking change) #23

@kalwalt

Description

@kalwalt

Summary

Delete legacy js/arfset.api.js global-API file and drop asm.js build targets (major-version breaking change)

Environment

  • Product/Service: FeatureSET-Display — JavaScript API & build system
  • Files: js/arfset.api.js, js/jslibrary.js, tools/makem.js, example/example.html, build/arfset.min.js, build/arfset.debug.js

Problem Description

js/arfset.api.js is a legacy global-ARfset API tightly coupled to the asm.js outputs. It is injected via --pre-js into arfset.debug.js and arfset.min.js only (tools/makem.js:176). The wasm and ES6-wasm builds never include it. Modern browsers have full wasm support, making both the legacy API and the asm.js targets unnecessary. Only example/example.html currently consumes it; a working example_es6.html already exists as a drop-in replacement.

Expected Behavior

  • js/arfset.api.js is deleted.
  • js/jslibrary.js is deleted (once issue 1b removes writeFP/writeFS).
  • compile_combine and compile_combine_min jobs removed from tools/makem.js, along with PRE_FLAGS.
  • example/example.html migrated to the ES6 build (or replaced by example_es6.html).
  • build/arfset.min.js and build/arfset.debug.js deleted; no longer generated.
  • Legacy window.ARFset global still accessible via the existing webpack UMD bundle (dist/ARFset.js).
  • README documents the removal; version bumped to a new major version.

Actual Behavior

Legacy asm.js build targets and the arfset.api.js file are still generated and maintained, adding build complexity and a maintenance surface for outdated code.

Tasks

  • Delete js/arfset.api.js
  • Delete js/jslibrary.js once issue 1b lands (removes writeFP/writeFS; --js-library flag goes away)
  • Remove compile_combine and compile_combine_min jobs from tools/makem.js, plus the PRE_FLAGS block
  • Migrate example/example.html to the ES6 build (or replace with example_es6.html)
  • Delete build/arfset.min.js and build/arfset.debug.js; stop generating them
  • Verify window.ARFset global is still exposed via the webpack UMD bundle (dist/ARFset.js)
  • Note the removal in the README and bump to a new major version

Impact

High — Breaking change for anyone loading arfset.min.js or arfset.debug.js directly. Requires a major version bump. Simplifies the build significantly and removes dead code.

Additional Context

Dependencies: Issue 1b must land first to safely delete js/jslibrary.js. This issue can be split: delete arfset.api.js + drop asm.js targets first, then delete jslibrary.js in a follow-up after 1b.

The webpack UMD bundle (dist/ARFset.js) already exposes window.ARFset, so no separate legacy entry point is needed to maintain backward compatibility for UMD consumers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions