Skip to content

Commit

Permalink
Re-run prettier to correct invalid configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Mar 30, 2018
1 parent 27e6116 commit 75c13f8
Show file tree
Hide file tree
Showing 570 changed files with 8,884 additions and 19,281 deletions.
10 changes: 4 additions & 6 deletions bin/build-for-publishing.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function updatePackageJSONVersion() {
pkg._originalVersion = pkg.version;
pkg.version = VERSION;
fs.writeFileSync(packageJSONPath, JSON.stringify(pkg, null, 2), {
encoding: 'utf-8'
encoding: 'utf-8',
});
}

Expand All @@ -46,7 +46,7 @@ function updateDocumentationVersion() {
let docs = JSON.parse(contents);
docs.project.version = VERSION;
fs.writeFileSync(docsPath, JSON.stringify(docs, null, 2), {
encoding: 'utf-8'
encoding: 'utf-8',
});
}

Expand All @@ -72,12 +72,10 @@ Promise.resolve()
version: VERSION,
buildType: process.env.BUILD_TYPE,
SHA: process.env.TRAVIS_COMMIT,
assetPath: `/${process.env.BUILD_TYPE}/shas/${
process.env.TRAVIS_COMMIT
}.tgz`
assetPath: `/${process.env.BUILD_TYPE}/shas/${process.env.TRAVIS_COMMIT}.tgz`,
};
fs.writeFileSync('build-metadata.json', JSON.stringify(metadata, null, 2), {
encoding: 'utf-8'
encoding: 'utf-8',
});

// using npm pack here because `yarn pack` does not honor the `package.json`'s `files`
Expand Down
7 changes: 2 additions & 5 deletions bin/publish_to_s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
// ./bin/publish_to_s3.js
// ```
var S3Publisher = require('ember-publisher');
var configPath = require('path').join(
__dirname,
'../config/s3ProjectConfig.js'
);
var configPath = require('path').join(__dirname, '../config/s3ProjectConfig.js');

var publisher = new S3Publisher({ projectConfigPath: configPath });

