@html-next/vertical-collection 2.0.0-0 → 3.0.0-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.
@@ -6,16 +6,17 @@ on:
6
6
  jobs:
7
7
  test:
8
8
  name: Run Tests
9
- runs-on: ubuntu-18.04
9
+ runs-on: ubuntu-latest
10
+ timeout-minutes: 12
10
11
 
11
12
  steps:
12
13
  - name: Checkout
13
14
  uses: actions/checkout@v2
14
15
 
15
- - name: Use Node 12
16
+ - name: Use Node 14
16
17
  uses: actions/setup-node@v2-beta
17
18
  with:
18
- node-version: 12.x
19
+ node-version: 14.x
19
20
 
20
21
  - name: Node Modules Cache
21
22
  uses: actions/cache@v2
@@ -30,25 +31,28 @@ jobs:
30
31
  run: yarn lint
31
32
 
32
33
  - name: Run Tests
33
- run: yarn test:ember
34
+ run: bin/run-tests-with-retry.sh
34
35
  env:
35
36
  CI: true
36
37
 
37
38
  test-ember-try:
38
39
  name: Run Tests
39
- runs-on: ubuntu-18.04
40
+ runs-on: ubuntu-latest
41
+ timeout-minutes: 14
42
+
40
43
  strategy:
44
+ fail-fast: false
41
45
  matrix:
42
46
  ember-version:
