Skip to content

Commit

Permalink
Kick off 2.0-beta (html-next#321)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Navasardyan <[email protected]>
Co-authored-by: Alex Navasardyan <[email protected]>
Co-authored-by: Robert Wagner <[email protected]>
  • Loading branch information
4 people authored and lan0 committed Mar 12, 2022
1 parent f1a6006 commit f513caf
Show file tree
Hide file tree
Showing 12 changed files with 2,661 additions and 1,887 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Vertical Collection CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
test:
name: Run Tests
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v2-beta
with:
node-version: 12.x

- name: Node Modules Cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ci-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint

- name: Run Tests
run: yarn test:ember
env:
CI: true

test-ember-try:
name: Run Tests
runs-on: ubuntu-18.04
strategy:
matrix:
ember-version:
[
ember-lts-2.8,
ember-lts-2.12,
ember-lts-2.18,
ember-lts-3.4,
ember-lts-3.8,
ember-lts-3.12,
ember-lts-3.16,
ember-lts-3.20,
ember-release,
ember-beta,
ember-canary,
]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v2-beta
with:
node-version: 12.x

- name: Node Modules Cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ci-yarn-${{ matrix.ember-version }}-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: yarn install --frozen-lockfile --ignore-engines

- name: Run Tests
run: node_modules/.bin/ember try:one ${{ matrix.ember-version }} --skip-cleanup
74 changes: 0 additions & 74 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ember install @html-next/vertical-collection
| `vertical-collection` version | Supported Ember versions |
| ----------------------------- | ------------------------ |
| `^v1.0.0` | `v1.12.0 - v3.8.0` |
| `^v2.0.0` | `v3.8.0+` |
| `^v2.0.0` | `v2.8.0+` |

## Support, Questions, Collaboration

Expand Down
11 changes: 9 additions & 2 deletions addon/-private/data-view/elements/occluded-content.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { set } from '@ember/object';
import { DEBUG } from '@glimmer/env';
import { IS_GLIMMER_2, gte as emberVersionGTE } from 'ember-compatibility-helpers';

import document from '../../utils/document-shim';

Expand All @@ -26,6 +27,12 @@ export default class OccludedContent {
this.isOccludedContent = true;
this.rendered = false;

if (!emberVersionGTE('3.0.0')) {
// In older versions of Ember, binding anything on an object in the template
// adds observers which creates __ember_meta__
this.__ember_meta__ = null; // eslint-disable-line camelcase
}

if (DEBUG) {
Object.preventExtensions(this);
}
Expand All @@ -50,11 +57,11 @@ export default class OccludedContent {
}

get realUpperBound() {
return this.upperBound;
return IS_GLIMMER_2 ? this.upperBound : this.upperBound.previousSibling;
}

get realLowerBound() {
return this.lowerBound;
return IS_GLIMMER_2 ? this.lowerBound : this.lowerBound.nextSibling;
}

get parentNode() {
Expand Down
11 changes: 9 additions & 2 deletions addon/-private/data-view/elements/virtual-component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { set } from '@ember/object';
import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { IS_GLIMMER_2, gte as emberVersionGTE } from 'ember-compatibility-helpers';

import document from '../../utils/document-shim';

Expand All @@ -21,17 +22,23 @@ export default class VirtualComponent {

this.rendered = false;

if (!emberVersionGTE('3.0.0')) {
// In older versions of Ember, binding anything on an object in the template
// adds observers which creates __ember_meta__
this.__ember_meta__ = null; // eslint-disable-line camelcase
}

if (DEBUG) {
Object.preventExtensions(this);
}
}

get realUpperBound() {
return this.upperBound;
return IS_GLIMMER_2 ? this.upperBound : this.upperBound.previousSibling;
}

get realLowerBound() {
return this.lowerBound;
return IS_GLIMMER_2 ? this.lowerBound : this.lowerBound.nextSibling;
}

getBoundingClientRect() {
Expand Down
16 changes: 0 additions & 16 deletions app/initializers/vertical-collection-legacy-compat.js

This file was deleted.

6 changes: 1 addition & 5 deletions config/ember-cli-toolbelts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{
"babel": {
"includePolyfill": true
}
}
{}
65 changes: 65 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@ module.exports = async function() {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
ember: 'components/ember#lts-2-8',
},
resolutions: {
ember: 'lts-2-8',
},
},
npm: {
devDependencies: {
'ember-source': null,
'ember-factory-for-polyfill': '1.3.1'
},
dependencies: {
'ember-compatibility-helpers': '1.2.1'
},
resolutions: {
'ember-compatibility-helpers': '1.2.1'
}
},
},
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'@ember/jquery': '^1.1.0',
'ember-source': '~2.12.0'
},
},
},
{
name: 'ember-lts-2.18',
npm: {
devDependencies: {
'@ember/jquery': '^1.1.0',
'ember-source': '~2.18.0'
},
},
},
{
name: 'ember-lts-3.4',
npm: {
Expand All @@ -22,6 +63,30 @@ module.exports = async function() {
}
}
},
{
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': '~3.12.0'
}
}
},
{
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.16.0'
}
}
},
{
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.20.0'
}
}
},
{
name: 'ember-release',
npm: {
Expand Down
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ module.exports = {
exclude.push('initializers/debug.js');
}

if (this.checker.forEmber().isAbove('1.13.0')) {
exclude.push('initializers/vertical-collection-legacy-compat.js');
}

return new Funnel(tree, { exclude });
}
};
Expand Down
Loading

0 comments on commit f513caf

Please sign in to comment.