ember-validated-form 5.2.1 → 5.3.1

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,33 @@
1
+ ## [5.3.1](https://github.com/adfinis-sygroup/ember-validated-form/compare/v5.3.0...v5.3.1) (2022-09-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **select:** fix promptIsSelectable in combination with targetPath ([#853](https://github.com/adfinis-sygroup/ember-validated-form/issues/853)) ([526d81f](https://github.com/adfinis-sygroup/ember-validated-form/commit/526d81f25eb47f938fa2fa031d5f5e710a0386bf))
7
+
8
+ # [5.3.0](https://github.com/adfinis-sygroup/ember-validated-form/compare/v5.2.2...v5.3.0) (2022-02-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * addon docs root url ([7d8151f](https://github.com/adfinis-sygroup/ember-validated-form/commit/7d8151fa9d854cdf9595f27347fa57652e58ef10))
14
+ * **blueprint:** add ember-truth-helpers to default blueprint ([a401589](https://github.com/adfinis-sygroup/ember-validated-form/commit/a401589dab6d013f5d659865927919346655295d))
15
+ * **deps:** move required deps to dependencies instead of devDependencies ([46629ce](https://github.com/adfinis-sygroup/ember-validated-form/commit/46629ceb48210bbc58898c299a9388ce7fa816ec))
16
+ * new link to docs ([c1073e5](https://github.com/adfinis-sygroup/ember-validated-form/commit/c1073e55e3a916ed393e33bcf4a045124c320967))
17
+ * **select:** pass prompt argument down to input component ([64a1377](https://github.com/adfinis-sygroup/ember-validated-form/commit/64a1377d64618fa880b332f8a693e1c7f1a321f7))
18
+
19
+
20
+ ### Features
21
+
22
+ * pass attributes to input components ([dc0417d](https://github.com/adfinis-sygroup/ember-validated-form/commit/dc0417d125fe4c20cb59b76531ae4f7391258259))
23
+
24
+ ## [5.2.2](https://github.com/adfinis-sygroup/ember-validated-form/compare/v5.2.1...v5.2.2) (2022-02-10)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * select support for plain options ([#747](https://github.com/adfinis-sygroup/ember-validated-form/issues/747)) ([a58e26d](https://github.com/adfinis-sygroup/ember-validated-form/commit/a58e26ddcd46ec5328c3bb5351bafc7781eacdbd))
30
+
1
31
  ## [5.2.1](https://github.com/adfinis-sygroup/ember-validated-form/compare/v5.2.0...v5.2.1) (2022-02-09)
2
32
 
3
33
 
package/README.md CHANGED
@@ -9,7 +9,7 @@ Easily create forms with client side validations.
9
9
 
10
10
  ![gif](https://raw.githubusercontent.com/adfinis-sygroup/ember-validated-form/main/demo.gif)
11
11
 
12
- Want to try it yourself? [View the docs here.](https://adfinis-sygroup.github.io/ember-validated-form/)
12
+ Want to try it yourself? [View the docs here.](https://docs.adfinis.com/ember-validated-form/)
13
13
 
14
14
  # Contributing
15
15
 
@@ -1,3 +1,4 @@
1
+ {{! template-lint-disable no-autofocus-attribute }}
1
2
  <div class={{this.class}}>
2
3
  {{#if (not-eq @type "checkbox")}}
3
4
  <@labelComponent />
@@ -18,10 +19,12 @@
18
19
  @options={{@options}}
19
20
  @optionTargetPath={{@optionTargetPath}}
20
21
  @optionValuePath={{@optionValuePath}}
22
+ @prompt={{@prompt}}
21
23
  @promptIsSelectable={{@promptIsSelectable}}
22
24
  @setDirty={{@setDirty}}
23
25
  @update={{@update}}
24
26
  @value={{@value}}
27
+ ...attributes
25
28
  />
26
29
  {{/let}}
27
30
  {{else if (or (eq @type "radioGroup") (eq @type "radio-group"))}}
@@ -36,6 +39,7 @@
36
39
  @setDirty={{@setDirty}}
37
40
  @update={{@update}}
38
41
  @value={{@value}}
42
+ ...attributes
39
43
  />
40
44
  {{/let}}
41
45
  {{else if (or (eq @type "checkboxGroup") (eq @type "checkbox-group"))}}
@@ -50,6 +54,7 @@
50
54
  @setDirty={{@setDirty}}
51
55
  @update={{@update}}
52
56
  @value={{@value}}
57
+ ...attributes
53
58
  />
54
59
  {{/let}}
55
60
  {{else if (eq @type "checkbox")}}
@@ -65,6 +70,7 @@
65
70
  @setDirty={{@setDirty}}
66
71
  @update={{@update}}
67
72
  @value={{@value}}
73
+ ...attributes
68
74
  />
69
75
  {{/let}}
70
76
  {{else if (eq @type "textarea")}}
@@ -83,6 +89,7 @@
83
89
  @isValid={{@isValid}}
84
90
  @setDirty={{@setDirty}}
85
91
  @update={{@update}}
92
+ ...attributes
86
93
  />
87
94
  {{/let}}
88
95
  {{else}}
@@ -100,6 +107,7 @@
100
107
  @isValid={{@isValid}}
101
108
  @setDirty={{@setDirty}}
102
109
  @update={{@update}}
110
+ ...attributes
103
111
  />
104
112
  {{/let}}
105
113
  {{/if}}
@@ -1,3 +1,4 @@
1
+ {{! template-lint-disable no-autofocus-attribute }}
1
2
  <div class={{this.class}}>
2
3
  {{#if (not-eq @type "checkbox")}}
3
4
  <@labelComponent />
@@ -17,10 +18,12 @@
17
18
  @options={{@options}}
18
19
  @optionTargetPath={{@optionTargetPath}}
19
20
  @optionValuePath={{@optionValuePath}}
21
+ @prompt={{@prompt}}
20
22
  @promptIsSelectable={{@promptIsSelectable}}
21
23
  @setDirty={{@setDirty}}
22
24
  @update={{@update}}
23
25
  @value={{@value}}
26
+ ...attributes
24
27
  />
25
28
  {{/let}}
26
29
  {{else if (or (eq @type "radioGroup") (eq @type "radio-group"))}}
@@ -35,6 +38,7 @@
35
38
  @setDirty={{@setDirty}}
36
39
  @update={{@update}}
37
40
  @value={{@value}}
41
+ ...attributes
38
42
  />
39
43
  {{/let}}
40
44
  {{else if (or (eq @type "checkboxGroup") (eq @type "checkbox-group"))}}
@@ -49,6 +53,7 @@
49
53
  @setDirty={{@setDirty}}
50
54
  @update={{@update}}
51
55
  @value={{@value}}
56
+ ...attributes
52
57
  />
53
58
  {{/let}}
54
59
  {{else if (eq @type "checkbox")}}
@@ -64,6 +69,7 @@
64
69
  @setDirty={{@setDirty}}
65
70
  @update={{@update}}
66
71
  @value={{@value}}
72
+ ...attributes
67
73
  />
68
74
  {{/let}}
69
75
  {{else if (eq @type "textarea")}}
@@ -82,6 +88,7 @@
82
88
  @isValid={{@isValid}}
83
89
  @setDirty={{@setDirty}}
84
90
  @update={{@update}}
91
+ ...attributes
85
92
  />
86
93
  {{/let}}
87
94
  {{else}}
@@ -99,6 +106,7 @@
99
106
  @isValid={{@isValid}}
100
107
  @setDirty={{@setDirty}}
101
108
  @update={{@update}}
109
+ ...attributes
102
110
  />
103
111
  {{/let}}
104
112
  {{/if}}
@@ -8,6 +8,7 @@
8
8
  id="{{@inputId}}-{{i}}"
9
9
  disabled={{@disabled}}
10
10
  {{on "input" (fn this.onUpdate option.key)}}
11
+ ...attributes
11
12
  />
12
13
  {{option.label}}
13
14
  </label>
@@ -5,5 +5,6 @@
5
5
  disabled={{@disabled}}
6
6
  checked={{@value}}
7
7
  {{on "input" this.onUpdate}}
8
+ ...attributes
8
9
  />
9
10
  <@labelComponent />
@@ -1,6 +1,6 @@
1
1
  <input
2
2
  class={{this.class}}
3
- ...attributes
4
3
  {{on "input" this.onUpdate}}
5
4
  {{on "blur" @setDirty}}
5
+ ...attributes
6
6
  />
@@ -8,6 +8,7 @@
8
8
  id="{{@inputId}}-{{i}}"
9
9
  disabled={{@disabled}}
10
10
  {{on "input" (fn this.onUpdate option.key)}}
11
+ ...attributes
11
12
  />
12
13
  {{option.label}}
13
14
  </label>
@@ -1,12 +1,12 @@
1
1
  <select
2
2
  class={{this.class}}
3
- ...attributes
4
3
  name={{@name}}
5
4
  id={{@inpudId}}
6
5
  disabled={{@disabled}}
7
6
  multiple={{@multiple}}
8
7
  {{on "change" this.onUpdate}}
9
8
  {{on "blur" this.onBlur}}
9
+ ...attributes
10
10
  >
11
11
  {{#if (or @prompt @includeBlank)}}
12
12
  <option
@@ -20,53 +20,17 @@
20
20
  {{#each this.optionGroups as |optionGroup|}}
21
21
  <optgroup label={{optionGroup.groupName}}>
22
22
  {{#each optionGroup.options as |opt|}}
23
- {{#let
24
- (if
25
- (or @optionValuePath @optionTargetPath)
26
- (get opt (or @optionValuePath @optionTargetPath))
27
- opt
28
- )
29
- as |optionValue|
30
- }}
31
- <option
32
- selected={{eq optionValue @value}}
33
- value={{optionValue}}
34
- >{{#if @optionLabelPath}}
35
- {{get opt @optionLabelPath}}
36
- {{else if @optionValuePath}}
37
- {{get opt @optionValuePath}}
38
- {{else if @optionTargetPath}}
39
- {{get opt @optionTargetPath}}
40
- {{else}}
41
- {{opt}}
42
- {{/if}}
43
- </option>
44
- {{/let}}
23
+ <option selected={{eq opt.id @value}} value={{opt.id}}>
24
+ {{opt.label}}
25
+ </option>
45
26
  {{/each}}
46
27
  </optgroup>
47
28
  {{/each}}
48
29
  {{else}}
49
- {{#each @options as |opt|}}
50
- {{#let
51
- (if
52
- (or @optionValuePath @optionTargetPath)
53
- (get opt (or @optionValuePath @optionTargetPath))
54
- opt
55
- )
56
- as |optionValue|
57
- }}
58
- <option selected={{eq optionValue @value}} value={{optionValue}}>{{#if
59
- @optionLabelPath
60
- }}
61
- {{get opt @optionLabelPath}}
62
- {{else if @optionValuePath}}
63
- {{get opt @optionValuePath}}
64
- {{else if @optionTargetPath}}
65
- {{get opt @optionTargetPath}}
66
- {{else}}
67
- {{opt}}
68
- {{/if}}</option>
69
- {{/let}}
30
+ {{#each this.normalizedOptions as |opt|}}
31
+ <option selected={{eq opt.id @value}} value={{opt.id}}>
32
+ {{opt.label}}
33
+ </option>
70
34
  {{/each}}
71
35
  {{/if}}
72
36
  </select>
@@ -23,6 +23,7 @@ export default class SelectComponent extends Component {
23
23
  until: "6.0.0",
24
24
  since: "5.1.0",
25
25
  url: "https://github.com/adfinis-sygroup/ember-validated-form/releases/tag/v5.1.0",
26
+ for: "ember-validated-form",
26
27
  }
27
28
  );
28
29
  }
@@ -38,6 +39,23 @@ export default class SelectComponent extends Component {
38
39
  return this.hasPreGroupedOptions || this.args.groupLabelPath;
39
40
  }
40
41
 
42
+ get normalizedOptions() {
43
+ // normalize options to common data structure, only for rendering
44
+ return this.args.options.map((opt) => this.normalize(opt));
45
+ }
46
+
47
+ normalize(option) {
48
+ if (typeof option !== "object") {
49
+ return { id: option, label: option };
50
+ }
51
+ const valuePath = this.args.optionValuePath ?? this.args.optionTargetPath;
52
+ const labelPath = this.args.optionLabelPath;
53
+ return {
54
+ id: valuePath ? option[valuePath] : option.id,
55
+ label: labelPath ? option[labelPath] : option.label,
56
+ };
57
+ }
58
+
41
59
  get optionGroups() {
42
60
  const groupLabelPath = this.args.groupLabelPath;
43
61
  if (!groupLabelPath) {
@@ -60,7 +78,7 @@ export default class SelectComponent extends Component {
60
78
  groups.pushObject(group);
61
79
  }
62
80
 
63
- group.options.pushObject(item);
81
+ group.options.pushObject(this.normalize(item));
64
82
  } else {
65
83
  groups.pushObject(item);
66
84
  }
@@ -72,6 +90,17 @@ export default class SelectComponent extends Component {
72
90
  findOption(target) {
73
91
  const targetPath = this.args.optionTargetPath;
74
92
  const valuePath = this.args.optionValuePath || targetPath;
93
+
94
+ const getValue = (item) => {
95
+ if (valuePath) {
96
+ return String(item[valuePath]);
97
+ }
98
+ if (typeof item === "object") {
99
+ return String(item.id);
100
+ }
101
+ return String(item);
102
+ };
103
+
75
104
  let options = this.args.options;
76
105
 
77
106
  //flatten pre grouped options
@@ -85,9 +114,9 @@ export default class SelectComponent extends Component {
85
114
  .call(target.options, (option) => option.selected)
86
115
  .map((option) => option.value);
87
116
 
88
- const foundOptions = options.filter((item) =>
89
- selectedValues.includes(`${valuePath ? item[valuePath] : item}`)
90
- );
117
+ const foundOptions = options.filter((item) => {
118
+ return selectedValues.includes(getValue(item));
119
+ });
91
120
  if (targetPath) {
92
121
  return foundOptions.map((item) => item[targetPath]);
93
122
  }
@@ -95,10 +124,10 @@ export default class SelectComponent extends Component {
95
124
  }
96
125
 
97
126
  //single select
98
- const foundOption = options.find(
99
- (item) => `${valuePath ? item[valuePath] : item.value}` === target.value
100
- );
101
- if (targetPath) {
127
+ const foundOption = options.find((item) => getValue(item) === target.value);
128
+
129
+ // If @promptIsSelectable is set to true, foundOption in this case will be undefined.
130
+ if (targetPath && foundOption) {
102
131
  return foundOption[targetPath];
103
132
  }
104
133
  return foundOption;
@@ -1,7 +1,7 @@
1
1
  <textarea
2
2
  class={{this.class}}
3
- ...attributes
4
3
  {{on "input" this.onUpdate}}
5
4
  {{on "blur" @setDirty}}
5
+ ...attributes
6
6
  >
7
7
  </textarea>
@@ -48,6 +48,7 @@
48
48
  @isInvalid={{this.isInvalid}}
49
49
  @placeholder={{@placeholder}}
50
50
  @class={{@class}}
51
+ @prompt={{@prompt}}
51
52
  @promptIsSelectable={{@promptIsSelectable}}
52
53
  @optionLabelPath={{@optionLabelPath}}
53
54
  @optionValuePath={{@optionValuePath}}
@@ -69,6 +70,7 @@
69
70
  (and this.showValidity this.errors)
70
71
  (component this.errorComponent errors=this.errors)
71
72
  }}
73
+ ...attributes
72
74
  />
73
75
  {{/let}}
74
76
  {{/if}}
@@ -10,6 +10,7 @@ module.exports = {
10
10
  packages: [
11
11
  { name: "ember-changeset" },
12
12
  { name: "ember-changeset-validations" },
13
+ { name: "ember-truth-helpers" },
13
14
  ],
14
15
  });
15
16
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-validated-form",
3
- "version": "5.2.1",
3
+ "version": "5.3.1",
4
4
  "description": "Easily create forms with client-side validations",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -14,7 +14,7 @@
14
14
  "directories": {
15
15
  "test": "tests"
16
16
  },
17
- "homepage": "https://adfinis-sygroup.github.io/ember-validated-form",
17
+ "homepage": "https://docs.adfinis.com/ember-validated-form",
18
18
  "bugs": {
19
19
  "url": "https://github.com/adfinis-sygroup/ember-validated-form/issues"
20
20
  },
@@ -33,77 +33,62 @@
33
33
  "prepare": "husky install"
34
34
  },
35
35
  "dependencies": {
36
- "ember-auto-import": "^2.4.0",
37
- "ember-cli-babel": "^7.26.6",
38
- "ember-cli-htmlbars": "^5.7.1",
36
+ "@glimmer/component": "^1.1.2",
37
+ "@glimmer/tracking": "^1.1.2",
38
+ "ember-auto-import": "^2.4.2",
39
+ "ember-changeset": "^4.1.0",
40
+ "ember-changeset-validations": "^4.1.0",
41
+ "ember-cli-babel": "^7.26.11",
42
+ "ember-cli-htmlbars": "^6.0.1",
39
43
  "ember-truth-helpers": "^3.0.0"
40
44
  },
41
45
  "devDependencies": {
42
46
  "@adfinis-sygroup/eslint-config": "1.5.0",
43
47
  "@adfinis-sygroup/semantic-release-config": "3.4.0",
44
- "@babel/core": "7.16.12",
45
- "@babel/helper-create-regexp-features-plugin": "^7.16.7",
46
- "@babel/helper-environment-visitor": "^7.16.7",
47
- "@babel/plugin-proposal-decorators": "^7.16.7",
48
- "@babel/plugin-transform-modules-amd": "^7.16.7",
49
- "@babel/preset-env": "^7.16.11",
50
48
  "@ember/optional-features": "2.0.0",
51
- "@ember/test-helpers": "2.6.0",
52
- "@embroider/test-setup": "0.45.0",
53
- "@fortawesome/ember-fontawesome": "0.2.3",
54
- "@fortawesome/free-solid-svg-icons": "5.15.4",
55
- "@glimmer/component": "1.0.4",
56
- "@glimmer/tracking": "1.0.4",
49
+ "@ember/test-helpers": "2.8.1",
50
+ "@embroider/test-setup": "1.6.0",
51
+ "@fortawesome/ember-fontawesome": "0.4.0",
52
+ "@fortawesome/free-solid-svg-icons": "6.1.1",
57
53
  "babel-eslint": "10.1.0",
58
54
  "broccoli-asset-rev": "3.0.0",
59
- "ember-changeset": "4.0.0-beta.2",
60
- "ember-changeset-validations": "4.0.0-beta.2",
61
- "ember-cli": "3.28.1",
62
- "ember-cli-addon-docs": "4.2.1",
63
- "ember-cli-dependency-checker": "3.2.0",
55
+ "ember-cli": "4.3.0",
56
+ "ember-cli-addon-docs": "ember-learn/ember-cli-addon-docs#667701d60650cf7af51611dbff9abf1879776421",
57
+ "ember-cli-dependency-checker": "3.3.1",
64
58
  "ember-cli-deploy": "1.0.2",
65
59
  "ember-cli-deploy-build": "2.0.0",
66
60
  "ember-cli-deploy-git": "1.3.4",
67
61
  "ember-cli-deploy-git-ci": "1.0.1",
68
62
  "ember-cli-inject-live-reload": "2.1.0",
69
- "ember-cli-release": "1.0.0-beta.2",
70
63
  "ember-cli-sri": "2.1.1",
71
64
  "ember-cli-terser": "4.0.2",
72
65
  "ember-cli-test-loader": "3.0.0",
73
- "ember-concurrency": "2.2.0",
74
- "ember-data": "3.28.3",
66
+ "ember-concurrency": "2.2.1",
67
+ "ember-data": "4.4.0",
75
68
  "ember-disable-prototype-extensions": "1.1.3",
76
69
  "ember-load-initializers": "2.1.2",
77
- "ember-maybe-import-regenerator": "1.0.0",
78
- "ember-power-select": "5.0.3",
79
70
  "ember-qunit": "5.1.5",
80
71
  "ember-resolver": "8.0.3",
81
- "ember-source": "3.28.1",
72
+ "ember-source": "4.6.0",
82
73
  "ember-source-channel-url": "3.0.0",
83
- "ember-template-lint": "3.15.0",
84
- "ember-template-lint-plugin-prettier": "2.0.1",
85
- "ember-try": "1.4.0",
74
+ "ember-template-lint": "4.12.0",
75
+ "ember-template-lint-plugin-prettier": "4.0.0",
76
+ "ember-try": "2.0.0",
86
77
  "eslint": "7.32.0",
87
- "eslint-config-prettier": "8.3.0",
88
- "eslint-plugin-ember": "10.5.8",
89
- "eslint-plugin-import": "2.25.4",
78
+ "eslint-config-prettier": "8.5.0",
79
+ "eslint-plugin-ember": "10.6.1",
80
+ "eslint-plugin-import": "2.26.0",
90
81
  "eslint-plugin-node": "11.1.0",
91
82
  "eslint-plugin-prettier": "4.0.0",
92
- "eslint-plugin-qunit": "6.2.0",
93
- "husky": "7.0.4",
94
- "lint-staged": "11.2.0",
83
+ "eslint-plugin-qunit": "7.2.0",
84
+ "husky": "8.0.1",
85
+ "lint-staged": "13.0.3",
95
86
  "loader.js": "4.7.0",
96
87
  "npm-run-all": "4.1.5",
97
- "prettier": "2.5.1",
98
- "qunit": "2.17.2",
88
+ "prettier": "2.7.1",
89
+ "qunit": "2.19.1",
99
90
  "qunit-dom": "2.0.0",
100
- "webpack": "5.67.0"
101
- },
102
- "resolutions": {
103
- "graceful-fs": ">=4.2.0",
104
- "@embroider/macros": "^1.0.0",
105
- "@embroider/core": "^1.0.0",
106
- "@embroider/util": "^1.0.0"
91
+ "webpack": "5.74.0"
107
92
  },
108
93
  "engines": {
109
94
  "node": "12.* || 14.* || >= 16"
@@ -113,7 +98,7 @@
113
98
  },
114
99
  "ember-addon": {
115
100
  "configPath": "tests/dummy/config",
116
- "demoURL": "https://adfinis-sygroup.github.io/ember-validated-form"
101
+ "demoURL": "https://docs.adfinis.com/ember-validated-form"
117
102
  },
118
103
  "release": {
119
104
  "extends": "@adfinis-sygroup/semantic-release-config"
@@ -1,9 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Template for bug reports
4
- ---
5
-
6
- --
7
- If possible, please consider creating a basic reproduction of your issue with Ember Twiddle. You can use this twiddle as a starting point:
8
-
9
- https://ember-twiddle.com/3691a8576c35ff149bfc26a564ec5437
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
7
- day: "friday"
8
- time: "12:00"
9
- timezone: "Europe/Zurich"
10
- open-pull-requests-limit: 10
11
- versioning-strategy: increase
@@ -1,28 +0,0 @@
1
- name: Deploy
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- release:
8
- types: [published]
9
-
10
- jobs:
11
- deploy:
12
- name: Deploy
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v2
16
- - uses: actions/setup-node@v2
17
- with:
18
- node-version: 14
19
-
20
- - name: Install Dependencies
21
- run: yarn install
22
-
23
- - name: Deploy to Github Pages
24
- run: yarn ember deploy production
25
- env:
26
- CI: true
27
- DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
28
- ADDON_DOCS_UPDATE_LATEST: true
@@ -1,25 +0,0 @@
1
- name: Release
2
-
3
- on: workflow_dispatch
4
-
5
- jobs:
6
- release:
7
- name: Release
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v2
11
- with:
12
- fetch-depth: 0
13
- persist-credentials: false
14
- - uses: actions/setup-node@v2
15
- with:
16
- node-version: 14
17
-
18
- - name: Install dependencies
19
- run: yarn install
20
-
21
- - name: Release on NPM
22
- env:
23
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
24
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25
- run: yarn semantic-release
@@ -1,84 +0,0 @@
1
- name: Test
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- branches:
9
- - main
10
-
11
- jobs:
12
- lint:
13
- name: Lint
14
- runs-on: [ubuntu-latest]
15
-
16
- strategy:
17
- matrix:
18
- target: [js, hbs]
19
-
20
- steps:
21
- - uses: actions/checkout@v2
22
- - uses: actions/setup-node@v2
23
- with:
24
- node-version: 14
25
-
26
- - name: Install dependencies
27
- run: yarn install
28
-
29
- - name: Lint ${{ matrix.target }}
30
- run: yarn lint:${{ matrix.target }}
31
-
32
- test:
33
- name: Tests
34
- needs: [lint]
35
- runs-on: [ubuntu-latest]
36
-
37
- steps:
38
- - uses: actions/checkout@v2
39
- - uses: actions/setup-node@v2
40
- with:
41
- node-version: 14
42
-
43
- - name: Install dependencies (no lockfile)
44
- run: yarn install --no-lockfile
45
-
46
- - name: Run tests (floating dependencies)
47
- run: yarn test:ember
48
-
49
- - name: Install dependencies
50
- run: yarn install
51
-
52
- - name: Run tests
53
- run: yarn test:ember
54
- env:
55
- COVERAGE: true
56
-
57
- - name: Upload coverage report to Codecov
58
- uses: codecov/codecov-action@v1
59
- with:
60
- file: ./coverage/lcov.info
61
-
62
- try-one:
63
- name: Additional Tests
64
- needs: [test]
65
- runs-on: [ubuntu-latest]
66
-
67
- strategy:
68
- matrix:
69
- scenario:
70
- - ember-lts-3.24
71
- - ember-lts-3.28
72
- - ember-release
73
-
74
- steps:
75
- - uses: actions/checkout@v2
76
- - uses: actions/setup-node@v2
77
- with:
78
- node-version: 14
79
-
80
- - name: Install dependencies
81
- run: yarn install
82
-
83
- - name: Run tests
84
- run: yarn ember try:one ${{ matrix.scenario }}