Skip to content

Commit

Permalink
Merge pull request #830 from Addepar/mixonic/drop-ember-before-2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Aug 10, 2020
2 parents 25c4e30 + 456c4c8 commit 6e4b2b2
Show file tree
Hide file tree
Showing 8 changed files with 2,919 additions and 2,416 deletions.
43 changes: 20 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ 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
- '10'
- "10"

dist: trusty
dist: xenial

addons:
chrome: stable

cache:
yarn: true
directories:
- node_modules

env:
global:
Expand All @@ -28,48 +26,47 @@ branches:
- /^v\d+\.\d+\.\d+/

jobs:
fail_fast: true
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

include:
# runs linting and tests with current locked deps

- stage: 'Tests'
name: 'Tests'
install:
- yarn install --non-interactive

# runs linting and tests with locked deps
- stage: "Tests"
name: "Tests"
script:
- yarn run lint
- yarn run test
- yarn lint
- yarn test:ember

- name: 'Floating dependencies'
- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- yarn install --no-lockfile --non-interactive
script:
- yarn test
- yarn test:ember

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: 'Additional Tests'
env: EMBER_TRY_SCENARIO=ember-1.12
- env: EMBER_TRY_SCENARIO=ember-1.13
- env: EMBER_TRY_SCENARIO=ember-lts-2.4
- env: EMBER_TRY_SCENARIO=ember-lts-2.8
- env: EMBER_TRY_SCENARIO=ember-lts-2.12
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary


before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --no-lockfile --non-interactive --ignore-engines
- yarn install --non-interactive

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
- yarn lint
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@

# Ember Table

An addon to support large data set and a number of features around table. `Ember Table` can
handle over 100,000 rows without any rendering or performance issue. This version of `Ember Table`
supports Ember 1.11 to latest version of Ember.
An addon to support large data set and a number of features around table. Ember Table can
handle over 100,000 rows without any rendering or performance issues.

Ember Table 3 supports:

* Ember 2.4 to latest version of Ember.

For legacy platforms, the final release of Ember Table 2 (2.2.3) supports:

* Ember 1.11-3.8+
* IE11+

## Install

Expand Down
91 changes: 8 additions & 83 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,6 @@ module.exports = function() {
return {
useYarn: true,
scenarios: [
{
name: 'ember-1.12',
bower: {
dependencies: {
ember: '~1.12.0',
'ember-cli-shims': 'ember-cli/ember-cli-shims#0.0.3',
'ember-data': '~1.13.0',
},
resolutions: {
ember: '~1.12.0',
'ember-cli-shims': '0.0.3',
'ember-data': '~1.13.0',
},
},
npm: {
devDependencies: {
'ember-cli-shims': null,
'ember-cli-fastboot': null,
'ember-data': '~1.13.0',
'ember-source': null,
'ember-cli-addon-docs': null,
'ember-angle-bracket-invocation-polyfill': null,
},
},
},
{
name: 'ember-1.13',
bower: {
dependencies: {
ember: '~1.13.0',
'ember-cli-shims': '0.0.6',
'ember-data': '~1.13.0',
},
resolutions: {
ember: '~1.13.0',
'ember-cli-shims': '0.0.6',
'ember-data': '~1.13.0',
},
},
npm: {
devDependencies: {
'ember-cli-shims': null,
'ember-cli-fastboot': null,
'ember-data': '~1.13.0',
'ember-source': null,
'ember-cli-addon-docs': null,
'ember-angle-bracket-invocation-polyfill': null,
},
},
},
{
name: 'ember-2.0',
bower: {
dependencies: {
ember: '~2.0',
'ember-cli-shims': '0.1.0',
'ember-data': '~2.1',
},
resolutions: {
ember: '~2.0',
'ember-cli-shims': '0.1.0',
'ember-data': '~2.1',
},
},
npm: {
devDependencies: {
'ember-cli-shims': null,
'ember-cli-fastboot': null,
'ember-data': '~2.0',
'ember-source': null,
'ember-cli-addon-docs': null,
'ember-angle-bracket-invocation-polyfill': null,
},
},
},
{
name: 'ember-lts-2.4',
bower: {
Expand Down Expand Up @@ -130,37 +55,37 @@ module.exports = function() {
},
},
{
name: 'ember-lts-2.16',
name: 'ember-lts-2.18',
npm: {
devDependencies: {
'ember-source': '~2.16.0',
'ember-source': '~2.18.0',
'ember-cli-addon-docs': null,
},
},
},
{
name: 'ember-lts-2.18',
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~2.18.0',
'ember-source': '~3.4.0',
'ember-cli-addon-docs': null,
},
},
},
{
name: 'ember-lts-3.4',
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.4.0',
'ember-source': '~3.8.0',
'ember-cli-addon-docs': null,
},
},
},
{
name: 'ember-lts-3.8',
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.8.0',
'ember-source': '~3.16.0',
'ember-cli-addon-docs': null,
},
},
Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
"repository": "https://github.com/Addepar/ember-table",
"scripts": {
"build": "ember build",
"docs:deploy": "ember deploy production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:files": "ember adde-lint --file-names",
"lint:js": "ember adde-lint --javascript",
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each",
"lint": "ember adde-lint",
"lint:sass": "ember adde-lint --sass",
"lint:files": "ember adde-lint --file-names",
"release": "release-it",
"docs:deploy": "ember deploy production"
"start": "ember serve",
"test": "npm-run-all lint:* test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"@html-next/vertical-collection": "^1.0.0-beta.14",
Expand All @@ -37,7 +38,6 @@
"ember-cli-sass": "^10.0.0",
"ember-cli-version-checker": "^3.0.1",
"ember-compatibility-helpers": "^1.2.0",
"ember-getowner-polyfill": "^2.2.0",
"ember-raf-scheduler": "^0.1.0",
"ember-test-selectors": "^2.1.0",
"ember-useragent": "^0.6.0",
Expand All @@ -54,7 +54,6 @@
"babel-eslint": "^10.0.1",
"broccoli-asset-rev": "^3.0.0",
"ember-a11y-testing": "^0.5.0",
"ember-ajax": "^4.0.2",
"ember-angle-bracket-invocation-polyfill": "^1.3.1",
"ember-cli": "~3.1.4",
"ember-cli-addon-docs": "0.6.13",
Expand All @@ -73,9 +72,8 @@
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-faker": "^1.5.0",
"ember-fetch": "^6.4.0",
"ember-load-initializers": "^2.0.0",
"ember-math-helpers": "^2.10.0",
"ember-math-helpers": "~2.11.3",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-native-dom-helpers": "0.6.2",
"ember-qunit": "^4.5.1",
Expand All @@ -90,7 +88,9 @@
"eslint-plugin-prettier": "2.6.0",
"husky": "^1.3.1",
"loader.js": "^4.2.3",
"release-it": "^12.3.4"
"npm-run-all": "^4.1.5",
"release-it": "^12.3.4",
"sass": "^1.26.10"
},
"engines": {
"node": ">= 10.*"
Expand All @@ -100,6 +100,7 @@
},
"homepage": "https://Addepar.github.io/ember-table",
"resolutions": {
"ember-cli-addon-docs/ember-fetch/whatwg-fetch": "3.3.1",
"ember-cli-page-object": "1.15.1",
"prettier": "1.18.2"
}
Expand Down
13 changes: 8 additions & 5 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
'use strict';

