Skip to content

release 3.1.0#492

Open
jankapunkt wants to merge 4 commits intomasterfrom
release-3.1.0
Open

release 3.1.0#492
jankapunkt wants to merge 4 commits intomasterfrom
release-3.1.0

Conversation

@jankapunkt
Copy link
Collaborator

@jankapunkt jankapunkt commented Mar 7, 2026

dupontbertrand and others added 4 commits March 7, 2026 13:02
* refactor: remove all lodash dependencies

- Remove lodash.has, lodash.isfunction, lodash.isempty, lodash.isobject
- Replace has() with Object.prototype.hasOwnProperty.call()
- Replace isEmpty() with Object.keys().length === 0
- Replace isObject() with typeof === 'object' && !== null
- Replace isFunction() with typeof === 'function'
- Remove Npm.depends block entirely
- No behavioral changes

* refactor(templating-runtime): remove lodash.has dependency

- Replace has() with Object.prototype.hasOwnProperty.call()
- Remove Npm.depends block
- No behavioral changes

* refactor(caching-html-compiler): remove lodash.isempty dependency

- Replace isEmpty() with Object.keys().length > 0
- Remove Npm.depends block
- No behavioral changes

* refactor(templating-tools): remove lodash.isempty dependency

- Replace isEmpty() with Object.keys().length > 0
- Remove Npm.depends block
- No behavioral changes

* chore: remove .npm/package directories for removed lodash deps

These directories were generated by Meteor for the lodash Npm.depends
that no longer exist. The spacebars-compiler .npm directory is kept
as it still depends on uglify-js.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(spacebars-compiler): remove uglify-js dependency

uglify-js was only used for pretty-printing compiled template code
(compress: false, mangle: false), not actual minification. The beautify
function now returns code as-is. Updated test expectations accordingly.

This removes the last external npm dependency from Blaze packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(blaze): extract hasOwn and isObject into utils.js module

Add shared utility helpers imported via ES modules instead of repeating
Object.prototype.hasOwnProperty.call inline across multiple files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(blaze): use isObject helper in template.js

Replace remaining inline typeof/null checks with the shared isObject
utility from utils.js.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: replace uglify-js with native syntax validation in spacebars-compiler

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…478)

* ♻️ (blaze/attrs): optimize attribute updates by caching last values to avoid
redundant DOM updates and ensure handlers are cleaned up properly

* ♻️ (blaze/attrs.js): add simple cache to getUrlProtocol for performance

* ✅ (benchmarks): add HTML benchmarks for ElementAttributesUpdater and getUrlProtocol

Add standalone HTML files to benchmark and compare performance of
ElementAttributesUpdater (_lastValues cache) and getUrlProtocol (with
and without protocol cache). These benchmarks help quantify the
performance impact of recent optimizations and provide reproducible
evidence for future improvements.

* Add detailed documentation to Blaze attribute handlers

Expanded and clarified documentation for all attribute handler classes in packages/blaze/attrs.js. Added JSDoc comments, usage examples, and security notes for each handler type, improving maintainability and developer understanding. No functional changes were made.

* fix: revert test-app to stable Meteor, address PR review feedback

- Revert test-app Meteor config to METEOR@3.0-rc.2 (master) to fix CI
  build failure caused by babel-compiler beta bug
- Fix LRU -> FIFO in cache eviction comments (matches actual behavior)
- Improve shouldUpdate logic to short-circuit on strict equality first
- Fix benchmark comparison to match actual attrs.js implementation
- Remove unnecessary comment in benchmark file

* fix: simplify shouldUpdate, fix BooleanHandler docs, add _clearProtocolCache

- Simplify shouldUpdate to strict equality + null check only, since
  materializer always normalizes values to string|null (drop String())
- Fix BooleanHandler docstring to accurately describe that handlers
  receive normalized text values, not raw booleans
- Add Blaze._clearProtocolCache() for testing and cache reset support
- Update benchmark to match simplified shouldUpdate logic

