Skip to content

Commit

Permalink
support NullVoxPopuli/ember-cli-update-codemods-manifest/add-no-impli…
Browse files Browse the repository at this point in the history
…cit-this
  • Loading branch information
Kelly Selden committed Oct 10, 2019
1 parent 182d50f commit ed352c4
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ All blueprints are up-to-date!`;
statsOnly,
listCodemods,
runCodemods,
codemodsUrl: 'https://raw.githubusercontent.com/ember-cli/ember-cli-update-codemods-manifest/v3/manifest.json',
codemodsUrl: 'https://raw.githubusercontent.com/ember-cli/ember-cli-update-codemods-manifest/ember-no-implicit-this-codemod/manifest.json',
createCustomDiff,
ignoredFiles: [await getBlueprintFilePath(cwd)],
wasRunAsExecutable
Expand Down
18 changes: 14 additions & 4 deletions test/acceptance/ember-cli-update-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,14 @@ describe(function() {
} = await merge({
fixturesPath: 'test/fixtures/codemod/local',
commitMessage: 'my-app',
runCodemods: true
runCodemods: true,
async beforeMerge() {
await run('npm install', { cwd: tmpPath });
}
});

ps.stdout.pipe(process.stdout);

ps.stdout.on('data', data => {
let str = data.toString();
if (str.includes('These codemods apply to your project.')) {
Expand All @@ -160,9 +165,17 @@ describe(function() {
status
} = await promise;

assertNoUnstaged(status);
assertCodemodRan(status);

await fs.remove(path.join(tmpPath, 'package-lock.json'));

// file is indeterminent between OS's, so ignore
await fs.remove(path.join(tmpPath, 'MODULE_REPORT.md'));

// remove dist and node_modules before fixture compare
await run('git clean -fdX', { cwd: tmpPath });

let mergeFixtures = 'test/fixtures/codemod/latest-node/my-app';
if (process.env.NODE_LTS) {
mergeFixtures = 'test/fixtures/codemod/min-node/my-app';
Expand All @@ -171,9 +184,6 @@ describe(function() {
fixtureCompare({
mergeFixtures
});

assertNoUnstaged(status);
assertCodemodRan(status);
});

it('scopes to sub dir if run from there', async function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Ember from 'ember';
import { assign } from '@ember/polyfills';

export default Controller.extend({
controllerProperty: "test",

actions: {
foo(object) {
this.doStuff(object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<WelcomePage />
{{!-- Feel free to remove this! --}}

{{this.controllerProperty}}

{{outlet}}
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import Ember from 'ember';
import { merge } from '@ember/polyfills';

export default Ember.Controller.extend({
controllerProperty: "test",

actions: {
foo(object) {
Ember.propertyWillChange(object, 'someProperty');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<WelcomePage />
{{!-- Feel free to remove this! --}}

{{controllerProperty}}

{{outlet}}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Ember from 'ember';
import { assign } from '@ember/polyfills';

export default Controller.extend({
controllerProperty: "test",

actions: {
foo(object) {
this.doStuff(object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<WelcomePage />
{{!-- Feel free to remove this! --}}

{{this.controllerProperty}}

{{outlet}}
Empty file.

0 comments on commit ed352c4

Please sign in to comment.