module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: ['Chrome'],
launch_in_dev: ['Chrome'],
browser_start_timeout: 120,
browser_args: {
Chrome: {
mode: 'ci',
args: [
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null,

'--disable-gpu',
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900',
].filter(Boolean),
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ $colors: (
);

@each $color-name, $color-value in $colors {
.bg-#{"" + $color-name} {
.bg-#{'' + $color-name} {
background-color: #{$color-value};
color: white;
}
.text-#{"" + $color-name} {
.text-#{'' + $color-name} {
color: #{$color-value};
}
}
Expand Down
19 changes: 4 additions & 15 deletions tests/integration/components/headers/ember-thead-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,25 +129,14 @@ async function testColumnAddition(assert, table) {
assert.equal(table.containerWidth, originalContainerWidth, 'table container width is unchanged');
}

// In Ember-1.12, the `this` context has a `context` property itself that is used to `get` or `set`.
// This function provides Ember-1.12 compatibility for `this.get`
function compatGet(context, propName) {
return context.get ? context.get(propName) : context.context.get(propName);
}

// This function provides Ember-1.12 compatibility for `this.set`
function compatSet(context, propName, value) {
return context.set ? context.set(propName, value) : context.context.set(propName, value);
}

moduleForComponent('ember-thead', '[Unit] ember-thead', { integration: true });

test('table resizes when columns are removed', async function(assert) {
let data = tableData();
this.set('rows', data.rows);
this.set('columns', data.columns);
this.on('removeColumn', function() {
compatSet(this, 'columns', compatGet(this, 'columns').slice(0, -1));
this.set('columns', this.get('columns').slice(0, -1));
});

await renderTable(this);
Expand All @@ -159,7 +148,7 @@ test('table resizes when columns are removed via mutation', async function(asser
this.set('rows', data.rows);
this.set('columns', A(data.columns));
this.on('removeColumn', function() {
compatGet(this, 'columns').popObject();
this.get('columns').popObject();
});

await renderTable(this);
Expand All @@ -171,7 +160,7 @@ test('table resizes when columns are added', async function(assert) {
this.set('rows', data.rows);
this.set('columns', data.columns);
this.on('addColumn', function() {
compatSet(this, 'columns', [...data.columns, data.newColumn]);
this.set('columns', [...data.columns, data.newColumn]);
});

await renderTable(this);
Expand All @@ -183,7 +172,7 @@ test('table resizes when columns are added via mutation', async function(assert)
this.set('rows', data.rows);
this.set('columns', A(data.columns));
this.on('addColumn', function() {
compatGet(this, 'columns').pushObject(data.newColumn);
this.get('columns').pushObject(data.newColumn);
});

await renderTable(this);
Expand Down
Loading

0 comments on commit 6e4b2b2

Please sign in to comment.