---------

Co-authored-by: Jan Küster <jkuester@uni-bremen.de>
* refactor(htmljs): convert ES5 syntax to ES2015+

- var → const/let
- Template literals for error messages and string interpolation
- Arrow functions (IDENTITY, isSVGElement, etc.)
- .startsWith() instead of .slice()/.substring() comparisons
- Spread syntax instead of .apply()
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(blaze-tools): convert ES5 syntax to ES2015+

- var → const/let
- Template literals for string building
- Arrow functions (hasToJS, unicodeClass, etc.)
- .includes() instead of .indexOf() !== -1
- String.padStart() instead of manual padding
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(html-tools): convert ES5 syntax to ES2015+

- var → const/let
- Arrow functions for callbacks and short functions
- Template literals for error messages
- .includes() instead of .indexOf() !== -1
- Spread syntax instead of .apply()
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(observe-sequence): convert ES5 syntax to ES2015+

- var → const/let (preserving intentional globals)
- Arrow functions for callbacks
- Template literals for warn messages
- Default parameters
- Spread syntax for console.warn arguments
- Fix for-loop scoping (let i declared before loop when used after)
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(spacebars-compiler): convert ES5 syntax to ES2015+

- var → const/let
- Arrow functions (makeObjectLiteral, constant, etc.)
- Template literals for code generation strings
- .includes() instead of .indexOf() !== -1
- self=this → arrow functions in codegen.js
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(templating-tools): convert ES5 syntax to ES2015+

- var → const/let
- Template literals for error messages
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(blaze): convert ES5 syntax to ES2015+

- var → const/let
- self=this → arrow functions (view.js, attrs.js, lookup.js, template.js)
- HelperMap constructor+prototype → ES6 class (internal only)
- TeardownCallback constructor+prototype → ES6 class (internal only)
- Arrow functions for short callbacks and IIFEs
- Template literals for error/warn messages
- .startsWith() instead of .substring() comparisons
- .includes() instead of .indexOf() !== -1
- Spread syntax instead of .apply()
- Preserves .extend() pattern for AttributeHandler and Visitor
- Preserves constructor functions with instanceof guards (View, Template, DOMRange)
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(spacebars): convert ES5 syntax to ES2015+

- var → const/let
- Spread syntax instead of .apply(null, args) (8 instances)
- Arrow functions (tripleEquals, etc.)
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(templating-runtime): convert ES5 syntax to ES2015+

- var → const/let
- Arrow functions for forEach callbacks
- Template literals for error messages
- .includes() instead of .indexOf() !== -1
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(spacebars-tests): convert ES5 syntax to ES2015+

- var → const/let (~1150 conversions)
- Fix duplicate declarations in same scope (let + reassignment)
- Fix const without initializer → let
- Fix for-loop scoping where var was used after loop body
- No behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve merge conflict regressions from release-3.1.0

- attrs.js: replace undefined `self` with `this` in UrlHandler (3 occurrences)
- templating.js: add missing semicolon on migrate reassignment
- dynamic.js: restore var→const conversion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: convert missed function expressions to arrow functions

Address review comments from jankapunkt on PR #488:
- tojs.js: IIFE and inner callback → arrow functions
- charref.js: getCodePoints and isLegalCodepoint → arrow functions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jan Küster <jkuester@uni-bremen.de>
* docs: prepare improvement of arch overview

* Initial plan

* docs: add comprehensive architecture overview with package roles and build/runtime stages

Co-authored-by: jankapunkt <1135285+jankapunkt@users.noreply.github.com>

* docs: add Key Terms section explaining Spacebars, Template, Template Instance, and View

Co-authored-by: jankapunkt <1135285+jankapunkt@users.noreply.github.com>

* docs: fix relationship diagram to accurately show Template Instance references View

Co-authored-by: jankapunkt <1135285+jankapunkt@users.noreply.github.com>

* docs: remove redundant info

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Nacho Codoñer <igcogi@gmail.com>
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.

3 participants