ember-style-modifier 0.6.0 → 0.7.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/.github/workflows/ci.yml +226 -0
- package/CHANGELOG.md +23 -0
- package/README.md +3 -3
- package/addon/modifiers/style.js +7 -7
- package/config/environment.js +2 -2
- package/index.js +1 -1
- package/package.json +38 -25
- package/renovate.json +6 -0
- package/.ember-cli.js +0 -9
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# This file was autogenerated by create-github-actions-setup-for-ember-addons.
|
|
2
|
+
#
|
|
3
|
+
# You can upgrade the GitHub Actions workflow to the latest blueprints used
|
|
4
|
+
# by Create GitHub Actions setup for Ember Addons by running it again:
|
|
5
|
+
#
|
|
6
|
+
# - `yarn create github-actions-setup-for-ember-addons` if using yarn and
|
|
7
|
+
# - `npm init github-actions-setup-for-ember-addons` if using NPM.
|
|
8
|
+
#
|
|
9
|
+
# See https://github.com/jelhan/create-github-actions-setup-for-ember-addon for
|
|
10
|
+
# details.
|
|
11
|
+
#
|
|
12
|
+
# The following lines contain the configuration used in the last run. Please do
|
|
13
|
+
# not change them. Doing so could break upgrade flow.
|
|
14
|
+
#
|
|
15
|
+
#$ browsers:
|
|
16
|
+
#$ - chrome
|
|
17
|
+
#$ emberTryScenarios:
|
|
18
|
+
#$ - scenario: ember-lts-3.24
|
|
19
|
+
#$ - scenario: ember-lts-3.28
|
|
20
|
+
#$ - scenario: ember-release
|
|
21
|
+
#$ - scenario: ember-beta
|
|
22
|
+
#$ - scenario: ember-canary
|
|
23
|
+
#$ - scenario: ember-default-with-jquery
|
|
24
|
+
#$ - scenario: ember-classic
|
|
25
|
+
#$ - scenario: no-deprecations
|
|
26
|
+
#$ - scenario: ember-release-no-deprecations
|
|
27
|
+
#$ - scenario: embroider-safe
|
|
28
|
+
#$ - scenario: embroider-optimized
|
|
29
|
+
#$ nodeVersion: 12.x
|
|
30
|
+
#$ packageManager: yarn
|
|
31
|
+
#
|
|
32
|
+
|
|
33
|
+
name: CI
|
|
34
|
+
|
|
35
|
+
on:
|
|
36
|
+
push:
|
|
37
|
+
branches:
|
|
38
|
+
- master
|
|
39
|
+
pull_request:
|
|
40
|
+
|
|
41
|
+
env:
|
|
42
|
+
NODE_VERSION: '12.x'
|
|
43
|
+
|
|
44
|
+
jobs:
|
|
45
|
+
lint:
|
|
46
|
+
name: Lint
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v2
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 1
|
|
52
|
+
|
|
53
|
+
- uses: actions/setup-node@v2-beta
|
|
54
|
+
with:
|
|
55
|
+
node-version: '${{ env.NODE_VERSION }}'
|
|
56
|
+
|
|
57
|
+
- name: Get package manager's global cache path
|
|
58
|
+
id: global-cache-dir-path
|
|
59
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
60
|
+
|
|
61
|
+
- name: Cache package manager's global cache and node_modules
|
|
62
|
+
id: cache-dependencies
|
|
63
|
+
uses: actions/cache@v2
|
|
64
|
+
with:
|
|
65
|
+
path: |
|
|
66
|
+
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
67
|
+
node_modules
|
|
68
|
+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
69
|
+
hashFiles('**/yarn.lock'
|
|
70
|
+
) }}
|
|
71
|
+
restore-keys: |
|
|
72
|
+
${{ runner.os }}-${{ matrix.node-version }}-
|
|
73
|
+
|
|
74
|
+
- name: Install Dependencies
|
|
75
|
+
run: yarn install --frozen-lockfile
|
|
76
|
+
if: |
|
|
77
|
+
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
78
|
+
|
|
79
|
+
- name: Lint
|
|
80
|
+
run: yarn lint
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
test:
|
|
84
|
+
name: Tests
|
|
85
|
+
runs-on: ${{ matrix.os }}
|
|
86
|
+
needs: lint
|
|
87
|
+
|
|
88
|
+
strategy:
|
|
89
|
+
matrix:
|
|
90
|
+
os: [ubuntu-latest]
|
|
91
|
+
browser: [chrome]
|
|
92
|
+
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v2
|
|
95
|
+
with:
|
|
96
|
+
fetch-depth: 1
|
|
97
|
+
|
|
98
|
+
- uses: actions/setup-node@v2-beta
|
|
99
|
+
with:
|
|
100
|
+
node-version: '${{ env.NODE_VERSION }}'
|
|
101
|
+
|
|
102
|
+
- name: Get package manager's global cache path
|
|
103
|
+
id: global-cache-dir-path
|
|
104
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
105
|
+
|
|
106
|
+
- name: Cache package manager's global cache and node_modules
|
|
107
|
+
id: cache-dependencies
|
|
108
|
+
uses: actions/cache@v2
|
|
109
|
+
with:
|
|
110
|
+
path: |
|
|
111
|
+
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
112
|
+
node_modules
|
|
113
|
+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
114
|
+
hashFiles('**/yarn.lock'
|
|
115
|
+
) }}
|
|
116
|
+
restore-keys: |
|
|
117
|
+
${{ runner.os }}-${{ matrix.node-version }}-
|
|
118
|
+
|
|
119
|
+
- name: Install Dependencies
|
|
120
|
+
run: yarn install --frozen-lockfile
|
|
121
|
+
if: |
|
|
122
|
+
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
123
|
+
|
|
124
|
+
- name: Test
|
|
125
|
+
run: yarn test:ember --launch ${{ matrix.browser }}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
floating-dependencies:
|
|
129
|
+
name: Floating Dependencies
|
|
130
|
+
runs-on: ${{ matrix.os }}
|
|
131
|
+
needs: lint
|
|
132
|
+
|
|
133
|
+
strategy:
|
|
134
|
+
matrix:
|
|
135
|
+
os: [ubuntu-latest]
|
|
136
|
+
browser: [chrome]
|
|
137
|
+
|
|
138
|
+
steps:
|
|
139
|
+
- uses: actions/checkout@v2
|
|
140
|
+
with:
|
|
141
|
+
fetch-depth: 1
|
|
142
|
+
|
|
143
|
+
- uses: actions/setup-node@v2-beta
|
|
144
|
+
with:
|
|
145
|
+
node-version: '${{ env.NODE_VERSION }}'
|
|
146
|
+
|
|
147
|
+
- name: Get package manager's global cache path
|
|
148
|
+
id: global-cache-dir-path
|
|
149
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
150
|
+
|
|
151
|
+
- name: Cache package manager's global cache and node_modules
|
|
152
|
+
id: cache-dependencies
|
|
153
|
+
uses: actions/cache@v2
|
|
154
|
+
with:
|
|
155
|
+
path: |
|
|
156
|
+
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
157
|
+
node_modules
|
|
158
|
+
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
|
|
159
|
+
restore-keys: |
|
|
160
|
+
${{ runner.os }}-${{ matrix.node-version }}-
|
|
161
|
+
|
|
162
|
+
- name: Install Dependencies
|
|
163
|
+
run: yarn install --no-lockfile --non-interactive
|
|
164
|
+
|
|
165
|
+
- name: Test
|
|
166
|
+
run: yarn test:ember --launch ${{ matrix.browser }}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
try-scenarios:
|
|
170
|
+
name: Tests - ${{ matrix.ember-try-scenario }}
|
|
171
|
+
runs-on: ubuntu-latest
|
|
172
|
+
continue-on-error: true
|
|
173
|
+
needs: test
|
|
174
|
+
|
|
175
|
+
strategy:
|
|
176
|
+
fail-fast: true
|
|
177
|
+
matrix:
|
|
178
|
+
ember-try-scenario: [
|
|
179
|
+
ember-lts-3.24,
|
|
180
|
+
ember-lts-3.28,
|
|
181
|
+
ember-release,
|
|
182
|
+
ember-beta,
|
|
183
|
+
ember-canary,
|
|
184
|
+
ember-default-with-jquery,
|
|
185
|
+
ember-classic,
|
|
186
|
+
no-deprecations,
|
|
187
|
+
ember-release-no-deprecations,
|
|
188
|
+
embroider-safe,
|
|
189
|
+
embroider-optimized
|
|
190
|
+
]
|
|
191
|
+
|
|
192
|
+
steps:
|
|
193
|
+
- uses: actions/checkout@v2
|
|
194
|
+
with:
|
|
195
|
+
fetch-depth: 1
|
|
196
|
+
|
|
197
|
+
- uses: actions/setup-node@v2-beta
|
|
198
|
+
with:
|
|
199
|
+
node-version: '${{ env.NODE_VERSION }}'
|
|
200
|
+
|
|
201
|
+
- name: Get package manager's global cache path
|
|
202
|
+
id: global-cache-dir-path
|
|
203
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
204
|
+
|
|
205
|
+
- name: Cache package manager's global cache and node_modules
|
|
206
|
+
id: cache-dependencies
|
|
207
|
+
uses: actions/cache@v2
|
|
208
|
+
with:
|
|
209
|
+
path: |
|
|
210
|
+
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
211
|
+
node_modules
|
|
212
|
+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
213
|
+
hashFiles('**/yarn.lock'
|
|
214
|
+
) }}
|
|
215
|
+
restore-keys: |
|
|
216
|
+
${{ runner.os }}-${{ matrix.node-version }}-
|
|
217
|
+
|
|
218
|
+
- name: Install Dependencies
|
|
219
|
+
run: yarn install --frozen-lockfile
|
|
220
|
+
if: |
|
|
221
|
+
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
222
|
+
|
|
223
|
+
- name: Test
|
|
224
|
+
env:
|
|
225
|
+
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
|
|
226
|
+
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
## v0.7.0 (2021-10-27)
|
|
3
|
+
|
|
4
|
+
#### :boom: Breaking Change
|
|
5
|
+
* [#71](https://github.com/jelhan/ember-style-modifier/pull/71) add Ember Auto Import v2 ([@jelhan](https://github.com/jelhan))
|
|
6
|
+
* [#60](https://github.com/jelhan/ember-style-modifier/pull/60) Update dependency ember-modifier to v3 ([@renovate[bot]](https://github.com/apps/renovate))
|
|
7
|
+
* [#67](https://github.com/jelhan/ember-style-modifier/pull/67) drop support for Ember < 3.24 ([@jelhan](https://github.com/jelhan))
|
|
8
|
+
* [#57](https://github.com/jelhan/ember-style-modifier/pull/57) drop support for Ember 3.4 ([@jelhan](https://github.com/jelhan))
|
|
9
|
+
* [#58](https://github.com/jelhan/ember-style-modifier/pull/58) drop support for node 10 ([@jelhan](https://github.com/jelhan))
|
|
10
|
+
|
|
11
|
+
#### :house: Internal
|
|
12
|
+
* [#72](https://github.com/jelhan/ember-style-modifier/pull/72) fix CSP for Embroider builds ([@jelhan](https://github.com/jelhan))
|
|
13
|
+
* [#68](https://github.com/jelhan/ember-style-modifier/pull/68) upgrade addon blueprints to Ember CLI 3.28 ([@jelhan](https://github.com/jelhan))
|
|
14
|
+
* [#51](https://github.com/jelhan/ember-style-modifier/pull/51) Create ember-try scenarios for `no-deprecations` ([@mansona](https://github.com/mansona))
|
|
15
|
+
* [#39](https://github.com/jelhan/ember-style-modifier/pull/39) upgrade to Ember 3.24 ([@jelhan](https://github.com/jelhan))
|
|
16
|
+
* [#64](https://github.com/jelhan/ember-style-modifier/pull/64) finish all scenarios in CI even if one fails ([@jelhan](https://github.com/jelhan))
|
|
17
|
+
* [#28](https://github.com/jelhan/ember-style-modifier/pull/28) Upgrade Ember CLI to 3.21 ([@jelhan](https://github.com/jelhan))
|
|
18
|
+
* [#20](https://github.com/jelhan/ember-style-modifier/pull/20) Configure Renovate ([@renovate[bot]](https://github.com/apps/renovate))
|
|
19
|
+
|
|
20
|
+
#### Committers: 2
|
|
21
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
22
|
+
- Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
|
|
23
|
+
|
|
1
24
|
## v0.6.0 (2020-08-03)
|
|
2
25
|
|
|
3
26
|
#### :boom: Breaking Change
|
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@ This allows to set custom CSS of an element without requiring a [Content Securit
|
|
|
9
9
|
|
|
10
10
|
## Compatibility
|
|
11
11
|
|
|
12
|
-
* Ember.js v3.
|
|
13
|
-
* Ember CLI
|
|
14
|
-
* Node.js
|
|
12
|
+
* Ember.js v3.24 or above
|
|
13
|
+
* Ember CLI v3.24 or above
|
|
14
|
+
* Node.js v12 or above
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
package/addon/modifiers/style.js
CHANGED
|
@@ -26,7 +26,7 @@ export default class StyleModifier extends Modifier {
|
|
|
26
26
|
|
|
27
27
|
// This is a workaround for the missing `Array#flat` in IE11.
|
|
28
28
|
return [].concat(
|
|
29
|
-
...[...positional.filter(isObject), named].map(obj =>
|
|
29
|
+
...[...positional.filter(isObject), named].map((obj) =>
|
|
30
30
|
Object.entries(obj).map(([k, v]) => [dasherize(k), v])
|
|
31
31
|
)
|
|
32
32
|
);
|
|
@@ -37,8 +37,10 @@ export default class StyleModifier extends Modifier {
|
|
|
37
37
|
|
|
38
38
|
newStyles.forEach(([property, value]) => {
|
|
39
39
|
assert(
|
|
40
|
-
`Your given value for property '${property}' is ${value} (${typeOf(
|
|
41
|
-
|
|
40
|
+
`Your given value for property '${property}' is ${value} (${typeOf(
|
|
41
|
+
value
|
|
42
|
+
)}). ` +
|
|
43
|
+
'Accepted types are string and undefined. Please change accordingly.',
|
|
42
44
|
typeof value === 'undefined' || typeOf(value) === 'string'
|
|
43
45
|
);
|
|
44
46
|
|
|
@@ -61,12 +63,10 @@ export default class StyleModifier extends Modifier {
|
|
|
61
63
|
});
|
|
62
64
|
|
|
63
65
|
// remove rules that were present in last cycle but aren't present in this one
|
|
64
|
-
rulesToRemove.forEach(rule => this.element.style.removeProperty(rule));
|
|
66
|
+
rulesToRemove.forEach((rule) => this.element.style.removeProperty(rule));
|
|
65
67
|
|
|
66
68
|
// cache styles that in this rendering cycle for the next one
|
|
67
|
-
this._oldStyles = new Set(
|
|
68
|
-
newStyles.map(e => e[0])
|
|
69
|
-
);
|
|
69
|
+
this._oldStyles = new Set(newStyles.map((e) => e[0]));
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
didReceiveArguments() {
|
package/config/environment.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-style-modifier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "{{style}} modifier to set an element's style using the CSSStyleDeclaration API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -14,53 +14,66 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "ember build --environment=production",
|
|
17
|
-
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint
|
|
17
|
+
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
|
|
18
|
+
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
|
|
18
19
|
"lint:hbs": "ember-template-lint .",
|
|
19
|
-
"lint:
|
|
20
|
+
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
21
|
+
"lint:js": "eslint . --cache",
|
|
20
22
|
"release": "release-it",
|
|
23
|
+
"lint:js:fix": "eslint . --fix",
|
|
21
24
|
"start": "ember serve",
|
|
22
|
-
"test": "npm-run-all lint
|
|
25
|
+
"test": "npm-run-all lint test:*",
|
|
23
26
|
"test:ember": "ember test",
|
|
24
27
|
"test:ember-compatibility": "ember try:each"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"ember-cli-babel": "^7.
|
|
28
|
-
"ember-modifier": "^
|
|
30
|
+
"ember-cli-babel": "^7.26.6",
|
|
31
|
+
"ember-modifier": "^3.0.0"
|
|
29
32
|
},
|
|
30
33
|
"devDependencies": {
|
|
31
|
-
"@ember/optional-features": "^
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
+
"@ember/optional-features": "^2.0.0",
|
|
35
|
+
"@ember/test-helpers": "^2.4.2",
|
|
36
|
+
"@embroider/test-setup": "^0.47.0",
|
|
37
|
+
"@glimmer/component": "^1.0.4",
|
|
38
|
+
"@glimmer/tracking": "^1.0.4",
|
|
34
39
|
"babel-eslint": "^10.1.0",
|
|
35
40
|
"broccoli-asset-rev": "^3.0.0",
|
|
36
|
-
"ember-
|
|
41
|
+
"ember-auto-import": "^2.2.3",
|
|
42
|
+
"ember-cli": "~3.28.3",
|
|
37
43
|
"ember-cli-content-security-policy": "^2.0.0-1",
|
|
38
44
|
"ember-cli-dependency-checker": "^3.2.0",
|
|
39
|
-
"ember-cli-htmlbars": "^
|
|
40
|
-
"ember-cli-inject-live-reload": "^2.0
|
|
45
|
+
"ember-cli-htmlbars": "^6.0.0",
|
|
46
|
+
"ember-cli-inject-live-reload": "^2.1.0",
|
|
41
47
|
"ember-cli-sri": "^2.1.1",
|
|
42
|
-
"ember-cli-
|
|
48
|
+
"ember-cli-terser": "^4.0.2",
|
|
43
49
|
"ember-disable-prototype-extensions": "^1.1.3",
|
|
44
50
|
"ember-export-application-global": "^2.0.1",
|
|
45
|
-
"ember-load-initializers": "^2.1.
|
|
46
|
-
"ember-maybe-import-regenerator": "^0.
|
|
47
|
-
"ember-
|
|
48
|
-
"ember-
|
|
49
|
-
"ember-
|
|
51
|
+
"ember-load-initializers": "^2.1.2",
|
|
52
|
+
"ember-maybe-import-regenerator": "^1.0.0",
|
|
53
|
+
"ember-page-title": "^6.2.2",
|
|
54
|
+
"ember-qunit": "^5.1.4",
|
|
55
|
+
"ember-resolver": "^8.0.2",
|
|
56
|
+
"ember-source": "~3.28.0",
|
|
50
57
|
"ember-source-channel-url": "^3.0.0",
|
|
51
|
-
"ember-template-lint": "^
|
|
58
|
+
"ember-template-lint": "^3.6.0",
|
|
52
59
|
"ember-try": "^1.4.0",
|
|
53
|
-
"eslint": "^7.
|
|
54
|
-
"eslint-
|
|
60
|
+
"eslint": "^7.32.0",
|
|
61
|
+
"eslint-config-prettier": "^8.3.0",
|
|
62
|
+
"eslint-plugin-ember": "^10.5.4",
|
|
55
63
|
"eslint-plugin-node": "^11.1.0",
|
|
64
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
65
|
+
"eslint-plugin-qunit": "^7.0.0",
|
|
56
66
|
"loader.js": "^4.7.0",
|
|
57
67
|
"npm-run-all": "^4.1.5",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
68
|
+
"prettier": "^2.3.2",
|
|
69
|
+
"qunit": "^2.16.0",
|
|
70
|
+
"qunit-dom": "^2.0.0",
|
|
71
|
+
"release-it": "^14.0.0",
|
|
72
|
+
"release-it-lerna-changelog": "^4.0.0",
|
|
73
|
+
"webpack": "^5.60.0"
|
|
61
74
|
},
|
|
62
75
|
"engines": {
|
|
63
|
-
"node": "
|
|
76
|
+
"node": "12.* || 14.* || >= 16"
|
|
64
77
|
},
|
|
65
78
|
"publishConfig": {
|
|
66
79
|
"registry": "https://registry.npmjs.org"
|
package/renovate.json
ADDED
package/.ember-cli.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/**
|
|
3
|
-
Ember CLI sends analytics information by default. The data is completely
|
|
4
|
-
anonymous, but there are times when you might want to disable this behavior.
|
|
5
|
-
|
|
6
|
-
Setting `disableAnalytics` to true will prevent any data from being sent.
|
|
7
|
-
*/
|
|
8
|
-
"disableAnalytics": false
|
|
9
|
-
}
|