Skip to content

Commit

Permalink
Merge pull request #1088 from NullVoxPopuli/patch-4
Browse files Browse the repository at this point in the history
Support "cache" from @glimmer/tracking
  • Loading branch information
ef4 authored Jan 26, 2022
2 parents 4295893 + 1f52c80 commit eaec307
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/compat/src/compat-adapters/@glimmer/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ class RedirectToEmber extends Plugin {
outputFileSync(join(this.outputPath, 'index.js'), `export { tracked } from '@ember/-internals/metal';`);
outputFileSync(
join(this.outputPath, 'primitives', 'cache.js'),
`export { createCache, getValue, isConst } from "@ember/-internals/metal";`
// Prior to ember-source 4.1, cached didn't exist
// using this way of importing from metal, cached will be undefined if pre 4.1
`import * as metal from "@ember/-internals/metal";
const { cached, createCache, getValue, isConst } = metal;
export { cached, createCache, getValue, isConst };
`
);
this.didBuild = true;
}
Expand Down

0 comments on commit eaec307

Please sign in to comment.