From 0ecf1b4da801497fbe58b821a5b66e98d22345cb Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 14 Jun 2019 13:29:47 -0500 Subject: [PATCH 1/2] Deprecate locations/router-scroll for Embers own implementation --- addon/locations/router-scroll.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/addon/locations/router-scroll.js b/addon/locations/router-scroll.js index 44673051..560fdc8e 100644 --- a/addon/locations/router-scroll.js +++ b/addon/locations/router-scroll.js @@ -1,5 +1,6 @@ import HistoryLocation from '@ember/routing/history-location'; import { set, get } from '@ember/object'; +import { deprecate } from '@ember/application/deprecations'; const uuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { const r = Math.random() * 16 | 0; @@ -9,12 +10,30 @@ const uuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) = export default HistoryLocation.extend({ pushState(path) { + deprecate( + `If you are overriding ember-router-scroll's implementation of "pushState", then you can subclass and override a new location object from: import HistoryLocation from '@ember/routing/history-location';`, + false, + { + id: 'ember-router-scroll', + until: '2.0.0' + } + ); + const state = { path, uuid: uuid() }; get(this, 'history').pushState(state, null, path); set(this, '_previousURL', this.getURL()); }, replaceState(path) { + deprecate( + `If you are overriding ember-router-scroll's implementation of "replaceState", then you can subclass and override a new location object from: import HistoryLocation from '@ember/routing/history-location';`, + false, + { + id: 'ember-router-scroll', + until: '2.0.0' + } + ); + const state = { path, uuid: uuid() }; get(this, 'history').replaceState(state, null, path); set(this, '_previousURL', this.getURL()); From 2f53f089df2b86b5bfd693dcb8b74ef936a5a03b Mon Sep 17 00:00:00 2001 From: snewcomer Date: Sat, 15 Jun 2019 15:06:27 -0500 Subject: [PATCH 2/2] change to node 8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c8cec197..94540c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "6" + - "8" sudo: false dist: trusty