Skip to content

[FEATURE] Move htmlSafe and isHTMLSafe to @ember/component#36

Closed
Serabe wants to merge 1 commit intoember-cli:masterfrom
Serabe:patch-1
Closed

[FEATURE] Move htmlSafe and isHTMLSafe to @ember/component#36
Serabe wants to merge 1 commit intoember-cli:masterfrom
Serabe:patch-1

Conversation

@Serabe
Copy link
Contributor

@Serabe Serabe commented Sep 3, 2017

@Turbo87
Copy link
Member

Turbo87 commented Sep 3, 2017

We can't do this. This is a breaking change!

@Serabe
Copy link
Contributor Author

Serabe commented Sep 3, 2017

With current format, there cannot be two shims for the same function. Shall I change the format?

@Turbo87
Copy link
Member

Turbo87 commented Sep 3, 2017

Changing the format is also a breaking change.

@locks
Copy link
Contributor

locks commented Sep 3, 2017

Is this project not on v0.2.7?

@Turbo87
Copy link
Member

Turbo87 commented Sep 3, 2017

v0.2.7 of what? I don't understand the question

@martletandco
Copy link

martletandco commented Sep 4, 2017

How does this impact helpers? htmlSafe and friends fall under templates rather than just components. You can import @ember/component into a helper but that shows it's a little off

@Serabe
Copy link
Contributor Author

Serabe commented Sep 4, 2017

Hello @martletandco:

That's an interesting point. Can you repeat it in emberjs/rfcs#236 ? I think it is worth it :)

Thank you!

@rwjblue
Copy link
Member

rwjblue commented Sep 18, 2017

We can't do this. This is a breaking change!

Sure we can, we just need a major version bump here.

@rwjblue
Copy link
Member

rwjblue commented Sep 18, 2017

IMHO, the current JSON format needs a bit of reworking to accommodate multiple import paths pointing to a single global. We should focus on deciding what the new format is, so that the underlying work can begin.

@rwjblue
Copy link
Member

rwjblue commented Sep 18, 2017

My suggestion:

[
  { 
    "global": "Ember.String.isHTMLSafe", 
    "module": "@ember/component", 
    "export": "isHTMLSafe", 
    "deprecated": true,
    "replacement": { "module": "@ember/template", "export": "isHTMLSafe" }
  },
  { 
    "global": "Ember.String.isHTMLSafe", 
    "module": "@ember/template", 
    "export": "isHTMLSafe", 
    "deprecated": false
  },
  { 
    "global": "Ember.Component", 
    "module": "ember-component", 
    "export": "default", 
    "deprecated": true,
    "replacement": { "module": "@ember/component", "export": "default" }
  },
  { 
    "global": "Ember.Component", 
    "module": "@ember/component", 
    "export": "default", 
    "deprecated": false
  }
]

@Turbo87 Turbo87 mentioned this pull request Sep 18, 2017
@locks
Copy link
Contributor

locks commented Oct 20, 2017

I believe #38 supersedes this one.

@locks locks closed this Oct 20, 2017
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.

5 participants