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

[doc beta] fixing references to Ember in the subdirectory ember #16164

Merged
merged 1 commit into from
Jan 30, 2018
Merged

[doc beta] fixing references to Ember in the subdirectory ember #16164

merged 1 commit into from
Jan 30, 2018

Conversation

MarcoUmpierrez
Copy link
Contributor

In relation to this issue #15723, I have fixed the references to Ember in the subdirectory ember.

There were some things I wasn't sure about; I list them here so anyone with more experience can guide me to replace them correctly:

  1. lib/index.js: here appears Ember.String.loc() in a comment, but I wasn't sure if I should replace it with just "loc() helper" or "loc() helper in @ember/string".

  2. tests/error_handler_test.js:

  • Ember.onerror has no replacement as far as I know. I researched it and found this comment of rwjblue. The same happens with Ember.testing.
  • I wasn't sure what to do with Ember.Test. Should I import Test from 'test'?

I think the rest should be ok, but I would appreciate if someone can check it to make sure that I didn't anything wrong 😄

locks
locks previously requested changes Jan 22, 2018
Copy link
Contributor

@locks locks left a comment

Choose a reason for hiding this comment

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

CI is complaining about ember/tests/error_handler_test.js: "TestAdapter" is read-only

import { run } from 'ember-metal';
import { jQuery } from 'ember-views';
import { QueryParamTestCase, moduleFor } from 'internal-test-helpers';
import { inject } from '@ember/service';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to import { inject as service } from '@ember/service';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@locks Done 😄

@@ -1,9 +1,11 @@
import Ember from 'ember';
import { run } from 'ember-metal';
import { DEBUG } from 'ember-env-flags';
import TestAdapter from '@ember/test/adapter';
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem quite right, as CI is failing throughout all jobs.

Copy link
Contributor Author

@MarcoUmpierrez MarcoUmpierrez Jan 22, 2018

Choose a reason for hiding this comment

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

@locks This one I wasn't completely sure because of this Ember.Test.adapter = ADAPTER. Maybe that's the reason why CI complains. Should I revert it? or is it safe to remove the const ADAPTER and the check if (Ember.Test)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Really updating live source code is not really the scope of #15723 and I'd be fine just updating inline docs here (and possibly assert/error messages).

@locks locks requested a review from rwjblue January 22, 2018 13:18
@@ -20,7 +22,7 @@ QUnit.module('error_handler', {
Ember.testing = TESTING;
window.onerror = WINDOW_ONERROR;
if (Ember.Test) {
Ember.Test.adapter = ADAPTER;
TestAdapter = ADAPTER;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe imported variables are treated as const and you can't assign to them like this.

@@ -200,8 +200,10 @@ Object.defineProperty(Ember, 'LOG_BINDINGS', {
and reporting code.
Copy link
Contributor

Choose a reason for hiding this comment

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

line 390 refers to Ember.String.loc. Those types of refernces are what we are looking to update to String.loc

@toddjordan
Copy link
Contributor

As per your question, only mappings detailed here https://github.com/ember-cli/ember-rfc176-data/blob/master/mappings.json
should be converted

@MarcoUmpierrez
Copy link
Contributor Author

Thanks for your review @toddjordan! I've made the corrections according to your comments. I couldn't replace Ember.inject.servicethough because in Travis I got the following error for Edge, Safari and IE:

        Log: |
            { type: 'error',
              text: 'Could not find module @ember/service required by: 
              ember/tests/routing/query_params_test/shared_state_test at 
              http://127.0.0.1:7774/8786/dist/ember.debug.js, line 21\n' }

Here is the link to the failed build in Travis.

@toddjordan
Copy link
Contributor

@MarcoUmpierrez Great! I think this is good as is. Like I mentioned I'm fine not changing any prod imports with this pr and sticking with the inline docs (and some messages).

The last thing I'd ask if is if you could use git to squash the commits into one and prepend the commit comment with [doc beta], so we know to make sure your updates get into 3.0 ❤️

Let me know if you need help with this.

@MarcoUmpierrez
Copy link
Contributor Author

@toddjordan done!

@toddjordan toddjordan dismissed locks’s stale review January 30, 2018 06:07

CI has been addressed

@toddjordan
Copy link
Contributor

Thanks @MarcoUmpierrez !!

@toddjordan toddjordan merged commit ef841e6 into emberjs:master Jan 30, 2018
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.

3 participants