Skip to content

Commit

Permalink
chore(deps): update ember and drop node 12 support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Drop support for Node v12 and Ember LTS 3.24
  • Loading branch information
anehx committed Sep 7, 2022
1 parent 1281a62 commit 3f3fb67
Show file tree
Hide file tree
Showing 8 changed files with 360 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ jobs:
strategy:
matrix:
scenario:
- ember-lts-4.4
- ember-lts-3.28
- ember-lts-3.24
- ember-release
- ember-beta
- ember-canary
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
16 changes: 8 additions & 8 deletions addon/components/validated-input/types/select.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { A as emberArray, isArray } from "@ember/array";
import { deprecate } from "@ember/debug";
import EmberObject, { action, get } from "@ember/object";
import Component from "@glimmer/component";
Expand Down Expand Up @@ -31,7 +30,8 @@ export default class SelectComponent extends Component {

get hasPreGroupedOptions() {
return (
this.args.options[0]?.groupName && isArray(this.args.options[0]?.options)
this.args.options[0]?.groupName &&
Array.isArray(this.args.options[0]?.options)
);
}

Expand Down Expand Up @@ -61,26 +61,26 @@ export default class SelectComponent extends Component {
if (!groupLabelPath) {
return this.args.options;
}
const groups = emberArray();
const groups = [];

this.args.options.forEach((item) => {
const label = get(item, groupLabelPath);

if (label) {
let group = groups.findBy("groupName", label);
let group = groups.find((group) => group.groupName === label);

if (!group) {
group = EmberObject.create({
groupName: label,
options: emberArray(),
options: [],
});

groups.pushObject(group);
groups.push(group);
}

group.options.pushObject(this.normalize(item));
group.options.push(this.normalize(item));
} else {
groups.pushObject(item);
groups.push(item);
}
});

Expand Down
8 changes: 4 additions & 4 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ module.exports = async function () {
useYarn: true,
scenarios: [
{
name: "ember-lts-3.24",
name: "ember-lts-3.28",
npm: {
devDependencies: {
"ember-source": "~3.24.3",
"ember-source": "~3.28.1",
},
},
},
{
name: "ember-lts-3.28",
name: "ember-lts-4.4",
npm: {
devDependencies: {
"ember-source": "~3.28.1",
"ember-source": "~4.4.0",
},
},
},
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@
"ember-changeset": "^4.1.0",
"ember-changeset-validations": "^4.1.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^6.0.1",
"ember-cli-htmlbars": "^6.1.0",
"ember-truth-helpers": "^3.0.0"
},
"devDependencies": {
"@adfinis-sygroup/eslint-config": "1.5.0",
"@adfinis-sygroup/semantic-release-config": "3.4.0",
"@ember/optional-features": "2.0.0",
"@ember/test-helpers": "2.8.1",
"@embroider/test-setup": "1.6.0",
"@embroider/test-setup": "1.8.3",
"@fortawesome/ember-fontawesome": "0.4.0",
"@fortawesome/free-solid-svg-icons": "6.1.1",
"babel-eslint": "10.1.0",
"broccoli-asset-rev": "3.0.0",
"ember-cli": "4.3.0",
"ember-cli": "4.6.0",
"ember-cli-addon-docs": "ember-learn/ember-cli-addon-docs#667701d60650cf7af51611dbff9abf1879776421",
"ember-cli-dependency-checker": "3.3.1",
"ember-cli-deploy": "1.0.2",
Expand All @@ -76,11 +76,11 @@
"ember-try": "2.0.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-ember": "10.6.1",
"eslint-plugin-ember": "11.0.2",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-qunit": "7.2.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-qunit": "7.3.1",
"husky": "8.0.1",
"lint-staged": "13.0.3",
"loader.js": "4.7.0",
Expand All @@ -91,7 +91,7 @@
"webpack": "5.74.0"
},
"engines": {
"node": "12.* || 14.* || >= 16"
"node": "14.* || >= 16"
},
"ember": {
"edition": "octane"
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "4.3.0",
"version": "4.6.0",
"blueprints": [
{
"name": "addon",
Expand Down
4 changes: 0 additions & 4 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ module.exports = function (environment) {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
},

APP: {
Expand Down
Loading

0 comments on commit 3f3fb67

Please sign in to comment.