@html-next/vertical-collection 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,24 +7,24 @@ jobs:
7
7
  test:
8
8
  name: Run Tests
9
9
  runs-on: ubuntu-latest
10
- timeout-minutes: 12
10
+ timeout-minutes: 8
11
11
 
12
12
  steps:
13
13
  - name: Checkout
14
- uses: actions/checkout@v2
14
+ uses: actions/checkout@v3
15
15
 
16
- - name: Use Node 14
17
- uses: actions/setup-node@v2-beta
18
- with:
19
- node-version: 14.x
16
+ - name: Use Volta
17
+ uses: volta-cli/action@v1
20
18
 
21
19
  - name: Node Modules Cache
22
- uses: actions/cache@v2
20
+ id: cache-npm
21
+ uses: actions/cache@v3
23
22
  with:
24
23
  path: '**/node_modules'
25
- key: ci-yarn-${{ hashFiles('**/yarn.lock') }}
24
+ key: ci-yarn-${{ hashFiles('yarn.lock') }}
26
25
 
27
26
  - name: Install Dependencies
27
+ if: steps.cache-npm.outputs.cache-hit != 'true'
28
28
  run: yarn install --frozen-lockfile
29
29
 
30
30
  - name: Lint
@@ -38,7 +38,7 @@ jobs:
38
38
  test-ember-try:
39
39
  name: Run Tests
40
40
  runs-on: ubuntu-latest
41
- timeout-minutes: 14
41
+ timeout-minutes: 15
42
42
 
43
43
  strategy:
44
44
  fail-fast: false
@@ -53,6 +53,8 @@ jobs:
53
53
  ember-lts-3.20,
54
54
  ember-lts-3.24,
55
55
  ember-lts-3.28,
56
+ ember-lts-4.4,
57
+ ember-4.5,
56
58
  ember-release,
57
59
  ember-beta,
58
60
  ember-canary,
@@ -60,21 +62,34 @@ jobs:
60
62
 
61
63
  steps:
62
64
  - name: Checkout
63
- uses: actions/checkout@v2
65
+ uses: actions/checkout@v3
64
66
 
65
- - name: Use Node 14
66
- uses: actions/setup-node@v2-beta
67
- with:
68
- node-version: 14.x
67
+ - name: Use Volta
68
+ uses: volta-cli/action@v1
69
+
70
+ - name: Stash yarn.lock for cache key
71
+ run: cp yarn.lock __cache-key
69
72
 
70
73
  - name: Node Modules Cache
71
- uses: actions/cache@v2
74
+ id: cache-npm
75
+ uses: actions/cache@v3
72
76
  with:
73
- path: '**/node_modules'
74
- key: ci-yarn-${{ matrix.ember-version }}-${{ hashFiles('**/yarn.lock') }}
77
+ path: |
78
+ node_modules
79
+ package.json
80
+ yarn.lock
81
+ __env
82
+ key: ci-yarn-v3-${{ matrix.ember-version }}-${{ hashFiles('config/ember-try.js', '__cache-key') }}
83
+ restore-keys: |
84
+ ci-yarn-${{ hashFiles('yarn.lock') }}
85
+
86
+ - name: Install Dependencies
87
+ if: steps.cache-npm.outputs.cache-hit != 'true'
88
+ run: yarn install --frozen-lockfile
75
89
 
76
- - name: Install
77
- run: yarn install --frozen-lockfile --ignore-engines
90
+ - name: Ember-Try Setup
91
+ if: steps.cache-npm.outputs.cache-hit != 'true'
92
+ run: node_modules/.bin/ember try:one ${{ matrix.ember-version }} --skip-cleanup --- bin/stash-env.sh
78
93
 
79
94
  - name: Run Tests
