Skip to content

Commit 17ca730

Browse files
authored
Merge pull request #221 from elwayman02/master
Merge to get up to date
2 parents 21ffdbb + 9d769d3 commit 17ca730

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4941
-6148
lines changed

.ember-cli

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
"disableAnalytics": false
8+
"disableAnalytics": false,
9+
10+
/**
11+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13+
*/
14+
"isTypeScriptProject": false
915
}

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.*/
1617
.eslintcache
1718

1819
# ember-try
1920
/.node_modules.ember-try/
2021
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
2123
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.eslintrc.js

+14-15
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,15 @@ module.exports = {
2424
// node files
2525
{
2626
files: [
27-
'.eslintrc.js',
28-
'.prettierrc.js',
29-
'.template-lintrc.js',
30-
'ember-cli-build.js',
31-
'index.js',
32-
'testem.js',
33-
'blueprints/*/index.js',
34-
'config/**/*.js',
35-
'tests/dummy/config/**/*.js',
36-
],
37-
excludedFiles: [
38-
'addon/**',
39-
'addon-test-support/**',
40-
'app/**',
41-
'tests/dummy/app/**',
27+
'./.eslintrc.js',
28+
'./.prettierrc.js',
29+
'./.template-lintrc.js',
30+
'./ember-cli-build.js',
31+
'./index.js',
32+
'./testem.js',
33+
'./blueprints/*/index.js',
34+
'./config/**/*.js',
35+
'./tests/dummy/config/**/*.js',
4236
],
4337
parserOptions: {
4438
sourceType: 'script',
@@ -50,5 +44,10 @@ module.exports = {
5044
plugins: ['node'],
5145
extends: ['plugin:node/recommended'],
5246
},
47+
{
48+
// test files
49+
files: ['tests/**/*-test.{js,ts}'],
50+
extends: ['plugin:qunit/recommended'],
51+
},
5352
],
5453
};

.github/workflows/ci.yml

+45-38
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,79 @@ name: CI
33
on:
44
push:
55
branches:
6+
- main
67
- master
7-
- 'v*'
8-
pull_request:
9-
schedule:
10-
- cron: '0 3 * * *' # daily, at 3am
8+
pull_request: {}
9+
10+
concurrency:
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
1113

1214
jobs:
1315
test:
14-
name: Tests
16+
name: "Tests"
1517
runs-on: ubuntu-latest
1618

1719
steps:
1820
- uses: actions/checkout@v2
19-
- uses: volta-cli/action@v1
21+
- name: Install Node
22+
uses: actions/setup-node@v2
2023
with:
21-
node-version: 12.x
22-
yarn-version: 1.22.5
23-
24-
- run: yarn install --frozen-lockfile
25-
- run: yarn lint
26-
- run: yarn test:ember
24+
node-version: 14.x
25+
cache: yarn
26+
- name: Install Dependencies
27+
run: yarn install --frozen-lockfile
28+
- name: Lint
29+
run: yarn lint
30+
- name: Run Tests
31+
run: yarn test:ember
2732

28-
floating-dependencies:
29-
name: Floating Dependencies
33+
floating:
34+
name: "Floating Dependencies"
3035
runs-on: ubuntu-latest
3136

3237
steps:
3338
- uses: actions/checkout@v2
34-
- uses: volta-cli/action@v1
39+
- uses: actions/setup-node@v2
3540
with:
36-
node-version: 12.x
37-
yarn-version: 1.22.5
38-
39-
- run: yarn install --no-lockfile
40-
- run: yarn test:ember
41+
node-version: 14.x
42+
cache: yarn
43+
- name: Install Dependencies
44+
run: yarn install --no-lockfile
45+
- name: Run Tests
46+
run: yarn test:ember
4147

4248
try-scenarios:
43-
name: "ember-try: ${{ matrix.ember-try-scenario }}"
49+
name: ${{ matrix.try-scenario }}
4450
runs-on: ubuntu-latest
45-
needs: test
46-
continue-on-error: ${{ matrix.experimental }}
51+
needs: "test"
4752

4853
strategy:
49-
fail-fast: true
54+
fail-fast: false
5055
matrix:
51-
ember-try-scenario:
52-
- ember-lts-3.16
53-
- ember-lts-3.20
56+
try-scenario:
57+
- ember-lts-3.24
58+
- ember-lts-3.28
5459
- ember-release
55-
- ember-default-with-jquery
5660
- ember-classic
61+
- embroider-safe
5762
experimental: [false]
5863
include:
59-
- ember-try-scenario: ember-beta
64+
- try-scenario: ember-beta
6065
experimental: true
61-
- ember-try-scenario: ember-canary
66+
- try-scenario: ember-canary
67+
experimental: true
68+
- try-scenario: embroider-optimized
6269
experimental: true
6370

6471
steps:
6572
- uses: actions/checkout@v2
66-
- uses: volta-cli/action@v1
73+
- name: Install Node
74+
uses: actions/setup-node@v2
6775
with:
68-
node-version: 12.x
69-
yarn-version: 1.22.5
70-
71-
- run: yarn install --frozen-lockfile
72-
73-
- name: test
74-
run: yarn ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
76+
node-version: 14.x
77+
cache: yarn
78+
- name: Install Dependencies
79+
run: yarn install --frozen-lockfile
80+
- name: Run Tests
81+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@
2323
# ember-try
2424
/.node_modules.ember-try/
2525
/bower.json.ember-try
26+
/npm-shrinkwrap.json.ember-try
2627
/package.json.ember-try
28+
/package-lock.json.ember-try
29+
/yarn.lock.ember-try
30+
31+
# broccoli-debug
32+
/DEBUG/

.npmignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/.eslintignore
1515
/.eslintrc.js
1616
/.git/
17+
/.github/
1718
/.gitignore
1819
/.prettierignore
1920
/.prettierrc.js
@@ -26,11 +27,14 @@
2627
/ember-cli-build.js
2728
/testem.js
2829
/tests/
30+
/yarn-error.log
2931
/yarn.lock
3032
.gitkeep
3133

3234
# ember-try
3335
/.node_modules.ember-try/
3436
/bower.json.ember-try
37+
/npm-shrinkwrap.json.ember-try
3538
/package.json.ember-try
36-
/config/addon-docs.js
39+
/package-lock.json.ember-try
40+
/yarn.lock.ember-try

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
/coverage/
1515
!.*
1616
.eslintcache
17+
.lint-todo/
1718

1819
# ember-try
1920
/.node_modules.ember-try/
2021
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
2123
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.template-lintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
extends: 'octane',
4+
extends: 'recommended',
55
};

