The examples/js directory will be removed with r148

The reality of it is that people treat and rely on addons as part of the versioned library.

just to add to what you said. three-stdlib is a real life example of what addons could become:

  "dependencies": {
    "@webgpu/glslang": "^0.0.15",
    "chevrotain": "^10.1.2",
    "draco3d": "^1.4.1",
    "fflate": "^0.6.9",
    "ktx-parse": "^0.4.5",
    "mmd-parser": "^1.0.4",
    "opentype.js": "^1.3.3",
    "potpack": "^1.0.1",
    "zstddec": "^0.0.2"
  },
  "peerDependencies": {
    "three": ">=0.122.0"
  }

by pinning dependencies to an exact version, or allow for patch updates and even minors it can progress on its own while clamping down version ranges for the things it bases on.

if you have mis-matching packages, say three 150 and addons targets 140.x, then running npm install will fail, the CLI will notify you about matching ranges. it’s rather hard to mess up in practice, and after all this is a well understood problem since practically every library on npm is in the same boat.

1 Like