Skip to content

Commit

Permalink
2.0 Release: Bump all dependencies to latest, drop Node <=8 support (#…
Browse files Browse the repository at this point in the history
…177)

* major version bump, bump all dependencies, fix lint and tests, drop node <=8
* drop ember 2 support
  • Loading branch information
hagmandan authored Jun 13, 2020
1 parent 34ab345 commit 3306fb4
Show file tree
Hide file tree
Showing 13 changed files with 5,082 additions and 3,559 deletions.
8 changes: 2 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ module.exports = {
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:ember-suave/recommended'
'ember',
'ember-best-practices'
],
env: {
browser: true
Expand Down
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
- "10"

sudo: false
dist: trusty
Expand All @@ -21,9 +21,8 @@ env:
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-lts-3.0
- EMBER_TRY_SCENARIO=ember-lts-3.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 2.0.0

- Bump _all_ dependencies to latest
- Updated integration tests to async/await framework
- Drop support for Node <=8
- Add testing for ember early 3.*
- Update eslint things, add a few disables
- Add `await settled();` to 1 test to fix it
- Migrate `getWithDefault` in prep for ember 3.20
- Remove support for Ember <3.*

## 1.2.0

- Use the "app" argument if available
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![Code Climate](https://codeclimate.com/github/ahmadsoe/ember-highcharts/badges/gpa.svg)](https://codeclimate.com/github/ahmadsoe/ember-highcharts)
[![npm version](https://badge.fury.io/js/ember-highcharts.svg)](https://badge.fury.io/js/ember-highcharts)


# Ember-highcharts

A [Highcharts](http://www.highcharts.com/products/highcharts), [Highstock](http://www.highcharts.com/products/highstock),
Expand All @@ -13,7 +12,8 @@ and [Highmaps](http://www.highcharts.com/products/highmaps) component for [Ember
## Requirements

* Ember CLI
* Ember >= 2.12.0
* Ember >= 3
* If you need support for Ember < 3, use ember-highcharts < v1.2.0
* If you need support for Ember < 2.12.0, use ember-highcharts < v1.0.0
* If you need support for Ember < 1.13.0, use ember-highcharts v0.1.3

Expand Down
14 changes: 11 additions & 3 deletions addon/components/high-charts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assign } from '@ember/polyfills';
import Component from '@ember/component';
import { getOwner } from '@ember/application';
import { set, getProperties, get, computed, getWithDefault } from '@ember/object';
import { set, getProperties, get, computed } from '@ember/object';
import { run } from '@ember/runloop';
import { setDefaultHighChartOptions } from '../utils/option-loader';
import { getSeriesMap, getSeriesChanges } from '../utils/chart-data';
Expand All @@ -28,8 +28,15 @@ export default Component.extend({
callback: undefined,

buildOptions: computed('chartOptions', 'content.[]', function() {
let theme = getWithDefault(this, 'theme', {});
let passedChartOptions = getWithDefault(this, 'chartOptions', {});
let theme = get(this, 'theme');
if (theme === undefined) {
theme = {};
}

let passedChartOptions = get(this, 'chartOptions');
if (passedChartOptions === undefined) {
passedChartOptions = {};
}

let chartOptions = merge(theme, passedChartOptions);
let chartContent = get(this, 'content');
Expand Down Expand Up @@ -91,6 +98,7 @@ export default Component.extend({

// add new series
content.forEach((contentSeries) => {
// eslint-disable-next-line no-prototype-builtins
if (!chartSeriesMap.hasOwnProperty(contentSeries.name)) {
chart.addSeries(contentSeries, false);
}
Expand Down
64 changes: 4 additions & 60 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,18 @@ module.exports = function() {
useYarn: true,
scenarios: [
{
name: 'ember-1.13',
bower: {
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.4',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-4'
},
resolutions: {
'ember': 'lts-2-4'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-8'
},
resolutions: {
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.16',
name: 'ember-lts-3.0',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
'ember-source': '~3.0.0'
}
}
},
{
name: 'ember-lts-2.18',
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': '~2.18.0'
'ember-source': '~3.12.0'
}
}
},
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module.exports = {

treeForVendor(vendorTree) {
let trees = [];
// eslint-disable-next-line node/no-unpublished-require
let highchartsPath = path.dirname(require.resolve('highcharts'));

if (vendorTree) {
Expand Down
71 changes: 37 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-highcharts",
"version": "1.2.0",
"version": "2.0.0",
"description": "A Highcharts, HighStock and HighMaps component for ember cli",
"keywords": [
"ember-addon",
Expand All @@ -17,49 +17,52 @@
"repository": "https://github.com/ahmadsoe/ember-highcharts.git",
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"lint:js": "eslint ./*.js addon app config tests",
"start": "ember serve",
"test": "ember try:each"
"test": "ember test",
"test:all": "ember try:each"
},
"dependencies": {
"broccoli-funnel": "^2.0.1",
"broccoli-merge-trees": "^1.2.0",
"deepmerge": "2.1.1",
"ember-cli-babel": "^6.6.0",
"ember-cli-htmlbars": "^2.0.1",
"broccoli-funnel": "^3.0.3",
"broccoli-merge-trees": "^4.2.0",
"deepmerge": "^4.2.2",
"ember-cli-babel": "^7.20.5",
"ember-cli-htmlbars": "^5.1.2",
"ember-cli-node-assets": "^0.2.2",
"ember-copy": "^1.0.0"
},
"devDependencies": {
"bootstrap": "3.4.1",
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "~3.0.2",
"ember-cli-app-version": "^2.0.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.3.2",
"ember-cli-release": "^0.2.9",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"@babel/core": "^7.0.0",
"bootstrap": "^4.5.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "^3.18.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-uglify": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^4.0.0",
"ember-source": "~3.0.0",
"ember-source-channel-url": "^1.0.1",
"ember-try": "^0.2.23",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-ember-suave": "^1.0.0",
"eslint-plugin-node": "^5.2.1",
"highcharts": "^5.0.12",
"loader.js": "^4.2.3"
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source": "^3.19.0",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"eslint": "^7.2.0",
"eslint-plugin-ember": "^8.6.0",
"eslint-plugin-ember-best-practices": "^1.1.2",
"eslint-plugin-node": "^11.1.0",
"highcharts": "^8.1.1",
"loader.js": "^4.7.0"
},
"resolutions": {
"source-map-resolve": "^0.6.0",
"websocket-extensions": "^0.1.4"
},
"engines": {
"node": "6.* || >= 7.*"
"node": ">= 10.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
28 changes: 20 additions & 8 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/* eslint-env node */

'use strict';

module.exports = {
framework: 'qunit',
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
parallel: -1,
launch_in_ci: [
'Chrome'
],
Expand All @@ -9,16 +15,22 @@ module.exports = {
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
// --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null,

'--disable-gpu',
ci: [
process.env.TRAVIS ? '--no-sandbox' : null, // --no-sandbox is needed when running Chrome inside a container
'--headless',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900'
].filter(Boolean)
'--window-size=1440,900',
'--enable-logging',
'--v=1',
'--enable-crash-reporting',
'--crash-dumps-dir=build/outputs/chrome_crash_dumps',
// Chrome 66+ introduces a policy that requires user interaction before autoplay is allowed
// this flag disables that policy and allows autoplay regardless of user interaction
'--autoplay-policy=no-user-gesture-required',
].filter(Boolean),
}
}
};
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions tests/dummy/config/optional-features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jquery-integration": false
}
Loading

0 comments on commit 3306fb4

Please sign in to comment.