CHANGELOG.md

+69
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,75 @@ Version 9 of Highlight.js has reached EOL and is no longer supported.
22
Please upgrade or ask whatever dependency you are using to upgrade.
33
https://github.com/highlightjs/highlight.js/issues/2877
44

5+
6+
7+
8+
## v4.0.0 (2022-05-14)
9+
10+
#### :boom: Breaking Change
11+
* [#619](https://github.com/elwayman02/ember-scroll-modifiers/pull/619) Ember 4 Upgrade ([@elwayman02](https://github.com/elwayman02))
12+
13+
#### :memo: Documentation
14+
* [#612](https://github.com/elwayman02/ember-scroll-modifiers/pull/612) Field Guide migration ([@elwayman02](https://github.com/elwayman02))
15+
16+
#### :house: Internal
17+
* [#619](https://github.com/elwayman02/ember-scroll-modifiers/pull/619) Ember 4 Upgrade ([@elwayman02](https://github.com/elwayman02))
18+
19+
#### Committers: 1
20+
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
21+
22+
## v3.1.1 (2021-10-12)
23+
24+
#### :house: Internal
25+
* [#473](https://github.com/elwayman02/ember-scroll-modifiers/pull/473) Ember 3.28 Upgrade ([@elwayman02](https://github.com/elwayman02))
26+
27+
#### Committers: 1
28+
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
29+
30+
## v3.1.0 (2021-08-05)
31+
32+
#### :rocket: Enhancement
33+
* [#406](https://github.com/elwayman02/ember-scroll-modifiers/pull/406) creating test helper for scroll into view ([@abeadam](https://github.com/abeadam))
34+
35+
#### :memo: Documentation
36+
* [#421](https://github.com/elwayman02/ember-scroll-modifiers/pull/421) Change author url to https ([@elwayman02](https://github.com/elwayman02))
37+
38+
#### Committers: 2
39+
- Abe Adam ([@abeadam](https://github.com/abeadam))
40+
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
41+
42+
## v3.0.0 (2021-06-28)
43+
44+
#### :boom: Breaking Change
45+
* [#403](https://github.com/elwayman02/ember-scroll-modifiers/pull/403) Ember 3.27 Blueprint Updates (Drop Ember 3.16 Support) ([@elwayman02](https://github.com/elwayman02))
46+
47+
#### :rocket: Enhancement
48+
* [#397](https://github.com/elwayman02/ember-scroll-modifiers/pull/397) Allow programmatic control of observation ([@chriskrycho](https://github.com/chriskrycho))
49+
50+
#### :memo: Documentation
51+
* [#404](https://github.com/elwayman02/ember-scroll-modifiers/pull/404) Document the rest of the did-intersect API ([@chriskrycho](https://github.com/chriskrycho))
52+
53+
#### :house: Internal
54+
* [#403](https://github.com/elwayman02/ember-scroll-modifiers/pull/403) Ember 3.27 Blueprint Updates (Drop Ember 3.16 Support) ([@elwayman02](https://github.com/elwayman02))
55+
56+
#### Committers: 2
57+
- Chris Krycho ([@chriskrycho](https://github.com/chriskrycho))
58+
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
59+
60+
## v2.0.0 (2021-06-18)
61+
62+
#### :bug: Bug Fix
63+
* [#335](https://github.com/elwayman02/ember-scroll-modifiers/pull/335) Add ember-data to fix documentation site ([@elwayman02](https://github.com/elwayman02))
64+
65+
#### :memo: Documentation
66+
* [#335](https://github.com/elwayman02/ember-scroll-modifiers/pull/335) Add ember-data to fix documentation site ([@elwayman02](https://github.com/elwayman02))
67+
68+
#### Committers: 4
69+
- Abe Adam ([@abeadam](https://github.com/abeadam))
70+
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
71+
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
72+
- [@jdkahn](https://github.com/jdkahn)
73+
574
## v1.4.0 (2021-03-26)
675

776
## v1.3.0 (2021-01-25)

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
* `ember serve`
2323
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
2424

25-
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
25+
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ We adhere to the [Ember Community Guidelines](https://emberjs.com/guidelines/) f
1313
Compatibility
1414
------------------------------------------------------------------------------
1515

16-
* Ember.js v3.8 or above
17-
* Ember CLI v2.13 or above
18-
* Node.js v10 or above
19-
* [All N-1 Browsers except IE](https://caniuse.com/#feat=intersectionobserver)
16+
* Ember.js v3.24 or above
17+
* Ember CLI v3.24 or above
18+
* Node.js v14 or above
19+
* [All N-1 Browsers](https://caniuse.com/#feat=intersectionobserver)
2020

2121

2222
Installation
@@ -27,6 +27,12 @@ ember install ember-scroll-modifiers
2727
```
2828

2929

30+
Usage
31+
------------------------------------------------------------------------------
32+
33+
[Longer description of how to use the addon in apps.]
34+
35+
3036
Contributing
3137
------------------------------------------------------------------------------
3238

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { find } from '@ember/test-helpers';
2+
3+
export default function mockScrollIntoView() {
4+
let elementsInvokedOn = [];
5+
let mockScrollIntoViewFunction = function () {
6+
elementsInvokedOn.push(this);
7+
};
8+
// manually mocking native function
9+
let preExistingScrollFunction = window.Element.prototype.scrollIntoView;
10+
window.Element.prototype.scrollIntoView = mockScrollIntoViewFunction;
11+
// helper fuctions that will be returned
12+
let scrollIntoViewCalledWith = (selector) => {
13+
let element;
14+
// check if it's a string and get the object
15+
if (typeof selector === 'string') {
16+
element = find(selector);
17+
} else {
18+
// element was passed in
19+
element = selector;
20+
}
21+
return elementsInvokedOn.includes(element);
22+
};
23+
24+
let resetMock = () => {
25+
window.Element.prototype.scrollIntoView = preExistingScrollFunction;
26+
};
27+
28+
return {
29+
scrollIntoViewCalledWith,
30+
resetMock,
31+
};
32+
}

0 commit comments

Comments
 (0)