80
- run: node_modules/.bin/ember try:one ${{ matrix.ember-version }} --skip-cleanup --- bin/run-tests-with-retry.sh
95
+ run: . bin/restore-env.sh && bin/run-tests-with-retry.sh
package/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+
5
+ ## v3.1.0 (2022-08-04)
6
+
7
+ #### :rocket: Enhancement
8
+ * [#380](https://github.com/html-next/vertical-collection/pull/380) fix: enable parallel builds ([@runspired](https://github.com/runspired))
9
+
10
+ #### :bug: Bug Fix
11
+ * [#380](https://github.com/html-next/vertical-collection/pull/380) fix: enable parallel builds ([@runspired](https://github.com/runspired))
12
+ * [#358](https://github.com/html-next/vertical-collection/pull/358) Delete virtual element ([@Atrue](https://github.com/Atrue))
13
+
14
+ #### Committers: 3
15
+ - Chris Thoburn ([@runspired](https://github.com/runspired))
16
+ - Matthew Beale ([@mixonic](https://github.com/mixonic))
17
+ - [@Atrue](https://github.com/Atrue)
18
+
4
19
  ## v3.0.0 (2022-05-03)
5
20
 
6
21
 
@@ -1,6 +1,7 @@
1
1
  import { A } from '@ember/array';
2
2
  import { set, get } from '@ember/object';
3
3
  import { assert } from '@ember/debug';
4
+ import { run } from '@ember/runloop';
4
5
  import { DEBUG } from '@glimmer/env';
5
6
 
6
7
  import { Token, scheduler } from 'ember-raf-scheduler';
@@ -530,11 +531,19 @@ export default class Radar {
530
531
  if (_componentPool.length > 0) {
531
532
  if (shouldRecycle === true) {
532
533
  // Grab the DOM of the remaining components and move it to temporary node disconnected from
533
- // the body. If we end up using these components again, we'll grab their DOM and put it back
534
- for (let i = 0; i < _componentPool.length; i++) {
534
+ // the body if the item can be reused later otherwise delete the component to avoid virtual re-rendering of the
535
+ // deleted item. If we end up using these components again, we'll grab their DOM and put it back
536
+ for (let i = _componentPool.length - 1; i >= 0; i--) {
535
537
  const component = _componentPool[i];
536
-
537
- insertRangeBefore(this._domPool, null, component.realUpperBound, component.realLowerBound);
538
+ const item = objectAt(items, component.index);
539
+ if (item) {
540
+ insertRangeBefore(this._domPool, null, component.realUpperBound, component.realLowerBound);
541
+ } else {
542
+ run(() => {
543
+ virtualComponents.removeObject(component);
544
+ });
545
+ _componentPool.splice(i, 1);
546
+ }
538
547
  }
539
548
  } else {
540
549
  virtualComponents.removeObjects(_componentPool);
@@ -0,0 +1 @@
1
+ export EMBER_OPTIONAL_FEATURES=$(cat __env)
@@ -24,4 +24,4 @@ function retry {
24
24
  fi
25
25
  }
26
26
 
27
- retry yarn test:ember
27
+ yarn run ember build && retry yarn run ember test --path=dist
@@ -0,0 +1 @@
1
+ printf '%s' "$EMBER_OPTIONAL_FEATURES" > __env
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const StripClassCallCheckPlugin = require('babel6-plugin-strip-class-callcheck');
3
+ const StripClassCallCheckPlugin = require.resolve('babel6-plugin-strip-class-callcheck');
4
4
  const Funnel = require('broccoli-funnel');
5
5
  const Rollup = require('broccoli-rollup');
6
6
  const merge = require('broccoli-merge-trees');
@@ -138,7 +138,7 @@ module.exports = {
138
138
  const opts = {
139
139
  loose: true,
140
140
  plugins,
141
- postTransformPlugins: [StripClassCallCheckPlugin]
141
+ postTransformPlugins: [[StripClassCallCheckPlugin, {}]]
142
142
  };
143
143
 
144
144
  return opts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-next/vertical-collection",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "infinite-scroll, done right. done.",
5
5
  "keywords": [
6
6
  "occlusion",