Skip to content

feat!: sync with alloy v3.0.0#565

Open
janvennemann wants to merge 10 commits into
developfrom
chore/sync-alloy-v3
Open

feat!: sync with alloy v3.0.0#565
janvennemann wants to merge 10 commits into
developfrom
chore/sync-alloy-v3

Conversation

@janvennemann
Copy link
Copy Markdown
Contributor

Summary

Brings alloy-devkit from its 1.15.2 baseline (with partial cherry-picks) up to Alloy v3.0.0. Hand-ported across 7 waves, one commit per wave, tests pass at every wave.

Full design rationale in docs/superpowers/specs/2026-05-12-alloy-v3-sync-design.md and wave-by-wave plan in docs/superpowers/plans/2026-05-12-alloy-v3-sync.md. Each commit body cites the upstream SHAs it carries.

Breaking changes

  • Node.js minimum is now >=20.18.1 (was >=10.0.0).
  • Generated controller shape changed in production builds (retainLines: false, ES6 module trimming, collection-binding null-safety). Every downstream component's compiled output will differ.
  • Babel filename arg now passed during transform — downstream projects with a .babelrc or babel.config.js in scope will see those configs picked up where they previously were not.
  • Backbone default version bumped to 1.6.0 (constant only — Backbone itself is not vendored by devkit).
  • Moment updated to 2.30.x; lang catalog expanded to 137 files.
  • chmodr removed entirely.
  • jsonlint / xmldom legacy deps dropped from alloy-utils in favor of @prantlf/jsonlint and @xmldom/xmldom.
  • Versions: alloy-compiler and alloy-utils both bump from 0.2.71.0.0. alloy-compiler's dep on alloy-utils is now ^1.0.0.

Devkit-local deltas preserved

