Skip to content

Commit

Permalink
Merge pull request emberjs#5110 from rwjblue/add-cache-key-for-tree
Browse files Browse the repository at this point in the history
[BUGFIX beta] Implement `cacheKeyForTree` hook.
  • Loading branch information
rwjblue authored Aug 13, 2017
2 parents 171102c + 49a66fe commit 7d1b251
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
language: node_js
sudo: false
dist: trusty
node_js:
- "7"

cache:
yarn: true

before_install:
- "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add phantomjs-prebuilt
- phantomjs --version

install:
- yarn
- yarn install --no-lockfile --no-interactive
- ./node_modules/.bin/bower install

script:
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const merge = require('broccoli-merge-trees');
const semver = require('semver');
const version = require('./lib/version');
const BroccoliDebug = require('broccoli-debug');
const calculateCacheKeyForTree = require('calculate-cache-key-for-tree');

// allow toggling of heimdall instrumentation
let INSTRUMENT_HEIMDALL = false;
Expand Down Expand Up @@ -213,6 +214,9 @@ module.exports = {
production: app.bowerDirectory + '/ember-data/ember-data.prod.js'
});
}
},

cacheKeyForTree(treeType) {
return calculateCacheKeyForTree(treeType, this);
}
};

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"broccoli-funnel": "^1.2.0",
"broccoli-merge-trees": "^2.0.0",
"broccoli-rollup": "^1.2.0",
"calculate-cache-key-for-tree": "^1.1.0",
"chalk": "^1.1.1",
"ember-cli-babel": "^6.4.1",
"ember-cli-path-utils": "^1.0.0",
Expand Down
6 changes: 6 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,12 @@ calculate-cache-key-for-tree@^1.0.0:
dependencies:
json-stable-stringify "^1.0.1"

calculate-cache-key-for-tree@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/calculate-cache-key-for-tree/-/calculate-cache-key-for-tree-1.1.0.tgz#0c3e42c9c134f3c9de5358c0f16793627ea976d6"
dependencies:
json-stable-stringify "^1.0.1"

caller-path@^0.1.0:
version "0.1.0"
resolved "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
Expand Down

0 comments on commit 7d1b251

Please sign in to comment.