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

chore: update to ember v4 #625

Merged
merged 3 commits into from
Jul 4, 2023
Merged

chore: update to ember v4 #625

merged 3 commits into from
Jul 4, 2023

Conversation

velrest
Copy link
Contributor

@velrest velrest commented Jan 25, 2023

BREAKING CHANGE:

  • Ember.js v3.28 or above
  • Ember CLI v3.28 or above
  • Node.js v14 or above

@velrest
Copy link
Contributor Author

velrest commented Jan 25, 2023

Currently putting this on-hold since all template files throw the following error:

Build Error (broccoli-persistent-filter:Babel > [Babel: ember-emeis]) in ember-emeis/components/acl-wizzard/select-card.js

/home/jonas/projects/ember-emeis/ember-emeis/components/acl-wizzard/select-card.js: Class constructor SetTransform cannot be invoked without 'new'TypeError: /home/jonas/projects/ember-emeis/ember-emeis/components/acl-wizzard/select-card.js: Class constructor SetTransform cannot be invoked without 'new'
    at preprocess (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:12848:28)
    at normalize (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:13493:15)
    at precompileJSON (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:6120:47)
    at precompile (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:6157:31)
    at precompile (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:19423:37)
    at precompile (/home/jonas/projects/ember-emeis/node_modules/ember-cli-htmlbars/lib/utils.js:222:12)
    at insertCompiledTemplate (/home/jonas/projects/ember-emeis/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:50:42)
    at PluginPass.CallExpression (/home/jonas/projects/ember-emeis/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:142:21)
    at newFn (/home/jonas/projects/ember-emeis/node_modules/@babel/traverse/lib/visitors.js:159:21)
    at NodePath._call (/home/jonas/projects/ember-emeis/node_modules/@babel/traverse/lib/path/context.js:46:20)


Stack Trace and Error Report: /tmp/error.dump.55f1244da272e467d1af8ba6f0af82bb.log

I already tried:

Help would be appreciated!

Related issues:

@velrest velrest marked this pull request as ready for review January 25, 2023 16:42
@velrest
Copy link
Contributor Author

velrest commented Jan 26, 2023

Currently putting this on-hold since all template files throw the following error:

Build Error (broccoli-persistent-filter:Babel > [Babel: ember-emeis]) in ember-emeis/components/acl-wizzard/select-card.js

/home/jonas/projects/ember-emeis/ember-emeis/components/acl-wizzard/select-card.js: Class constructor SetTransform cannot be invoked without 'new'TypeError: /home/jonas/projects/ember-emeis/ember-emeis/components/acl-wizzard/select-card.js: Class constructor SetTransform cannot be invoked without 'new'
    at preprocess (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:12848:28)
    at normalize (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:13493:15)
    at precompileJSON (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:6120:47)
    at precompile (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:6157:31)
    at precompile (/home/jonas/projects/ember-emeis/node_modules/ember-source/dist/ember-template-compiler.js:19423:37)
    at precompile (/home/jonas/projects/ember-emeis/node_modules/ember-cli-htmlbars/lib/utils.js:222:12)
    at insertCompiledTemplate (/home/jonas/projects/ember-emeis/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:50:42)
    at PluginPass.CallExpression (/home/jonas/projects/ember-emeis/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:142:21)
    at newFn (/home/jonas/projects/ember-emeis/node_modules/@babel/traverse/lib/visitors.js:159:21)
    at NodePath._call (/home/jonas/projects/ember-emeis/node_modules/@babel/traverse/lib/path/context.js:46:20)


Stack Trace and Error Report: /tmp/error.dump.55f1244da272e467d1af8ba6f0af82bb.log

I already tried:

Help would be appreciated!

Related issues:

I resolved this issue.
Due to SetTransform being so generic i had a hard time to understand, which addon this came from and i thought this was a generic ember build class. Turns out after a rg SetTransform that ember-simple-set-helper still used the old style class version of registerPlugin. Since this addon is deprecated anyway i replaced it with ember-set-helper.

@velrest
Copy link
Contributor Author

velrest commented Jan 26, 2023

I also had issues with upgrading ember-engines to 0.9.0. Other than the official deprecations the package @ember/legacy-built-in-components is now also needed. This is undocumented and there is currently an issue here

@velrest velrest force-pushed the ember_v4 branch 3 times, most recently from 08bf2bf to a26ca00 Compare January 27, 2023 09:43
@velrest
Copy link
Contributor Author

velrest commented Jan 27, 2023

Putting this on hold for now. There are still a lot of issues with the tests.

@derrabauke
Copy link
Contributor

Putting this on hold for now. There are still a lot of issues with the tests.

Can we push this together some time this week?

velrest added 2 commits June 23, 2023 10:05
BREAKING CHANGE:
- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v16 or above
BREAKING CHANGE:
- Rename `router` service dependency to `hostRouter` due to deprecation

Deprecation id: ember-engines.deprecation-router-service-from-host
@velrest velrest force-pushed the ember_v4 branch 6 times, most recently from 7d426f1 to 1b5518a Compare June 30, 2023 07:44
@derrabauke
Copy link
Contributor

This needs ensure-safe-component wrapper or a direct component import (more future safe)

(component (if @multiple "power-select-multiple" "power-select"))

@velrest
Copy link
Contributor Author

velrest commented Jun 30, 2023

[email protected] not working because of issue with embroider.
Results in Uncaught Error: Could not find module `@ember-data/store` imported from `(require)` .

@derrabauke
Copy link
Contributor

[email protected] not working because of issue with embroider. Results in Uncaught Error: Could not find module `@ember-data/store` imported from `(require)`.

Honestly, I've no idea what's going wrong here. Tried a couple of things but nothing seems to work.

I think we have two options here:

  1. disable the release test scenario for now
  2. downgrade ember-data

Don't know if @anehx knows what could help us here. 🤷

@derrabauke
Copy link
Contributor

Btw: I think the addon/routes/index.js file needs some refactoring as of ember v5:

import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";

export default class IndexRoute extends Route {
  @service hostRouter;

  beforeModel() {
    this.hostRouter.transitionTo("users");
  }
}

@velrest
Copy link
Contributor Author

velrest commented Jul 4, 2023

Btw: I think the addon/routes/index.js file needs some refactoring as of ember v5:

import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";

export default class IndexRoute extends Route {
  @service hostRouter;

  beforeModel() {
    this.hostRouter.transitionTo("users");
  }
}
`

What do you mean? We are using the hostRouter transitionTo here.

@derrabauke
Copy link
Contributor

Btw: I think the addon/routes/index.js file needs some refactoring as of ember v5:

import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";

export default class IndexRoute extends Route {
  @service hostRouter;

  beforeModel() {
    this.hostRouter.transitionTo("users");
  }
}
`

What do you mean? We are using the hostRouter transitionTo here.

Sorry for confusing you. The code I've pasted was already refactored. The original is not touched yet and should become the quoted code. :)

@velrest velrest force-pushed the ember_v4 branch 3 times, most recently from 1192093 to ab5ab44 Compare July 4, 2023 12:17
BREAKING CHANGE:
- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v14 or above
@velrest
Copy link
Contributor Author

velrest commented Jul 4, 2023

Disabled release for now since Started 38m 17s ago due to tests timing out.

Copy link
Contributor

@derrabauke derrabauke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job! ✨

@velrest velrest merged commit 37cdaed into projectcaluma:main Jul 4, 2023
@derrabauke
Copy link
Contributor

🎉 This PR is included in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants