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 Aug 24, 2019
1 parent b13eda7 commit fd7d265
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"src"
],
"dependencies": {
"boilerplate-update": "0.25.1",
"boilerplate-update": "0.26.0",
"debug": "^4.1.1",
"fs-extra": "^8.0.0",
"inquirer": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = async function emberCliUpdate({
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: ['ember-cli-update.json'],
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 @@ -135,9 +135,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 @@ -149,9 +154,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 @@ -160,9 +173,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
@@ -1,4 +1,5 @@
import Controller from '@ember/controller';

export default Controller.extend({
controllerProperty: "test"
});
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
@@ -1,4 +1,5 @@
import Ember from 'ember';

export default Ember.Controller.extend({
controllerProperty: "test"
});
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
@@ -1,4 +1,5 @@
import Controller from '@ember/controller';

export default Controller.extend({
controllerProperty: "test"
});
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 fd7d265

Please sign in to comment.