The `calculate-cache-key-for-tree` package is a low-level utility specifically designed for Ember-CLI's build pipeline to enhance performance and enable caching of intermediate build artifacts. Currently at stable version 2.0.0, its release cadence is typically infrequent, tied closely to major or minor releases of Ember-CLI itself, as it serves a foundational role within the build system. This utility is critical for addon developers who implement custom `treeFor` or `treeFor*` hooks, allowing them to provide a cache key that prevents redundant processing of unchanged addon trees by the Broccoli build system. It generates a unique identifier based on factors like the addon's name, its `package.json` contents, and the specific tree type being processed (e.g., `addon`, `vendor`, `templates`). Unlike general-purpose caching libraries, its key differentiator is its tightly integrated and specialized function within the Ember-CLI addon ecosystem, primarily utilized internally by `EmberAddon` instances rather than directly by most application developers.
npm install calculate-cache-key-for-treeVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to import and use `calculate-cache-key-for-tree` to generate a cache key for an Ember-CLI addon's build tree. It simulates the context of an addon's root directory and `package.json` to produce a deterministic key used for build caching.
Ensure your Node.js version is compatible with the `engines` field specified in the `package.json`. Use `nvm` or similar tools to manage Node.js versions effectively.
Application developers should rely on Ember-CLI's standard build and caching mechanisms. Only addon authors with advanced needs for optimizing `treeFor` methods should consider direct interaction with this package, following Ember.js RFCs and documentation.
If using ES Modules, ensure you're using a default import: `import calculateCacheKeyForTree from 'calculate-cache-key-for-tree';`. If using CommonJS, use `const calculateCacheKeyForTree = require('calculate-cache-key-for-tree');`. This package exports a default function.Ensure all required arguments, especially paths and object properties (like `package.json` contents), are valid strings or objects before passing them to the function. Double-check the source where these values are derived.
No dependency data recorded yet.