Skip to content

Commit

Permalink
[VEL-3593] Upgrade to ember 3.28 (#395)
Browse files Browse the repository at this point in the history
* upgrade to ember 3.28

* fix eslintrc

* linter fix

* [VEL-3593/VEL-3588]  Remove unused ember-tether (#397)

* remove unused ember-tether

* fix Run loop and computed dot access deprecation

* remove comments

* feature-flagged: fix property access ambiguous path
  • Loading branch information
phndiaye authored Jul 25, 2024
1 parent ce9f7a4 commit 40c22c3
Show file tree
Hide file tree
Showing 25 changed files with 673 additions and 592 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ module.exports = {
node: true
},
plugins: ['node'],
rules: {}
extends: ['plugin:node/recommended']
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended']
}
]
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
25 changes: 7 additions & 18 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,28 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/tests
/tmp
.bowerrc
.editorconfig
.ember-cli
.gitignore
.jshintrc
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/pnpm-lock.yaml
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane'
extends: 'recommended'
};
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Ember Upfluence Utilities. This repository contains a load of shared code which
Compatibility
------------------------------------------------------------------------------

* Ember.js v3.12 or above
* Ember CLI v2.13 or above
* Node.js v10 or above
* Ember.js v3.24 or above
* Ember CLI v3.24 or above
* Node.js v12 or above


Installation
Expand Down
6 changes: 3 additions & 3 deletions addon/activity-notifier/service.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { alias, notEmpty } from '@ember/object/computed';
import Service, { inject as service } from '@ember/service';
import { run } from '@ember/runloop';
import { cancel, later } from '@ember/runloop';
import { observer } from '@ember/object';
import { getOwner } from '@ember/application';
import Configuration from '@upfluence/ember-upf-utils/configuration';
Expand Down Expand Up @@ -61,7 +61,7 @@ export default Service.extend({
this._isRunning = false;

if (this._timer) {
run.cancel(this._timer);
cancel(this._timer);
}
},

Expand All @@ -80,7 +80,7 @@ export default Service.extend({
.then((p) => {
this._from = p.next;
this.displayNotifications(p.notifications);
this._timer = run.later(this, this.fetchNotifications, this.waitTime());
this._timer = later(this, this.fetchNotifications, this.waitTime());
})
.finally(() => {
this._inFetch = false;
Expand Down
2 changes: 1 addition & 1 deletion addon/components/feature-flagged/template.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#if allowedFeature}}
{{#if this.allowedFeature}}
{{yield}}
{{else}}
{{yield to="inverse"}}
Expand Down
6 changes: 3 additions & 3 deletions addon/mixins/activity-runner.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { inject as service } from '@ember/service';
import Mixin from '@ember/object/mixin';
import { run } from '@ember/runloop';
import { later } from '@ember/runloop';
import { inject as service } from '@ember/service';

export default Mixin.create({
activityNotifier: service(),

init() {
this._super();
run.later(this, () => this.activityNotifier.start(), 3000);
later(this, () => this.activityNotifier.start(), 3000);
}
});
88 changes: 0 additions & 88 deletions config/ember-try.js

This file was deleted.

9 changes: 8 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@ module.exports = function (defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit'
}
]
});
};
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
includePolyfill: true
},
babel: {
/* eslint-disable node/no-unpublished-require */
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin()]
}
},
Expand Down
50 changes: 28 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint:* test:*",
"test": "npm-run-all lint test:*",
"test:ember": "ember test --silent -r dot",
"test:ember-coverage": "COVERAGE=true ember test",
"test:ember-compatibility": "ember try:each",
Expand All @@ -27,7 +30,7 @@
"postpack": "ember ts:clean"
},
"engines": {
"node": "10.* || >= 12"
"node": "12.* || 14.* || >= 16"
},
"dependencies": {
"@ember/string": "^3.1.1",
Expand All @@ -38,11 +41,10 @@
"calculate-cache-key-for-tree": "^2.0.0",
"ember-auto-import": "^2.7.2",
"ember-cli-babel": "^7.26.10",
"ember-cli-htmlbars": "^4.3.1",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-less": "^2.0.6",
"ember-cli-typescript": "^4.2.1",
"ember-named-blocks-polyfill": "^0.2.4",
"ember-tether": "^1.0.0-beta.2",
"ember-uploader": "^2.x",
"moment": "^2.29.4",
"tinycolor2": "^1.4.1"
Expand All @@ -51,10 +53,11 @@
"@upfluence/oss-components": "^3.x"
},
"devDependencies": {
"@ember/optional-features": "^1.3.0",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.9.4",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@types/ember-data": "^3.16.15",
"@types/ember-data__adapter": "^3.16.1",
"@types/ember-data__model": "^3.16.2",
Expand Down Expand Up @@ -84,33 +87,36 @@
"@types/sinon": "^10.0.6",
"@typescript-eslint/parser": "^5.0.0",
"@upfluence/oss-components": "^3.55.0",
"ember-cli": "~3.18.0",
"ember-cli": "~3.28.6",
"ember-cli-code-coverage": "^3.0.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-terser": "^4.0.2",
"ember-cli-typescript-blueprints": "upfluence/ember-cli-typescript-blueprints#ember-4-update",
"ember-data": "~3.18.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-intl": "^6.4.0",
"ember-load-initializers": "^2.1.1",
"ember-load-initializers": "^2.1.2",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.0",
"ember-resolver": "^8.0.3",
"ember-sinon-qunit": "^5.0.0",
"ember-source": "~3.18.0",
"ember-source-channel-url": "^2.0.1",
"ember-template-lint": "^2.6.0",
"ember-source": "~3.28.8",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.2.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.4.1",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.2.0",
"qunit-dom": "^1.6.0",
"typescript": "^4.4.4",
"webpack": "5"
},
Expand Down
Loading

0 comments on commit 40c22c3

Please sign in to comment.