Documented in docs/DEVKIT_DELTAS.md. The notable one for reviewers: Alloy.Abstract.Option.js emits const declarations (stronger than upstream's var from ce5b4b13) to avoid implicit-global assignment under strict mode.

Out-of-scope upstream commits (intentional skips)

Documented in CHANGELOG and individual wave commits. Skipped: e45d9300, f5cbdd5e (runtime BaseController, ships with Titanium SDK not the compiler), 30d9f88c, 9f273a67, 36b2fc87 (Backbone/underscore vendored files — excluded by devkit's builtins-plugin.js), fb845f73, 29a8a54c (app templates not mirrored), 86791bc5 (upstream copyright churn on out-of-scope files).

Test plan

  • CI green on chore/sync-alloy-v3.
  • Manual smoke: clone a representative Alloy app, build against this branch's alloy-compiler linked locally, confirm the build succeeds and the app starts.
  • Diff generated output against current develop on the same app; only the documented breaking changes should appear.
  • Review snapshot diffs (none currently — existing fixtures don't exercise production-mode emit or collection-binding paths; consider adding a production-mode smoke test as follow-up).

Test counts

  • Pre-sync baseline: 656 passing / 22 failing / 678 total (the 22 failures are pre-existing @babel/generator whitespace drift in optimizer.spec.js and standalone.spec.js, unrelated to this PR).
  • This PR: 667 passing / 22 failing / 689 total (+11 new parser-registration and view-compile tests for Wave 1 ports).

Publish

Intentionally NOT part of this PR. Versions are committed; lerna publish is a separate post-merge step.

Known follow-ups

  • The 22 pre-existing test failures are not addressed by this PR (out of scope; whitespace-only diffs from babel-generator drift in static fixtures).
  • macOS case-insensitive filesystem: upstream moment lang file en-sg.js overwrote tracked en-SG.js in-place. Linux CI may surface a casing discrepancy worth investigating.
  • Consider adding a production-mode smoke test to lock in the new generated-code shape.

- Discard local export-function override in component.es6.js
- Annotate Alloy.Abstract.Option.js const patch as devkit delta
- Delete stray Ti.UI.OptionBar copy.js
- Delete Ti.UI.iPhone.NavigationGroup.js (removed upstream)
- Fix broken require('../../../*') imports in Ti.UI.OptionBar.js
- Add docs/DEVKIT_DELTAS.md
- Ignore .DS_Store and references/ directory
- Add end-to-end smoke snapshot test over test-app fixture

Establishes a clean baseline for the v3 sync. Existing test
baseline: alloy-compiler 655 passed / 22 failed / 677 total
(failures pre-existing on develop, unrelated to pre-flight);
alloy-utils has no test suite.
Adds 10 default-pass-through parsers that were missed in the
earlier partial sync (devkit 2580792). All 10 share one body:
a default pass-through via base+default parsers.

Upstream SHA: 31328743 (feat: add missing parser files)
- Alloy.Abstract._ItemContainer: restore isNodeForCurrentPlatform
  guard so platform-filtered children are skipped correctly.
- Ti.UI.OptionDialog (Alloy.Abstract.Option): no-op; devkit already
  emits `const` declarations which supersede upstream's `var` fix.
- Ti.UI.Android.CollapseToolbar / .ContentView: no-op; missing
  includes already present in devkit.
- Ti.UI.PickerColumn: no-op; `.rows` getter removal already applied.

Upstream SHAs:
- 4f86263c, 6d4b36a9, 850e8990, 7c038dfd (ItemContainer platform fix)
- ce5b4b13 (OptionDialog cancel — superseded by devkit delta)
- 819d1142 (missing includes — already applied)
- f9161306 (PickerColumn no-getter — already applied)
- ast/controller.js: production-mode retainLines=false toggle
- compilerUtils: pass isProduction to processController (optional
  chaining), models length null-safety in collection binding template
- component compiler: trim es6mods to reduce empty lines

BaseController error-reporting commits (e45d9300, f5cbdd5e) are
out-of-scope: alloy-devkit does not mirror the runtime BaseController
template (Alloy/lib/alloy/controllers/BaseController.js). That file
ships with Titanium SDK, not the compiler package.

No snapshot regressions: existing snapshot suites do not exercise
production-mode emit or collection-binding templates. Test counts
unchanged from baseline (656 passing, 22 pre-existing failures).

Upstream SHAs:
- d4444bc0, 8c7abb5e (controller.js: let GENCODE_OPTIONS, isProduction param)
- 02063e8b (Alloy.Abstract.Option.js: else-case var - devkit keeps const)
- ffdcd3b6, 8c7abb5e, a4591fef (compilerUtils: isProduction wiring)
- fe846c09, 296376cd, 795685c3, 5cf47147 (collection binding models length)
- 9ca4cd6e (es6mods .trim())
- e45d9300, f5cbdd5e (BaseController) - out-of-scope
BREAKING CHANGE: babel transform now receives a filename argument,
enabling .babelrc / babel.config.js discovery for downstream Alloy
projects. Projects that happen to have one in scope will see their
build behavior change.

- sourceMapper: use path.join instead of manual string concat
- Widget compiler: skip sourcemaps when disabled
- Widget compiler: generate sourcemaps for widget lib files
- Babel transform: pass filename to enable config discovery

Upstream SHAs:
- 537107de (sourceMapper path.join)
- b1259b1f (skip widget sourcemaps when disabled)
- ba8d4c22 (widget lib sourcemaps)
- ba0068ed (babel filename arg)
Backbone 1.6.0 support (compiler-side only; vendored Backbone
runtime files are not shipped from devkit), updated moment.js and
moment lang files to match upstream Alloy v3. Underscore vendor
bump and Alloy app defaults are out of mirrored scope (devkit
excludes underscore from builtins and does not ship app/widget
templates).

- Add '1.6.0' to SUPPORTED_BACKBONE_VERSIONS in alloy-utils
  constants so collection-binding events use the modern event set
  for projects on Backbone 1.6.0
- Update vendored moment.js to upstream version
- Update 30 existing moment lang files; add ar-ps and ku-kmr

Upstream SHAs:
- 30d9f88c, d91b4364, 9f273a67 (Backbone 1.6.0): vendored Backbone
  out of scope; constants update applied
- fb845f73, 694070b5 (default backbone version): config.json
  templates out of scope; constants + moment.js update applied
- 36b2fc87 (underscore 1.13.6): out of scope, devkit excludes
  underscore from builtins
- 98bb1c47 (lang files): applied
- 29a8a54c (Alloy defaults): out of scope, devkit does not ship
  app/widget templates
- 88db7d96 (jsonlint): no-op, devkit already on @prantlf/jsonlint
BREAKING CHANGE: engines.node bumped to >=20.18.1. chmodr
dependency removed from public API. alloy-compiler and
alloy-utils both jump to 1.0.0 to mark the v3 alignment.

- Remove chmodr dependency (upstream removed in 244a935e)
- Drop legacy jsonlint and xmldom deps from alloy-utils
  (source uses @prantlf/jsonlint and @xmldom/xmldom)
- engines.node >=20.18.1 in both packages and root
- Align @babel/* and other shared deps with upstream v3 ranges
- alloy-compiler 0.2.7 -> 1.0.0
- alloy-utils 0.2.7 -> 1.0.0
- alloy-compiler depends on alloy-utils ^1.0.0
- Final cleanup pass from upstream 052b80b8
  (formatCurrency, drop Ti.UI.Windows/MobileWeb namespaces)

Upstream SHAs:
- 244a935e (remove chmodr)
- ab6e6de5 (node version bump)
- 052b80b8 (cleanup)
Aligns devkit's own metadata with upstream Alloy's transition
from Appcelerator/Axway to TiDev, Inc. ownership.

- package.json author -> TiDev, Inc.
- LICENSE copyright holder -> TiDev, Inc.

README.md had no Appcelerator/Axway references to update.
repository.url left unchanged (devkit repo location unchanged).
Adds a smoke test that exercises all 10 newly-ported parsers
(Ti.UI.ActivityIndicator, Column, MaskedImage, Notification,
ProgressBar, RefreshControl, Row, SearchBar, Shortcut,
ShortcutItem) plus parser-registration assertions.

Adds wave1-parsers.xml fixture view used by the smoke compile.
- CHANGELOG.md: full v1.0.0 entry summarizing the alloy v3 sync
  (breaking changes, features, fixes, chores, out-of-scope SHAs).
- package.json (both packages): repository.url and homepage
  updated from appcelerator/alloy-devkit to tidev/alloy-devkit,
  matching the actual canonical repo location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant