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

Support Ember 5, drop Ember 3.x support #965

Merged
merged 7 commits into from
Jun 20, 2023
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/actions/pnpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
name: Install pnpm
id: pnpm-install
with:
version: ^7.26.1
version: ^8.6.0
run_install: false

- name: Get pnpm store directory
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ jobs:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-release
- ember-beta
- ember-canary
- ember-classic
- embroider-safe
- embroider-optimized

Expand Down
4 changes: 1 addition & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
auto-install-peers=false
link-workspace-packages=deep
strict-peer-dependencies=true
link-workspace-packages=deep
12 changes: 0 additions & 12 deletions docs/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# 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
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
12 changes: 8 additions & 4 deletions docs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember'],
Expand All @@ -27,6 +30,7 @@ module.exports = {
'./.eslintrc.js',
'./postcss.config.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./tailwind.config.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
Expand Down
8 changes: 0 additions & 8 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
14 changes: 1 addition & 13 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
8 changes: 8 additions & 0 deletions docs/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
8 changes: 8 additions & 0 deletions docs/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
rules: {
'at-rule-no-unknown': [true, { ignoreAtRules: ['tailwind'] }],
},
};
2 changes: 1 addition & 1 deletion docs/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
2 changes: 1 addition & 1 deletion docs/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.10.0",
"version": "5.0.0",
"blueprints": [
{
"name": "app",
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Here are a few interactive examples. Try changing the numbers in the templates
and you should see the results update!

{{editable-templates}}
<EditableTemplates/>
13 changes: 13 additions & 0 deletions docs/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ module.exports = function (defaults) {
staticModifiers: true,
staticComponents: true,
splitAtRoutes: [],
packageRules: [
{
package: 'ember-dynamic-render-template',
semverRange: '*',
addonTemplates: {
'templates/components/render-template.hbs': {
disambiguate: {
result: 'data',
},
},
},
},
],
packagerOptions: {
// publicAssetURL is used similarly to Ember CLI's asset fingerprint prepend option.
publicAssetURL: '/',
Expand Down
54 changes: 31 additions & 23 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -28,24 +30,26 @@
},
"devDependencies": {
"@babel/core": "7.20.12",
"@docfy/ember": "^0.5.0",
"@babel/eslint-parser": "^7.22.5",
"@babel/plugin-proposal-decorators": "^7.22.5",
"@docfy/ember": "^0.6.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@embroider/compat": "^2.1.1",
"@embroider/core": "^2.1.1",
"@embroider/webpack": "^2.1.1",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.0.3",
"@embroider/compat": "^3.0.2",
"@embroider/core": "^3.0.2",
"@embroider/webpack": "^3.0.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"autoprefixer": "^10.4.13",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^7.6.0",
"concurrently": "^8.2.0",
"cssnano": "^5.1.14",
"ember-auto-import": "^2.6.0",
"ember-cli": "~4.10.0",
"ember-cli-app-version": "^5.0.0",
"ember-auto-import": "^2.6.3",
"ember-cli": "~5.0.0",
"ember-cli-app-version": "^6.0.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-clean-css": "^2.0.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-deploy": "^2.0.0",
"ember-cli-deploy-build": "^2.0.0",
Expand All @@ -55,30 +59,34 @@
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-data": "~4.9.1",
"ember-data": "~5.0.0",
"ember-dynamic-render-template": "^0.0.6",
"ember-fetch": "^8.1.2",
"ember-load-initializers": "^2.1.2",
"ember-qunit": "^6.1.1",
"ember-resolver": "^10.0.0",
"ember-source": "~4.10.0",
"ember-modifier": "^4.1.0",
"ember-qunit": "^7.0.0",
"ember-resolver": "^10.1.0",
"ember-source": "~5.0.0",
"ember-svg-jar": "^2.4.2",
"ember-template-lint": "^5.3.3",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-ember": "^11.4.4",
"eslint-plugin-n": "^15.6.1",
"ember-template-lint": "^5.10.1",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-ember": "^11.8.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.4",
"loader.js": "^4.7.0",
"postcss": "^8.4.21",
"postcss-loader": "^7.0.2",
"prettier": "^2.8.3",
"prettier": "^2.8.8",
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"stylelint": "^15.7.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-prettier": "^3.0.0",
"tailwindcss": "^3.2.4",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
"tracked-built-ins": "^3.1.1",
"webpack": "^5.86.0"
},
"ember": {
"edition": "octane"
Expand Down
9 changes: 4 additions & 5 deletions ember-math-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@
"prepublishOnly": "pnpm build"
},
"dependencies": {
"@embroider/addon-shim": "1.8.4"
"@embroider/addon-shim": "^1.8.5"
},
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.20.13",
"@babel/plugin-syntax-decorators": "7.19.0",
"@embroider/addon-dev": "3.0.0",
"@embroider/addon-dev": "^3.1.1",
"@nullvoxpopuli/eslint-configs": "3.0.4",
"@rollup/plugin-babel": "6.0.3",
"babel-eslint": "10.1.0",
"concurrently": "7.6.0",
"eslint": "^7.32.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "8.6.0",
"eslint-plugin-decorator-position": "5.0.2",
"eslint-plugin-ember": "11.4.4",
Expand All @@ -61,7 +60,7 @@
"rollup": "^3.12.0"
},
"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0"
"ember-source": "^4.0.0 || ^5.0.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"ignoreMissing": [
"ember-cli-htmlbars"
]
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
21 changes: 21 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/addon/components/render-template.js b/addon/components/render-template.js
index 72e2450a2fff51323fc982e62e605f1f57ab0668..12b40402957f8816a46c4cdcb546914b3c947aa3 100644
--- a/addon/components/render-template.js
+++ b/addon/components/render-template.js
@@ -2,7 +2,6 @@ import Component from '@ember/component';
import { setOwner, getOwner } from '@ember/application';
import { once } from '@ember/runloop';
import { compileTemplate } from '@ember/template-compilation';
-import { assign } from '@ember/polyfills';
import layout from '../templates/components/render-template';


@@ -20,7 +19,7 @@ export default Component.extend({
let _props = this.get('props') || {};
let domForAppWithGlimmer2 = owner.lookup('service:-document');

- let props = assign({}, _props, {
+ let props = Object.assign({}, _props, {
layout: compileTemplate(this.get('templateString') || ''),
});

Loading