ember-container-query 1.1.8 → 2.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,70 @@
1
+ ## 2.0.0 (2022-04-09)
2
+
3
+ ### Breaking Change
4
+ * [#106](https://github.com/ijlee2/ember-container-query/pull/106) Dropped support for 3.20 LTS ([@ijlee2](https://github.com/ijlee2))
5
+ * [#94](https://github.com/ijlee2/ember-container-query/pull/94) Dropped support for Node 10 ([@ijlee2](https://github.com/ijlee2))
6
+ * [#93](https://github.com/ijlee2/ember-container-query/pull/93) Dropped support for 3.16 LTS ([@ijlee2](https://github.com/ijlee2))
7
+
8
+ ### Internal
9
+ * [#108](https://github.com/ijlee2/ember-container-query/pull/108) Updated dependencies to their latest version ([@ijlee2](https://github.com/ijlee2))
10
+ * [#74](https://github.com/ijlee2/ember-container-query/pull/74) Replaced ember-did-resize-modifier with ember-on-resize-modifier ([@st-h](https://github.com/st-h))
11
+ * [#100](https://github.com/ijlee2/ember-container-query/pull/100) Updated development dependencies to their latest version ([@ijlee2](https://github.com/ijlee2))
12
+ * [#97](https://github.com/ijlee2/ember-container-query/pull/97) Updated ember-source to v3.28.6 ([@ijlee2](https://github.com/ijlee2))
13
+ * [#96](https://github.com/ijlee2/ember-container-query/pull/96) Updated dependencies to their latest version ([@ijlee2](https://github.com/ijlee2))
14
+
15
+ ### Documentation
16
+ * [#109](https://github.com/ijlee2/ember-container-query/pull/109) Updated the demo app ([@ijlee2](https://github.com/ijlee2))
17
+ * [#104](https://github.com/ijlee2/ember-container-query/pull/104) Updated style and tests for demo app ([@ijlee2](https://github.com/ijlee2))
18
+ * [#102](https://github.com/ijlee2/ember-container-query/pull/102) Removed @percy/exec-action (deprecated) ([@ijlee2](https://github.com/ijlee2))
19
+ * [#103](https://github.com/ijlee2/ember-container-query/pull/103) Applied timeout to all rendering and application tests ([@ijlee2](https://github.com/ijlee2))
20
+ * [#101](https://github.com/ijlee2/ember-container-query/pull/101) Added a form example to the demo app ([@ijlee2](https://github.com/ijlee2))
21
+ * [#99](https://github.com/ijlee2/ember-container-query/pull/99) Replaced custom caching strategy with one built into @actions/setup-node ([@ijlee2](https://github.com/ijlee2))
22
+
23
+ ### Committers: 2
24
+ - Isaac Lee ([@ijlee2](https://github.com/ijlee2))
25
+ - Steve ([@st-h](https://github.com/st-h))
26
+
27
+
28
+ ## 2.0.0-alpha.0 (2021-12-12)
29
+
30
+ ### Breaking Change
31
+ * [#94](https://github.com/ijlee2/ember-container-query/pull/94) Dropped support for Node 10 ([@ijlee2](https://github.com/ijlee2))
32
+ * [#93](https://github.com/ijlee2/ember-container-query/pull/93) Dropped support for 3.16 LTS ([@ijlee2](https://github.com/ijlee2))
33
+
34
+ ### Internal
35
+ * [#74](https://github.com/ijlee2/ember-container-query/pull/74) Replaced ember-did-resize-modifier with ember-on-resize-modifier ([@st-h](https://github.com/st-h))
36
+ * [#100](https://github.com/ijlee2/ember-container-query/pull/100) Updated development dependencies to their latest version ([@ijlee2](https://github.com/ijlee2))
37
+ * [#97](https://github.com/ijlee2/ember-container-query/pull/97) Updated ember-source to v3.28.6 ([@ijlee2](https://github.com/ijlee2))
38
+ * [#96](https://github.com/ijlee2/ember-container-query/pull/96) Updated dependencies to their latest version ([@ijlee2](https://github.com/ijlee2))
39
+
40
+ ### Documentation
41
+ * [#104](https://github.com/ijlee2/ember-container-query/pull/104) Updated style and tests for demo app ([@ijlee2](https://github.com/ijlee2))
42
+ * [#102](https://github.com/ijlee2/ember-container-query/pull/102) Removed @percy/exec-action (deprecated) ([@ijlee2](https://github.com/ijlee2))
43
+ * [#103](https://github.com/ijlee2/ember-container-query/pull/103) Applied timeout to all rendering and application tests ([@ijlee2](https://github.com/ijlee2))
44
+ * [#101](https://github.com/ijlee2/ember-container-query/pull/101) Added a form example to the demo app ([@ijlee2](https://github.com/ijlee2))
45
+ * [#99](https://github.com/ijlee2/ember-container-query/pull/99) Replaced custom caching strategy with one built into @actions/setup-node ([@ijlee2](https://github.com/ijlee2))
46
+
47
+ ### Committers: 2
48
+ - Isaac Lee ([@ijlee2](https://github.com/ijlee2))
49
+ - Steve ([@st-h](https://github.com/st-h))
50
+
51
+
52
+ ## 1.1.9 (2021-08-25)
53
+
54
+ ### Bug Fix
55
+ * [#88](https://github.com/ijlee2/ember-container-query/pull/88) Temporarily skipped ember-beta and ember-canary ([@ijlee2](https://github.com/ijlee2))
56
+ * [#84](https://github.com/ijlee2/ember-container-query/pull/84) Fixed failing accessibility audits in Album page ([@ijlee2](https://github.com/ijlee2))
57
+
58
+ ### Internal
59
+ * [#92](https://github.com/ijlee2/ember-container-query/pull/92) Updated ember-source to v3.27.5 ([@ijlee2](https://github.com/ijlee2))
60
+ * [#91](https://github.com/ijlee2/ember-container-query/pull/91) Updated development dependencies to their latest version ([@ijlee2](https://github.com/ijlee2))
61
+ * [#89](https://github.com/ijlee2/ember-container-query/pull/89) Updated development dependencies ([@ijlee2](https://github.com/ijlee2))
62
+ * [#85](https://github.com/ijlee2/ember-container-query/pull/85) Updated development dependencies to their latest ([@ijlee2](https://github.com/ijlee2))
63
+
64
+ ### Committers: 1
65
+ - Isaac Lee ([@ijlee2](https://github.com/ijlee2))
66
+
67
+
1
68
  ## 1.1.8 (2021-04-22)
2
69
 
3
70
  ### Internal
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020
3
+ Copyright (c) 2022
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
package/README.md CHANGED
@@ -286,9 +286,9 @@ For more examples, I encourage you to check out the code for my demo app. It is
286
286
  Compatibility
287
287
  ------------------------------------------------------------------------------
288
288
 
289
- * Ember.js v3.16 or above<sup>1</sup> (3.12 - 3.15 may work but won't be supported)
290
- * Ember CLI v2.13 or above
291
- * Node.js v10 or above
289
+ * Ember.js v3.24 or above<sup>1</sup>
290
+ * Ember CLI v3.24 or above
291
+ * Node.js v12 or above
292
292
  * Modern browsers<sup>1</sup> (IE 11 won't be supported)
293
293
 
294
294
  <sup>1. Until you can adopt Ember Octane and drop support for IE 11, I recommend using [`ember-fill-up`](https://github.com/chadian/ember-fill-up) to do container queries. The APIs are similar so your migration should be smooth. Chad Carbert and I will ensure that the addons are maintained side-by-side for some time.</sup>
@@ -305,8 +305,6 @@ Credits
305
305
 
306
306
  Much thanks goes to [Chad Carbert (@chadian)](https://github.com/chadian), who introduced me to container queries at [EmberFest 2019](https://www.youtube.com/watch?v=RIdjk9_RSBY) and created [`ember-fill-up`](https://github.com/chadian/ember-fill-up) 🌟. I modeled the API for `ember-container-query` based on Chad's addon.
307
307
 
308
- Also to the Ember teams and [Garrett Murphey (@gmurphey)](https://github.com/gmurphey), without whom [`@ember/render-modifiers`](https://github.com/emberjs/ember-render-modifiers) and [`ember-did-resize-modifier`](https://github.com/gmurphey/ember-did-resize-modifier) wouldn't exist.
309
-
310
308
 
311
309
  License
312
310
  ------------------------------------------------------------------------------
@@ -3,7 +3,7 @@
3
3
  class="container-query"
4
4
  data-test-container-query
5
5
  {{did-insert this.queryContainer}}
6
- {{did-resize this.queryContainer debounce=this.debounce}}
6
+ {{on-resize this.onResize}}
7
7
  ...attributes
8
8
  >
9
9
  {{yield (hash
@@ -1,6 +1,7 @@
1
1
  import { action } from '@ember/object';
2
2
  import Component from '@glimmer/component';
3
3
  import { tracked } from '@glimmer/tracking';
4
+ import { debounce } from '@ember/runloop';
4
5
 
5
6
  export default class ContainerQueryComponent extends Component {
6
7
  @tracked queryResults = {};
@@ -23,6 +24,17 @@ export default class ContainerQueryComponent extends Component {
23
24
  // The dynamic tag is restricted to be immutable
24
25
  tagName = this.args.tagName ?? 'div';
25
26
 
27
+ @action onResize(resizeObserverEntry) {
28
+ const element = resizeObserverEntry.target;
29
+
30
+ if (this.debounce > 0) {
31
+ debounce(this, this.queryContainer, element, this.debounce);
32
+ return;
33
+ }
34
+
35
+ this.queryContainer(element);
36
+ }
37
+
26
38
  @action queryContainer(element) {
27
39
  this.measureDimensions(element);
28
40
  this.evaluateQueries();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-container-query",
3
- "version": "1.1.8",
3
+ "version": "2.0.0",
4
4
  "description": "Container queries using Ember modifiers",
5
5
  "keywords": [
6
6
  "container-queries",
@@ -26,7 +26,7 @@
26
26
  "build": "ember build --environment=production",
27
27
  "build:test": "ember build --environment=test",
28
28
  "changelog": "lerna-changelog",
29
- "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
29
+ "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
30
30
  "lint:dependency": "ember dependency-lint",
31
31
  "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
32
32
  "lint:hbs": "ember-template-lint .",
@@ -34,17 +34,9 @@
34
34
  "lint:js": "eslint . --cache",
35
35
  "lint:js:fix": "eslint . --fix",
36
36
  "start": "ember serve",
37
- "test": "npm-run-all --aggregate-output --continue-on-error --parallel test:ember:*",
38
- "test:ember:w1-h1": "DEVICE='w1-h1' percy exec -- ember test --test-port=7357",
39
- "test:ember:w2-h1": "DEVICE='w2-h1' percy exec -- ember test --test-port=7358",
40
- "test:ember:w3-h1": "DEVICE='w3-h1' percy exec -- ember test --test-port=7359",
41
- "test:ember:w1-h2": "DEVICE='w1-h2' percy exec -- ember test --test-port=7360",
42
- "test:ember:w2-h2": "DEVICE='w2-h2' percy exec -- ember test --test-port=7361",
43
- "test:ember:w3-h2": "DEVICE='w3-h2' percy exec -- ember test --test-port=7362",
44
- "test:ember:w1-h3": "DEVICE='w1-h3' percy exec -- ember test --test-port=7363",
45
- "test:ember:w2-h3": "DEVICE='w2-h3' percy exec -- ember test --test-port=7364",
46
- "test:ember:w3-h3": "DEVICE='w3-h3' percy exec -- ember test --test-port=7365",
47
- "test:ember-compatibility": "ember try:one"
37
+ "test": "DEVICE='w3-h3' ember test",
38
+ "test:ember": "ember test",
39
+ "test:ember-compatibility": "./node_modules/.bin/ember try:one"
48
40
  },
49
41
  "changelog": {
50
42
  "labels": {
@@ -57,65 +49,65 @@
57
49
  }
58
50
  },
59
51
  "dependencies": {
60
- "@ember/render-modifiers": "^1.0.2",
61
- "ember-cli-babel": "^7.26.3",
62
- "ember-cli-htmlbars": "^5.7.1",
63
- "ember-did-resize-modifier": "^1.0.0",
64
- "ember-element-helper": "^0.5.0"
52
+ "@ember/render-modifiers": "^2.0.4",
53
+ "ember-cli-babel": "^7.26.11",
54
+ "ember-cli-htmlbars": "^6.0.1",
55
+ "ember-element-helper": "^0.6.0",
56
+ "ember-on-resize-modifier": "^1.0.0"
65
57
  },
66
58
  "devDependencies": {
67
59
  "@ember/optional-features": "^2.0.0",
68
- "@ember/test-helpers": "^2.2.5",
69
- "@embroider/test-setup": "^0.39.1",
70
- "@glimmer/component": "^1.0.4",
71
- "@glimmer/tracking": "^1.0.4",
72
- "@percy/cli": "^1.0.0-beta.48",
60
+ "@ember/test-helpers": "^2.7.0",
61
+ "@embroider/test-setup": "^1.6.0",
62
+ "@glimmer/component": "^1.1.1",
63
+ "@glimmer/tracking": "^1.1.1",
64
+ "@percy/cli": "^1.0.5",
73
65
  "@percy/ember": "^3.0.0",
74
66
  "babel-eslint": "^10.1.0",
75
67
  "broccoli-asset-rev": "^3.0.0",
76
- "d3-array": "^2.12.1",
77
- "d3-axis": "^2.1.0",
78
- "d3-scale": "^3.3.0",
79
- "d3-selection": "^2.0.0",
80
- "d3-shape": "^2.1.0",
81
- "ember-a11y-testing": "^4.0.3",
82
- "ember-auto-import": "^1.11.2",
83
- "ember-cli": "~3.26.1",
84
- "ember-cli-dependency-checker": "^3.2.0",
85
- "ember-cli-dependency-lint": "^2.0.0",
86
- "ember-cli-inject-live-reload": "^2.0.2",
68
+ "d3-array": "^3.1.5",
69
+ "d3-axis": "^3.0.0",
70
+ "d3-scale": "^4.0.2",
71
+ "d3-selection": "^3.0.0",
72
+ "d3-shape": "^3.1.0",
73
+ "ember-a11y-testing": "^5.0.0",
74
+ "ember-auto-import": "^2.4.1",
75
+ "ember-cli": "~4.3.0",
76
+ "ember-cli-dependency-checker": "^3.3.0",
77
+ "ember-cli-dependency-lint": "^2.0.1",
78
+ "ember-cli-inject-live-reload": "^2.1.0",
87
79
  "ember-cli-netlify": "^0.4.1",
88
80
  "ember-cli-sri": "^2.1.1",
89
- "ember-cli-terser": "^4.0.1",
90
- "ember-css-modules": "^1.3.4",
81
+ "ember-cli-terser": "^4.0.2",
82
+ "ember-css-modules": "^2.0.1",
91
83
  "ember-disable-prototype-extensions": "^1.1.3",
92
84
  "ember-export-application-global": "^2.0.1",
93
85
  "ember-load-initializers": "^2.1.2",
94
- "ember-maybe-import-regenerator": "^0.1.6",
95
- "ember-page-title": "^6.2.1",
96
- "ember-qunit": "^5.1.4",
97
- "ember-resolver": "^8.0.2",
98
- "ember-source": "~3.26.1",
86
+ "ember-page-title": "^7.0.0",
87
+ "ember-qunit": "^5.1.5",
88
+ "ember-resolver": "^8.0.3",
89
+ "ember-source": "~4.3.0",
99
90
  "ember-source-channel-url": "^3.0.0",
100
- "ember-svg-jar": "^2.3.3",
101
- "ember-template-lint": "^3.2.0",
102
- "ember-test-selectors": "^5.0.0",
91
+ "ember-svg-jar": "^2.3.4",
92
+ "ember-template-lint": "^4.3.0",
93
+ "ember-test-selectors": "^6.0.0",
103
94
  "ember-truth-helpers": "^3.0.0",
104
- "ember-try": "^1.4.0",
105
- "eslint": "^7.24.0",
106
- "eslint-config-prettier": "^8.2.0",
107
- "eslint-plugin-ember": "^10.4.1",
95
+ "ember-try": "^2.0.0",
96
+ "eslint": "^7.32.0",
97
+ "eslint-config-prettier": "^8.5.0",
98
+ "eslint-plugin-ember": "^10.6.0",
108
99
  "eslint-plugin-node": "^11.1.0",
109
- "eslint-plugin-prettier": "^3.4.0",
110
- "lerna-changelog": "^1.0.1",
100
+ "eslint-plugin-prettier": "^4.0.0",
101
+ "lerna-changelog": "^2.2.0",
111
102
  "loader.js": "^4.7.0",
112
103
  "npm-run-all": "^4.1.5",
113
- "prettier": "^2.2.1",
114
- "qunit": "^2.15.0",
115
- "qunit-dom": "^1.6.0"
104
+ "prettier": "^2.6.2",
105
+ "qunit": "^2.18.1",
106
+ "qunit-dom": "^2.0.0",
107
+ "webpack": "^5.72.0"
116
108
  },
117
109
  "engines": {
118
- "node": "10.* || >= 12"
110
+ "node": "12.* || 14.* || >= 16"
119
111
  },
120
112
  "ember": {
121
113
  "edition": "octane"
@@ -1,27 +0,0 @@
1
- ---
2
- name: Ask for better documentation
3
- about: Ask for better documentation
4
- title: ''
5
- labels: 'enhance: documentation'
6
- assignees: ''
7
-
8
- ---
9
-
10
- Hello! Thanks for taking time to suggest how we can improve documentation.
11
-
12
- Here, documentation can mean a few different things, including README, code comments, and tests. Anything that will help everyone understand how to use `ember-container-query`!
13
-
14
-
15
- ## I would like to see... 🙋‍♀️🙋‍♂️
16
-
17
- A clear, concise description of what you want to happen.
18
-
19
-
20
- ## Why and how 💬
21
-
22
- A clear, concise description of why you want something to happen and how we might be able to solve the problem.
23
-
24
-
25
- ## Additional context ➕
26
-
27
- If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the request here.
@@ -1,27 +0,0 @@
1
- ---
2
- name: Ask for new feature or refactor
3
- about: Ask for new feature or refactor
4
- title: ''
5
- labels: 'enhance: code'
6
- assignees: ''
7
-
8
- ---
9
-
10
- Hello! Thanks for taking time to suggest how we can improve `ember-container-query`.
11
-
12
- Before you make a new issue, please search for similar issues. It's possible that someone has made a request aleady.
13
-
14
-
15
- ## I would like to see... 🙋‍♀️🙋‍♂️
16
-
17
- A clear, concise description of what you want to happen.
18
-
19
-
20
- ## Why and how 💬
21
-
22
- A clear, concise description of why you want something to happen and how we might be able to solve the problem.
23
-
24
-
25
- ## Additional context ➕
26
-
27
- If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the request here.
@@ -1,23 +0,0 @@
1
- ---
2
- name: Give feedback
3
- about: Give feedback
4
- title: ''
5
- labels: user feedback
6
- assignees: ''
7
-
8
- ---
9
-
10
- Hello! Thanks for taking time to give feedback.
11
-
12
- You can tell us:
13
-
14
- - How you used `ember-container-query`
15
- - What you liked about it
16
- - What you didn't like about it
17
-
18
- When sharing what you didn't like, please do give constructive feedback by suggesting a specific solution for how `ember-container-query` can be improved.
19
-
20
-
21
- ## Share your story 💞
22
-
23
- (My team and) I ...
@@ -1,53 +0,0 @@
1
- ---
2
- name: Report bug
3
- about: Report bug
4
- title: ''
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- Hello! Thanks for taking time to make a bug report.
11
-
12
- Before you make a new issue, please search for similar issues. It's possible that someone has reported this bug aleady.
13
-
14
-
15
- ## Describe the bug 🐞
16
-
17
- A clear and concise description of what the bug is.
18
-
19
-
20
- ## Expected behavior 🤔
21
-
22
- A clear and concise description of what you expected to happen.
23
-
24
-
25
- ## Minimal reproduction 🔬
26
-
27
- Describe steps to reproduce the behavior:
28
-
29
- 1. Go to '...'
30
- 2. Click on '...'
31
- 3. Scroll down to '...'
32
- 4. See error
33
-
34
- If possible, please, share a link with a minimal reproduction.
35
-
36
- <!--
37
- Create a minimal reproduction using one of the following:
38
- - Ember Twiddle: https://ember-twiddle.com/
39
- - Create a GitHub repository: https://guides.emberjs.com/release/getting-started/quick-start/
40
- -->
41
-
42
-
43
- ## Environment 🌍
44
-
45
- - Ember: -
46
- - Node.js/npm: -
47
- - OS: -
48
- - Browser: -
49
-
50
-
51
- ## Additional context ➕
52
-
53
- If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the problem here.
@@ -1,33 +0,0 @@
1
- ---
2
- name: Report outdated dependency
3
- about: Report outdated dependency
4
- title: ''
5
- labels: 'enhance: dependency'
6
- assignees: ''
7
-
8
- ---
9
-
10
- Hello! Thanks for taking time to make an outdated dependency report.
11
-
12
- Before you make a new issue, please search for similar issues. It's possible that someone has made a request for update aleady.
13
-
14
-
15
- ## List outdated dependencies 🔗
16
-
17
- When you ran `yarn outdated`, what did you see?
18
-
19
- | Package | Current version | Latest version |
20
- |---|---|---|
21
- | ember-cli-babel | 7.19.0 | 7.20.0 |
22
- | ember-source | 3.18.1 | 3.19.0 |
23
- | ember-template-lint | 2.7.0 | 2.8.0 |
24
-
25
-
26
- ## Risk analysis ⚠️
27
-
28
- Are there breaking changes that we should be aware of? Please add links to the `CHANGELOG`s, if they are available.
29
-
30
-
31
- ## Additional context ➕
32
-
33
- If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the problem here.
@@ -1,202 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- schedule:
9
- # Run the workflow every Monday at 6 am CET
10
- - cron: '0 4 * * MON'
11
-
12
- env:
13
- NODE_VERSION: 14
14
- PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
15
- PERCY_PARALLEL_TOTAL: 9
16
-
17
- jobs:
18
- build-app:
19
- name: Build app for testing
20
- runs-on: ubuntu-latest
21
- timeout-minutes: 5
22
- steps:
23
- - name: Check out a copy of the repo
24
- uses: actions/checkout@v2
25
-
26
- - name: Use Node.js ${{ env.NODE_VERSION }}
27
- uses: actions/setup-node@v2
28
- with:
29
- node-version: ${{ env.NODE_VERSION }}
30
-
31
- - name: Get Yarn cache path
32
- id: yarn-cache-dir-path
33
- run: echo "::set-output name=dir::$(yarn cache dir)"
34
-
35
- - name: Cache Yarn cache and node_modules
36
- id: cache-dependencies
37
- uses: actions/cache@v2
38
- with:
39
- path: |
40
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
41
- node_modules
42
- key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
43
- restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-
44
-
45
- - name: Install dependencies
46
- run: yarn install --frozen-lockfile
47
- if: steps.cache-dependencies.outputs.cache-hit != 'true'
48
-
49
- - name: Build app
50
- run: yarn build:test
51
-
52
- - name: Upload app
53
- uses: actions/upload-artifact@v2
54
- with:
55
- name: dist
56
- path: dist
57
-
58
-
59
- lint:
60
- name: Lint files and dependencies
61
- runs-on: ubuntu-latest
62
- timeout-minutes: 5
63
- steps:
64
- - name: Check out a copy of the repo
65
- uses: actions/checkout@v2
66
-
67
- - name: Use Node.js ${{ env.NODE_VERSION }}
68
- uses: actions/setup-node@v2
69
- with:
70
- node-version: ${{ env.NODE_VERSION }}
71
-
72
- - name: Get Yarn cache path
73
- id: yarn-cache-dir-path
74
- run: echo "::set-output name=dir::$(yarn cache dir)"
75
-
76
- - name: Cache Yarn cache and node_modules
77
- id: cache-dependencies
78
- uses: actions/cache@v2
79
- with:
80
- path: |
81
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
82
- node_modules
83
- key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
84
- restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-
85
-
86
- - name: Install dependencies
87
- run: yarn install --frozen-lockfile
88
- if: steps.cache-dependencies.outputs.cache-hit != 'true'
89
-
90
- - name: Lint
91
- run: yarn lint
92
-
93
-
94
- test-addon:
95
- name: Test addon
96
- needs: [build-app]
97
- runs-on: ubuntu-latest
98
- strategy:
99
- matrix:
100
- width:
101
- - 'w1'
102
- - 'w2'
103
- - 'w3'
104
- height:
105
- - 'h1'
106
- - 'h2'
107
- - 'h3'
108
- timeout-minutes: 5
109
- steps:
110
- - name: Check out a copy of the repo
111
- uses: actions/checkout@v2
112
-
113
- - name: Use Node.js ${{ env.NODE_VERSION }}
114
- uses: actions/setup-node@v2
115
- with:
116
- node-version: ${{ env.NODE_VERSION }}
117
-
118
- - name: Get Yarn cache path
119
- id: yarn-cache-dir-path
120
- run: echo "::set-output name=dir::$(yarn cache dir)"
121
-
122
- - name: Cache Yarn cache and node_modules
123
- id: cache-dependencies
124
- uses: actions/cache@v2
125
- with:
126
- path: |
127
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
128
- node_modules
129
- key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
130
- restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-
131
-
132
- - name: Install dependencies
133
- run: yarn install --frozen-lockfile
134
- if: steps.cache-dependencies.outputs.cache-hit != 'true'
135
-
136
- - name: Download app
137
- uses: actions/download-artifact@v2
138
- with:
139
- name: dist
140
- path: dist
141
-
142
- - name: Test
143
- uses: percy/exec-action@v0.3.1
144
- with:
145
- custom-command: yarn test:ember:${{ matrix.width }}-${{ matrix.height }} --path=dist
146
- env:
147
- PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
148
- PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
149
- PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
150
-
151
-
152
- test-compatibility:
153
- name: Test compatibility
154
- runs-on: ubuntu-latest
155
- strategy:
156
- matrix:
157
- scenario:
158
- - 'ember-lts-3.16'
159
- - 'ember-lts-3.20'
160
- - 'ember-lts-3.24'
161
- - 'ember-release'
162
- - 'ember-beta'
163
- - 'ember-canary'
164
- - 'embroider-safe'
165
- # - 'embroider-optimized'
166
- width:
167
- - 'w1'
168
- - 'w2'
169
- - 'w3'
170
- height:
171
- - 'h3'
172
- timeout-minutes: 5
173
- steps:
174
- - name: Check out a copy of the repo
175
- uses: actions/checkout@v2
176
-
177
- - name: Use Node.js ${{ env.NODE_VERSION }}
178
- uses: actions/setup-node@v2
179
- with:
180
- node-version: ${{ env.NODE_VERSION }}
181
-
182
- - name: Get Yarn cache path
183
- id: yarn-cache-dir-path
184
- run: echo "::set-output name=dir::$(yarn cache dir)"
185
-
186
- - name: Cache Yarn cache and node_modules
187
- id: cache-dependencies
188
- uses: actions/cache@v2
189
- with:
190
- path: |
191
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
192
- node_modules
193
- key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ matrix.scenario }}-${{ hashFiles('**/yarn.lock') }}
194
- restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ matrix.scenario }}-
195
-
196
- - name: Install dependencies
197
- run: yarn install --frozen-lockfile
198
- if: steps.cache-dependencies.outputs.cache-hit != 'true'
199
-
200
- # Test compatibility without Percy
201
- - name: Test
202
- run: yarn test:ember-compatibility ${{ matrix.scenario }} --- yarn test:ember:${{ matrix.width }}-${{ matrix.height }}