Expand All @@ -27,7 +24,7 @@ publisher.currentBranch = function() {
master: 'canary',
beta: 'beta',
release: 'release',
'lts-2-4': 'lts-2-4'
'lts-2-4': 'lts-2-4',
}[this.CURRENT_BRANCH]
);
};
Expand Down
2 changes: 1 addition & 1 deletion bin/run-browserstack-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RSVP.resolve()
'--host',
'127.0.0.1',
'--port',
'7774'
'7774',
]);
})
.finally(function() {
Expand Down
24 changes: 6 additions & 18 deletions bin/run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ function runInBrowser(url, retries, resolve, reject) {
response += ', ';
}

response +=
'expected: ' +
details.expected +
', but was: ' +
details.actual;
response += 'expected: ' + details.expected + ', but was: ' + details.actual;
}

if (details.source) {
Expand Down Expand Up @@ -143,7 +139,7 @@ function runInBrowser(url, retries, resolve, reject) {
if (typeof window.callPhantom === 'function') {
window.callPhantom({
name: 'QUnit.done',
data: result
data: result,
});
}
});
Expand All @@ -156,9 +152,7 @@ function runInBrowser(url, retries, resolve, reject) {
var failed = !result || !result.total || result.failed;

if (!result.total) {
console.error(
'No tests were executed. Are you loading tests asynchronously?'
);
console.error('No tests were executed. Are you loading tests asynchronously?');
}

var code = failed ? 1 : 0;
Expand All @@ -175,9 +169,7 @@ function runInBrowser(url, retries, resolve, reject) {
} else {
console.log(chalk.red('Giving up! (╯°□°)╯︵ ┻━┻'));
console.log(
chalk.yellow(
'This might be a known issue with Chrome headless, skipping for now'
)
chalk.yellow('This might be a known issue with Chrome headless, skipping for now')
);
resolve(result);
}
Expand Down Expand Up @@ -276,12 +268,8 @@ function runChecker(bin, args) {
function codeQualityChecks() {
var checkers = [
runChecker('node', [require.resolve('typescript/bin/tsc'), '--noEmit']),
runChecker('node', [
require.resolve('tslint/bin/tslint'),
'-p',
'tsconfig.json'
]),
runChecker('node', [require.resolve('eslint/bin/eslint'), '.'])
runChecker('node', [require.resolve('tslint/bin/tslint'), '-p', 'tsconfig.json']),
runChecker('node', [require.resolve('eslint/bin/eslint'), '.']),
];
return RSVP.Promise.all(checkers).then(function(results) {
results.forEach(result => {
Expand Down
2 changes: 1 addition & 1 deletion bin/run-travis-browser-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RSVP.resolve()
'--file',
'testem.travis-browsers.js',
'--port',
'7000'
'7000',
]);
})
.catch(function(error) {
Expand Down
6 changes: 2 additions & 4 deletions bin/yarn-link-glimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ const child_process = require('child_process');
const yarnConfig = JSON.parse(
JSON.parse(
require('child_process').execSync('yarn --json config current', {
encoding: 'utf8'
encoding: 'utf8',
})
).data
);
const linkedModules = yarnConfig.linkedModules.filter(m =>
m.startsWith('@glimmer/')
);
const linkedModules = yarnConfig.linkedModules.filter(m => m.startsWith('@glimmer/'));

linkedModules.forEach(mod => {
child_process.execSync(`yarn link "${mod}"`);
Expand Down
6 changes: 2 additions & 4 deletions bin/yarn-unlink-glimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ const child_process = require('child_process');
const yarnConfig = JSON.parse(
JSON.parse(
require('child_process').execSync('yarn --json config current', {
encoding: 'utf8'
encoding: 'utf8',
})
).data
);
const linkedModules = yarnConfig.linkedModules.filter(m =>
m.startsWith('@glimmer/')
);
const linkedModules = yarnConfig.linkedModules.filter(m => m.startsWith('@glimmer/'));

linkedModules.forEach(mod => {
child_process.execSync(`yarn unlink "${mod}"`);
Expand Down
18 changes: 6 additions & 12 deletions blueprints/-addon-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,29 @@ module.exports = {
return path.join('lib', options.inRepoAddon, 'app');
}
return 'app';
}
},
};
},

locals: function(options) {
var addonRawName = options.inRepoAddon
? options.inRepoAddon
: options.project.name();
var addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name();
var addonName = stringUtil.dasherize(addonRawName);
var fileName = stringUtil.dasherize(options.entity.name);
var blueprintName = options.originBlueprintName;
var modulePathSegments = [
addonName,
inflector.pluralize(options.originBlueprintName),
fileName
fileName,
];

if (blueprintName.match(/-addon/)) {
blueprintName = blueprintName.substr(0, blueprintName.indexOf('-addon'));
modulePathSegments = [
addonName,
inflector.pluralize(blueprintName),
fileName
];
modulePathSegments = [addonName, inflector.pluralize(blueprintName), fileName];
}

return {
modulePath: modulePathSegments.join('/'),
blueprintName: blueprintName
blueprintName: blueprintName,
};
}
},
};
12 changes: 4 additions & 8 deletions blueprints/acceptance-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ module.exports = useTestFrameworkDetector({
let testFolderRoot = stringUtils.dasherize(options.project.name());

if (options.project.isEmberCLIAddon()) {
testFolderRoot = pathUtil.getRelativeParentPath(
options.entity.name,
-1,
false
);
testFolderRoot = pathUtil.getRelativeParentPath(options.entity.name, -1, false);
}

let destroyAppExists = fs.existsSync(
Expand All @@ -27,13 +23,13 @@ module.exports = useTestFrameworkDetector({

let friendlyTestName = [
'Acceptance',
stringUtils.dasherize(options.entity.name).replace(/[-]/g, ' ')
stringUtils.dasherize(options.entity.name).replace(/[-]/g, ' '),
].join(' | ');

return {
testFolderRoot: testFolderRoot,
friendlyTestName,
destroyAppExists
destroyAppExists,
};
}
},
});
20 changes: 6 additions & 14 deletions blueprints/component-addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ module.exports = {
return {
__path__: function(options) {
if (options.pod) {
return path.join(
options.podPath,
options.locals.path,
options.dasherizedModuleName
);
return path.join(options.podPath, options.locals.path, options.dasherizedModuleName);
}
return 'components';
},
Expand All @@ -32,7 +28,7 @@ module.exports = {
return path.join('lib', options.inRepoAddon, 'app');
}
return 'app';
}
},
};
},

Expand All @@ -43,22 +39,18 @@ module.exports = {
},

locals: function(options) {
let addonRawName = options.inRepoAddon
? options.inRepoAddon
: options.project.name();
let addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name();
let addonName = stringUtil.dasherize(addonRawName);
let fileName = stringUtil.dasherize(options.entity.name);
let importPathName = [addonName, 'components', fileName].join('/');

if (options.pod) {
importPathName = [addonName, 'components', fileName, 'component'].join(
'/'
);
importPathName = [addonName, 'components', fileName, 'component'].join('/');
}

return {
modulePath: importPathName,
path: getPathOption(options)
path: getPathOption(options),
};
}
},
};
31 changes: 12 additions & 19 deletions blueprints/component-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const isPackageMissing = require('ember-cli-is-package-missing');
const getPathOption = require('ember-cli-get-component-path-option');

const useTestFrameworkDetector = require('../test-framework-detector');
const isModuleUnificationProject = require('../module-unification')
.isModuleUnificationProject;
const isModuleUnificationProject = require('../module-unification').isModuleUnificationProject;

module.exports = useTestFrameworkDetector({
description: 'Generates a component integration or unit test.',
Expand All @@ -21,9 +20,9 @@ module.exports = useTestFrameworkDetector({
{ i: 'integration' },
{ u: 'unit' },
{ integration: 'integration' },
{ unit: 'unit' }
]
}
{ unit: 'unit' },
],
},
],

