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

WIP support NullVoxPopuli/ember-cli-update-codemods-manifest/add-no-implicit-this #638

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,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 @@ -4,6 +4,8 @@ import { assign } from '@ember/polyfills';
import { map } from '@ember/object/computed';

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

fullName: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
}),
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 @@ -3,6 +3,8 @@ import { merge } from '@ember/polyfills';
import { map } from '@ember/object/computed';

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

fullName: computed(function() {
return `${this.firstName} ${this.lastName}`;
}).property('firstName', 'lastName'),
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 @@ -4,6 +4,8 @@ import { assign } from '@ember/polyfills';
import { map } from '@ember/object/computed';

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

fullName: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
}),
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.