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

Upgrade ember 2.12+. Using mirage for testing. Adding shallow copying #27

Closed
wants to merge 4 commits into from
Closed

Upgrade ember 2.12+. Using mirage for testing. Adding shallow copying #27

wants to merge 4 commits into from

Conversation

nyon
Copy link

@nyon nyon commented Apr 18, 2017

First, thanks for this great package. I use it a lot in my administration interfaces.

However, I stumbled upon some issues and began to refactor and improve. The following changes were made:

  • Upgrading from ember 1.x to ember 2.12 (should resolve release a new version #24 )
  • Migrating code from ES5 to ES6
  • Minor refactoring of Copyable mixin
  • removing old code that based on DS.FixtureAdapter and replaced it with ember-cli-mirage
  • ignoring relations that could not be resolved (a must have for me)
  • adding shallow copying as a new method (copy and shallowCopy)

@milindalvares
Copy link

@lazybensch Pls review

@jfrux
Copy link

jfrux commented May 23, 2017

Definitely appears to be the most productive of the merges.
I vote for this one to override the current since the original repo owner is asking for new maintainers.

@jfrux
Copy link

jfrux commented May 23, 2017

Does this one happen to fix the inverse relationships issue?

Copy link

@jfrux jfrux left a comment

Choose a reason for hiding this comment

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

I fully support these changes.

@stevesims
Copy link

Big 👍 from me on this - would be great to see this merged

if(emberTypeOf(option) === 'object') {
this._applyOptions(option, get(copy, optionName));
} else {
set(copy, optionName, option);

Choose a reason for hiding this comment

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

I'm seeing a crash at this line of Assertion Failed: You must pass an array of records to set a hasMany relationship when attempting to make a copy of a complex record (with several relationships), where I had been attempting to skip copying a relationship by passing in an options object like { relationshipName: null }.

Copy link
Author

Choose a reason for hiding this comment

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

Could you fork my forked repo and provide a test? I'll have a look into it then.

@erkie
Copy link

erkie commented Jan 11, 2018

Need any help here to get this merge?

@erkie
Copy link

erkie commented Jan 11, 2018

I feel like a good way forward would be to merge this PR as is, and then we can create smaller PR's to fix any issues that arise. It's also easier to just point package.json to the master branch so we can start testing it. It's too good of a change on the whole to let die in PR state like this.

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

Successfully merging this pull request may close these issues.

release a new version
5 participants