fileMapTokens: function() {
Expand All @@ -50,7 +49,7 @@ module.exports = useTestFrameworkDetector({
throw "Pods aren't supported within a module unification app";
}
return path.join('ui', 'components', options.dasherizedModuleName);
}
},
};
} else {
return {
Expand All @@ -62,14 +61,10 @@ module.exports = useTestFrameworkDetector({
},
__path__(options) {
if (options.pod) {
return path.join(
options.podPath,
options.locals.path,
options.dasherizedModuleName
);
return path.join(options.podPath, options.locals.path, options.dasherizedModuleName);
}
return 'components';
}
},
};
}
},
Expand All @@ -82,13 +77,11 @@ module.exports = useTestFrameworkDetector({
let friendlyTestDescription = [
testType === 'unit' ? 'Unit' : 'Integration',
'Component',
dasherizedModuleName
dasherizedModuleName,
].join(' | ');

if (options.pod && options.path !== 'components' && options.path !== '') {
componentPathName = [options.path, dasherizedModuleName]
.filter(Boolean)
.join('/');
componentPathName = [options.path, dasherizedModuleName].filter(Boolean).join('/');
} else if (isModuleUnificationProject(this.project)) {
if (options.inRepoAddon) {
componentPathName = `${options.inRepoAddon}::${dasherizedModuleName}`;
Expand All @@ -101,7 +94,7 @@ module.exports = useTestFrameworkDetector({
path: getPathOption(options),
testType: testType,
componentPathName: componentPathName,
friendlyTestDescription: friendlyTestDescription
friendlyTestDescription: friendlyTestDescription,
};
},

Expand All @@ -112,8 +105,8 @@ module.exports = useTestFrameworkDetector({
isPackageMissing(this, 'ember-cli-htmlbars-inline-precompile')
) {
return this.addPackagesToProject([
{ name: 'ember-cli-htmlbars-inline-precompile', target: '^0.3.1' }
{ name: 'ember-cli-htmlbars-inline-precompile', target: '^0.3.1' },
]);
}
}
},
});
Loading

0 comments on commit 75c13f8

Please sign in to comment.