Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember >= 4.x compatibility (require ember-source 4.8+) #22

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

strategy:
matrix:
ember-version: [ember-beta, ember-lts-3.28]
ember-version: [ember-beta, ember-lts-4.8]

steps:
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Provides the legacy implementation of the `Checkbox`, `LinkComponent`,
Compatibility
------------------------------------------------------------------------------

* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v12 or above
* Ember.js v4.0 or above
* Ember CLI v4.0 or above
* Node.js v16 or above


Installation
Expand Down
21 changes: 1 addition & 20 deletions addon/mixins/text-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import { get, set } from '@ember/object';
import Mixin from '@ember/object/mixin';
import TargetActionSupport from './_target_action_support';
import { deprecate } from '@ember/debug';
import { SEND_ACTION } from '@ember/deprecated-features';
import { MUTABLE_CELL } from '@ember/-internals/views';

const KEY_EVENTS = {
Expand Down Expand Up @@ -319,24 +317,7 @@ function sendAction(eventName, view, event) {

let value = view.value;

if (SEND_ACTION && typeof action === 'string') {
let message = `Passing actions to components as strings (like \`<Input @${eventName}="${action}" />\`) is deprecated. Please use closure actions instead (\`<Input @${eventName}={{action "${action}"}} />\`).`;

deprecate(message, false, {
id: 'ember-component.send-action',
until: '4.0.0',
url: 'https://emberjs.com/deprecations/v3.x#toc_ember-component-send-action',
for: 'ember-source',
since: {
enabled: '3.4.0',
},
});

view.triggerAction({
action: action,
actionContext: [value, event],
});
} else if (typeof action === 'function') {
if (typeof action === 'function') {
action(value, event);
}

Expand Down
6 changes: 4 additions & 2 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ module.exports = async function () {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.28',
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~3.28.0',
'ember-source': '~4.8.6',
},
},
},
Expand Down Expand Up @@ -39,6 +39,8 @@ module.exports = async function () {
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.4.1",
"@embroider/test-setup": "^1.0.0",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@glint/template": "^1.2.1",
"@types/ember-qunit": "^5.0.0",
"@types/ember-resolver": "^5.0.11",
"@types/ember__application": "^4.0.0",
Expand Down Expand Up @@ -77,7 +79,6 @@
"ember-cli-terser": "^4.0.2",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
Expand All @@ -101,10 +102,10 @@
"webpack": "^5.52.1"
},
"peerDependencies": {
"ember-source": "*"
"ember-source": ">= 4.8"
},
"engines": {
"node": "12.* || 14.* || >= 16"
"node": ">= 16"
},
"ember": {
"edition": "octane"
Expand Down
17 changes: 12 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,13 @@
mkdirp "^1.0.4"
silent-error "^1.1.1"

"@ember/string@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@ember/string/-/string-3.1.1.tgz#0a5ac0d1e4925259e41d5c8d55ef616117d47ff0"
integrity sha512-UbXJ+k3QOrYN4SRPHgXCqYIJ+yWWUg1+vr0H4DhdQPTy8LJfyqwZ2tc5uqpSSnEXE+/1KopHBE5J8GDagAg5cg==
dependencies:
ember-cli-babel "^7.26.6"

"@ember/test-helpers@^2.4.1":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-2.6.0.tgz#d687515c6ab49ba72717fc62046970ef4a72ea9c"
Expand Down Expand Up @@ -1206,6 +1213,11 @@
dependencies:
babel-plugin-debug-macros "^0.3.4"

"@glint/template@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@glint/template/-/template-1.2.1.tgz#b17b2e490ad1826d45e7bec3b87149ca926600e3"
integrity sha512-rlYy/93fAhYjXmTchWcwCpPFMfrqBYEskzbDYawS2oz4DVwtf4fOITLKB0QddQMI7WUCjgXAiIGZqcNa/R4YeQ==

"@handlebars/parser@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@handlebars/parser/-/parser-1.1.0.tgz#d6dbc7574774b238114582410e8fee0dc3532bdf"
Expand Down Expand Up @@ -4713,11 +4725,6 @@ ember-disable-prototype-extensions@^1.1.3:
resolved "https://registry.yarnpkg.com/ember-disable-prototype-extensions/-/ember-disable-prototype-extensions-1.1.3.tgz#1969135217654b5e278f9fe2d9d4e49b5720329e"
integrity sha1-GWkTUhdlS14nj5/i2dTkm1cgMp4=

ember-export-application-global@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ember-export-application-global/-/ember-export-application-global-2.0.1.tgz#b120a70e322ab208defc9e2daebe8d0dfc2dcd46"
integrity sha512-B7wiurPgsxsSGzJuPFkpBWnaeuCu2PGpG2BjyrfA1VcL7//o+5RSnZqiCEY326y7qmxb2GoCgo0ft03KBU0rRw==

ember-load-initializers@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ember-load-initializers/-/ember-load-initializers-2.1.2.tgz#8a47a656c1f64f9b10cecdb4e22a9d52ad9c7efa"
Expand Down