43
47
  [
44
- ember-lts-2.8,
45
- ember-lts-2.12,
46
48
  ember-lts-2.18,
47
49
  ember-lts-3.4,
48
50
  ember-lts-3.8,
49
51
  ember-lts-3.12,
50
52
  ember-lts-3.16,
51
53
  ember-lts-3.20,
54
+ ember-lts-3.24,
55
+ ember-lts-3.28,
52
56
  ember-release,
53
57
  ember-beta,
54
58
  ember-canary,
@@ -58,10 +62,10 @@ jobs:
58
62
  - name: Checkout
59
63
  uses: actions/checkout@v2
60
64
 
61
- - name: Use Node 12
65
+ - name: Use Node 14
62
66
  uses: actions/setup-node@v2-beta
63
67
  with:
64
- node-version: 12.x
68
+ node-version: 14.x
65
69
 
66
70
  - name: Node Modules Cache
67
71
  uses: actions/cache@v2
@@ -73,4 +77,4 @@ jobs:
73
77
  run: yarn install --frozen-lockfile --ignore-engines
74
78
 
75
79
  - name: Run Tests
76
- run: node_modules/.bin/ember try:one ${{ matrix.ember-version }} --skip-cleanup
80
+ run: node_modules/.bin/ember try:one ${{ matrix.ember-version }} --skip-cleanup --- bin/run-tests-with-retry.sh
package/CHANGELOG.md CHANGED
@@ -1,6 +1,41 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v3.0.0-0 (2021-12-09)
5
+
6
+ #### What's new
7
+
8
+ * Drop support for Ember < 2.18, add support for Ember 4.0+ (#343) (3343ecc)
9
+ * 4 retries on CI, 1s sleep (#352) (4a75d99)
10
+ * Extend timeout for base tests, tweak retry (#351) (8fff4c7)
11
+ * Remove implicit this in tests (#349) (5f58de6)
12
+
13
+
14
+ ## v2.1.0 (2021-12-09)
15
+
16
+ Changelog:
17
+
18
+ * Upgrade ember-cli and dev deps (#348) (e8924e9)
19
+ * Drop Ember global use in favor of native API (#347) (d101d8a)
20
+ * Proper runloop imports (#346) (a765241)
21
+ * Remove property fallback lookup (no implicit this) (#345) (506d798)
22
+ * Modernize `htmlSafe` module imports / More cleanup (#344) (32e9460)
23
+ * Update CI for vertical-collection v2 (#342) (5613faa)
24
+
25
+
26
+ ## v2.0.1 (2021-12-07)
27
+
28
+ #### :bug: Bug Fix
29
+ * [#322](https://github.com/html-next/vertical-collection/pull/322) Remove comma in selector list in css ([@CubeSquared](https://github.com/CubeSquared))
30
+
31
+ #### :house: Internal
32
+ * [#336](https://github.com/html-next/vertical-collection/pull/336) Add rwjblue release-it setup ([@rwwagner90](https://github.com/rwwagner90))
33
+
34
+ #### Committers: 2
35
+ - Matthew Jacobs ([@CubeSquared](https://github.com/CubeSquared))
36
+ - Robert Wagner ([@rwwagner90](https://github.com/rwwagner90))
37
+
38
+
4
39
  ## 0.5.5
5
40
 
6
41
  ### Pull Requests
package/README.md CHANGED
@@ -62,10 +62,11 @@ ember install @html-next/vertical-collection
62
62
 
63
63
  ## Support Matrix
64
64
 
65
- | `vertical-collection` version | Supported Ember versions |
66
- | ----------------------------- | ------------------------ |
67
- | `^v1.0.0` | `v1.12.0 - v3.8.0` |
68
- | `^v2.0.0` | `v2.8.0+` |
65
+ | `vertical-collection` version | Supported Ember versions | Supported Node versions |
66
+ | ----------------------------- | ------------------------ | ----------------------- |
67
+ | `^v1.x.x` | `v1.12.0 - v3.8.x` | `?` |
68
+ | `^v2.x.x` | `v2.8.0 - v3.26.x` | `v12 - ?` |
69
+ | `^v3.x.x` | `v2.18.0+` | `v14+` |
69
70
 
70
71
  ## Support, Questions, Collaboration
71
72
 
package/RELEASE.md ADDED
@@ -0,0 +1,60 @@
1
+ # Release Process
2
+
3
+ Releases are mostly automated using
4
+ [release-it](https://github.com/release-it/release-it/) and
5
+ [lerna-changelog](https://github.com/lerna/lerna-changelog/).
6
+
7
+ ## Preparation
8
+
9
+ Since the majority of the actual release process is automated, the primary
10
+ remaining task prior to releasing is confirming that all pull requests that
11
+ have been merged since the last release have been labeled with the appropriate
12
+ `lerna-changelog` labels and the titles have been updated to ensure they
13
+ represent something that would make sense to our users. Some great information
14
+ on why this is important can be found at
15
+ [keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
16
+ guiding principle here is that changelogs are for humans, not machines.
17
+
18
+ When reviewing merged PR's the labels to be used are:
19
+
20
+ * breaking - Used when the PR is considered a breaking change.
21
+ * enhancement - Used when the PR adds a new feature or enhancement.
22
+ * bug - Used when the PR fixes a bug included in a previous release.
23
+ * documentation - Used when the PR adds or updates documentation.
24
+ * internal - Used for internal changes that still require a mention in the
25
+ changelog/release notes.
26
+
27
+ ## Release
28
+
29
+ Once the prep work is completed, the actual release is straight forward:
30
+
31
+ * First, ensure that you have installed your projects dependencies:
32
+
33
+ ```sh
34
+ yarn install
35
+ ```
36
+
37
+ * Second, ensure that you have obtained a
38
+ [GitHub personal access token][generate-token] with the `repo` scope (no
39
+ other permissions are needed). Make sure the token is available as the
40
+ `GITHUB_AUTH` environment variable.
41
+
42
+ For instance:
43
+
44
+ ```bash
45
+ export GITHUB_AUTH=abc123def456
46
+ ```
47
+
48
+ [generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
49
+
50
+ * And last (but not least 😁) do your release.
51
+
52
+ ```sh
53
+ npx release-it
54
+ ```
55
+
56
+ [release-it](https://github.com/release-it/release-it/) manages the actual
57
+ release process. It will prompt you to to choose the version number after which
58
+ you will have the chance to hand tweak the changelog to be used (for the
59
+ `CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
60
+ pushing the tag and commits, etc.
@@ -1,4 +1,3 @@
1
- /* global document */
2
1
  import { ViewportContainer } from '../../-private';
3
2
 
4
3
  function applyVerticalStyles(element, geography) {
@@ -22,7 +22,7 @@ export function ViewportContainer() {
22
22
  || document.documentElement.scrollTop;
23
23
  },
24
24
  set(v) {
25
- return document.body.scrollTop = document.documentElement.scrollTop = v;
25
+ document.body.scrollTop = document.documentElement.scrollTop = v;
26
26
  }
27
27
  });
28
28
 
@@ -34,7 +34,7 @@ export function ViewportContainer() {
34
34
  || document.documentElement.scrollLeft;
35
35
  },
36
36
  set(v) {
37
- return window.scrollX
37
+ window.scrollX
38
38
  = window.pageXOffset
39
39
  = document.body.scrollLeft
40
40
  = document.documentElement.scrollLeft = v;
@@ -1,4 +1,4 @@
1
- import { run } from '@ember/runloop';
1
+ import { begin, end } from '@ember/runloop';
2
2
  import { scheduler } from 'ember-raf-scheduler';
3
3
  import SUPPORTS_PASSIVE from './supports-passive';
4
4
  const DEFAULT_ARRAY_SIZE = 10;
@@ -110,11 +110,11 @@ export class ScrollHandler {
110
110
 
111
111
  // TODO add explicit test
112
112
  if (topChanged || leftChanged) {
113
- run.begin();
113
+ begin();
114
114
  for (let j = 0; j < meta.handlers.length; j++) {
115
115
  meta.handlers[j](event);
116
116
  }
117
- run.end();
117
+ end();
118
118
  }
119
119
  }
120
120
 
@@ -22,7 +22,7 @@ export function ViewportContainer() {
22
22
  || document.documentElement.scrollTop;
23
23
  },
24
24
  set(v) {
25
- return document.body.scrollTop = document.documentElement.scrollTop = v;
25
+ document.body.scrollTop = document.documentElement.scrollTop = v;
26
26
  }
27
27
  });
28
28
 
@@ -34,7 +34,7 @@ export function ViewportContainer() {
34
34
  || document.documentElement.scrollLeft;
35
35
  },
36
36
  set(v) {
37
- return window.scrollX
37
+ window.scrollX
38
38
  = window.pageXOffset
39
39
  = document.body.scrollLeft
40
40
  = document.documentElement.scrollLeft = v;
@@ -1,4 +1,4 @@
1
- {{#each virtualComponents key="id" as |virtualComponent| ~}}
1
+ {{#each this.virtualComponents key="id" as |virtualComponent| ~}}
2
2
  {{~unbound virtualComponent.upperBound~}}
3
3
  {{~#if virtualComponent.isOccludedContent ~}}
4
4
  {{{unbound virtualComponent.element}}}
@@ -8,6 +8,6 @@
8
8
  {{~unbound virtualComponent.lowerBound~}}
9
9
  {{~/each}}
10
10
 
11
- {{#if shouldYieldToInverse}}
11
+ {{#if this.shouldYieldToInverse}}
12
12
  {{yield to="inverse"}}
13
13
  {{/if}}
@@ -13,7 +13,7 @@
13
13
  table .occluded-content,
14
14
  tbody .occluded-content,
15
15
  thead .occluded-content,
16
- tfoot .occluded-content, {
16
+ tfoot .occluded-content {
17
17
  display: table-row;
18
18
  position: relative;
19
19
  width: 100%;
@@ -0,0 +1,27 @@
1
+ #!/bin/bash
2
+
3
+ function retry {
4
+ command="$*"
5
+ retval=1
6
+ attempt=1
7
+ until [[ $retval -eq 0 ]] || [[ $attempt -gt 4 ]]; do
8
+ # Execute inside of a subshell in case parent
9
+ # script is running with "set -e"
10
+ (
11
+ set +e
12
+ $command
13
+ )
14
+ retval=$?
15
+ attempt=$(( $attempt + 1 ))
16
+ if [[ $retval -ne 0 ]]; then
17
+ # If there was an error wait 10 seconds
18
+ sleep 1
19
+ fi
20
+ done
21
+ if [[ $retval -ne 0 ]] && [[ $attempt -gt 4 ]]; then
22
+ # Something is fubar, go ahead and exit
23
+ exit $retval
24
+ fi
25
+ }
26
+
27
+ retry yarn test:ember
package/index.js CHANGED
@@ -32,6 +32,17 @@ module.exports = {
32
32
  return requiresModulesDir ? 'modules' : '';
33
33
  },
34
34
 
35
+ // Borrowed from ember-cli-babel
36
+ _emberVersionRequiresModulesAPIPolyfill() {
37
+ let checker = this.checker.for('ember-source', 'npm');
38
+
39
+ if (!checker.exists()) {
40
+ return true;
41
+ }
42
+
43
+ return checker.lt('3.27.0-alpha.1');
44
+ },
45
+
35
46
  treeForAddon(tree) {
36
47
  let babel = this.addons.find((addon) => addon.name === 'ember-cli-babel');
37
48
  let withPrivate = new Funnel(tree, { include: ['-private/**'] });
@@ -45,11 +56,39 @@ module.exports = {
45
56
  destDir: '@html-next/vertical-collection'
46
57
  });
47
58
 
59
+ // When compiling with `compileModules: false`, ember-cli-babel defaults to
60
+ // using the modules polyfill, since it assumes we are concatenating the
61
+ // output script using `app.import` without an AMD wrapper.
62
+ //
63
+ // This does not apply to us, since we are compiling the `-private` modules
64
+ // into a single AMD module (via rollup below), which can in fact have
65
+ // external dependencies.
66
+ //
67
+ // We can opt-out of this with `disableEmberModulesAPIPolyfill: true`. In
68
+ // Ember versions with "real modules", that is what we want in order to
69
+ // avoid the Ember global deprecation (or just completely not working in
70
+ // 4.0+).
71
+ //
72
+ // It seems like the intent may have been that we should be able to set
73
+ // this to `true` unconditionally, and `ember-cli-babel` will ignore this
74
+ // setting if the Ember verion requires the modules API polyfill. However,
75
+ // presumably due to a bug, ember-cli-babel actually checks for this value
76
+ // first and return out of the function early if its value is truthy. This
77
+ // means that if we set this to true unconditionally, then we would have
78
+ // disabled the modules polyfill for Ember versions that needs it, which
79
+ // would be incorrect. Therefore, we have to duplicate the detection logic
80
+ // here in order to set this value appropriately.
81
+ //
82
+ // Ideally, we should just stop trying to rollup the -private modules and
83
+ // let the modern build pipeline optimizes things for us, then none of this
84
+ // would have been necessary.
48
85
  let privateTree = babel.transpileTree(withPrivate, {
49
86
  babel: this.options.babel,
50
87
  'ember-cli-babel': {
51
- compileModules: false
52
- }
88
+ compileModules: false,
89
+ disableEmberModulesAPIPolyfill:
90
+ !this._emberVersionRequiresModulesAPIPolyfill(),
91
+ },
53
92
  });
54
93
 
55
94
  const templateTree = new Funnel(tree, {
@@ -72,8 +111,13 @@ module.exports = {
72
111
  }
73
112
  }
74
113
  ],
75
- external: ['ember', 'ember-raf-scheduler']
76
- }
114
+ external(id) {
115
+ return (
116
+ id.startsWith('@ember/') ||
117
+ ['ember', 'ember-raf-scheduler'].includes(id)
118
+ );
119
+ },
120
+ },
77
121
  });
78
122
 
79
123
  let destDir = this.getOutputDirForVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-next/vertical-collection",
3
- "version": "2.0.0-0",
3
+ "version": "3.0.0-0",
4
4
  "description": "infinite-scroll, done right. done.",
5
5
  "keywords": [
6
6
  "occlusion",
@@ -15,6 +15,9 @@
15
15
  "lists",
16
16
  "ember-addon"
17
17
  ],
18
+ "homepage": "https://github.com/html-next/vertical-collection",
19
+ "bugs": "https://github.com/html-next/vertical-collection/issues",
20
+ "repository": "https://github.com/html-next/vertical-collection.git",
18
21
  "license": "MIT",
19
22
  "author": {
20
23
  "name": "Chris Thoburn (@runspired)",
@@ -36,16 +39,14 @@
36
39
  "doc": "doc",
37
40
  "test": "tests"
38
41
  },
39
- "repository": "https://github.com/html-next/vertical-collection.git",
40
- "homepage": "https://github.com/html-next/vertical-collection",
41
- "bugs": "https://github.com/html-next/vertical-collection/issues",
42
42
  "scripts": {
43
- "build": "ember build",
44
- "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
45
- "lint:hbs": "ember-template-lint .",
46
- "lint:js": "eslint .",
43
+ "build": "ember build --environment=production",
44
+ "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
45
+ "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
46
+ "lint:js": "eslint . --cache",
47
+ "lint:js:fix": "eslint . --fix",
47
48
  "start": "ember serve",
48
- "test": "npm-run-all lint:* test:*",
49
+ "test": "npm-run-all lint test:*",
49
50
  "test:ember": "ember test",
50
51
  "test:ember-compatibility": "ember try:each"
51
52
  },
@@ -55,48 +56,74 @@
55
56
  "broccoli-merge-trees": "^3.0.1",
56
57
  "broccoli-rollup": "^4.1.1",
57
58
  "ember-cli-babel": "^7.12.0",
58
- "ember-cli-htmlbars": "^3.0.1",
59
+ "ember-cli-htmlbars": "^5.0.0",
59
60
  "ember-cli-version-checker": "^3.1.3",
60
61
  "ember-compatibility-helpers": "^1.2.1",
61
- "ember-raf-scheduler": "0.2.0"
62
+ "ember-raf-scheduler": "^0.3.0"
62
63
  },
63
64
  "devDependencies": {
64
- "@ember/optional-features": "^0.7.0",
65
+ "@ember/optional-features": "^2.0.0",
66
+ "@ember/test-helpers": "^2.4.0",
67
+ "babel-eslint": "^10.1.0",
65
68
  "bootstrap": "~3.3.5",
66
69
  "broccoli-asset-rev": "^3.0.0",
67
- "ember-cli": "~3.12.0",
68
- "ember-cli-app-version": "^3.2.0",
69
- "ember-cli-dependency-checker": "^3.1.0",
70
+ "ember-auto-import": "^2.0.0",
71
+ "ember-cli": "~3.28.0",
72
+ "ember-cli-dependency-checker": "^3.2.0",
70
73
  "ember-cli-eslint": "^5.1.0",
71
74
  "ember-cli-fastboot": "^2.1.3",
72
75
  "ember-cli-github-pages": "^0.2.2",
73
- "ember-cli-htmlbars-inline-precompile": "^2.1.0",
74
- "ember-cli-inject-live-reload": "^2.0.1",
76
+ "ember-cli-inject-live-reload": "^2.1.0",
75
77
  "ember-cli-sri": "^2.1.1",
76
- "ember-cli-template-lint": "^1.0.0-beta.1",
77
- "ember-cli-uglify": "^3.0.0",
78
+ "ember-cli-terser": "^4.0.2",
78
79
  "ember-code-snippet": "^2.4.1",
79
- "ember-data": "3.11.5",
80
+ "ember-data": "~3.12.0",
80
81
  "ember-disable-prototype-extensions": "^1.1.3",
81
- "ember-export-application-global": "^2.0.0",
82
- "ember-load-initializers": "^2.0.0",
83
- "ember-native-dom-helpers": "^0.7.0",
84
- "ember-perf-timeline": "^1.2.1",
85
- "ember-qunit": "^4.5.1",
86
- "ember-resolver": "^5.0.1",
82
+ "ember-export-application-global": "^2.0.1",
83
+ "ember-load-initializers": "^2.1.2",
84
+ "ember-perf-timeline": "^2.0.0",
85
+ "ember-qunit": "^5.0.0",
86
+ "ember-resolver": "^8.0.2",
87
87
  "ember-source": "~3.12.0",
88
- "ember-source-channel-url": "^2.0.1",
89
- "ember-try": "^1.2.1",
88
+ "ember-source-channel-url": "^3.0.0",
89
+ "ember-try": "^1.4.0",
90
+ "eslint": "^7.32.0",
90
91
  "eslint-plugin-ember": "^6.7.1",
91
92
  "eslint-plugin-node": "^9.1.0",
92
93
  "loader.js": "^4.7.0",
93
94
  "npm-run-all": "^4.1.5",
94
- "qunit-dom": "^0.9.0"
95
+ "qunit": "^2.0.0",
96
+ "qunit-dom": "^1.0.0",
97
+ "release-it": "^14.2.1",
98
+ "release-it-lerna-changelog": "^3.1.0",
99
+ "webpack": "^5.0.0"
95
100
  },
96
101
  "engines": {
97
- "node": ">= 10.*"
102
+ "node": ">= 14.*"
103
+ },
104
+ "publishConfig": {
105
+ "registry": "https://registry.npmjs.org"
98
106
  },
99
107
  "ember-addon": {
100
108
  "configPath": "tests/dummy/config"
109
+ },
110
+ "release-it": {
111
+ "plugins": {
112
+ "release-it-lerna-changelog": {
113
+ "infile": "CHANGELOG.md",
114
+ "launchEditor": true
115
+ }
116
+ },
117
+ "git": {
118
+ "tagName": "v${version}"
119
+ },
120
+ "github": {
121
+ "release": true,
122
+ "tokenRef": "GITHUB_AUTH"
123
+ }
124
+ },
125
+ "volta": {
126
+ "node": "14.18.2",
127
+ "yarn": "1.22.17"
101
128
  }
102
129
  }