Update all source files to match expected Prettier formatting

This commit is contained in:
James M. Greene
2022-08-05 15:26:05 -05:00
parent e22fa7ebed
commit 5c1535b807
11 changed files with 60 additions and 108 deletions

40
dist/index.js vendored
View File

@@ -14559,7 +14559,7 @@ class ConfigParser {
// Ctor
// - configurationFile: path to the configuration file
// - blankConfigurationFile: a blank configuration file to use if non was previously found
constructor({configurationFile, blankConfigurationFile, properties}) {
constructor({ configurationFile, blankConfigurationFile, properties }) {
// Save field
this.configurationFile = configurationFile
this.properties = properties
@@ -14585,9 +14585,7 @@ class ConfigParser {
findConfigurationObject(ast) {
// Try to find a default export
var defaultExport = ast.body.find(
node =>
node.type === 'ExportDefaultDeclaration' &&
node.declaration.type === 'ObjectExpression'
node => node.type === 'ExportDefaultDeclaration' && node.declaration.type === 'ObjectExpression'
)
if (defaultExport) {
core.info('Found configuration object in default export declaration')
@@ -14608,19 +14606,13 @@ class ConfigParser {
)
// Direct module export
if (
moduleExport &&
moduleExport.expression.right.type === 'ObjectExpression'
) {
if (moduleExport && moduleExport.expression.right.type === 'ObjectExpression') {
core.info('Found configuration object in direct module export')
return moduleExport.expression.right
}
// Indirect module export
else if (
moduleExport &&
moduleExport.expression.right.type === 'Identifier'
) {
else if (moduleExport && moduleExport.expression.right.type === 'Identifier') {
const identifierName = moduleExport && moduleExport.expression.right.name
const identifierDefinition = ast.body.find(
node =>
@@ -14648,9 +14640,7 @@ class ConfigParser {
// Try to find a property matching a given name
const property =
object.type === 'ObjectExpression' &&
object.properties.find(
node => node.key.type === 'Identifier' && node.key.name === name
)
object.properties.find(node => node.key.type === 'Identifier' && node.key.name === name)
// Return the property's value (if found) or null
if (property) {
@@ -14670,9 +14660,7 @@ class ConfigParser {
return `${properties[startIndex]}: ${JSON.stringify(propertyValue)}`
} else {
return (
`${properties[startIndex]}: {` +
this.getPropertyDeclaration(properties, startIndex + 1, propertyValue) +
'}'
`${properties[startIndex]}: {` + this.getPropertyDeclaration(properties, startIndex + 1, propertyValue) + '}'
)
}
}
@@ -14750,11 +14738,7 @@ class ConfigParser {
// Create nested properties in the configuration file
else {
// Build the declaration to inject
const declaration = this.getPropertyDeclaration(
properties,
depth,
propertyValue
)
const declaration = this.getPropertyDeclaration(properties, depth, propertyValue)
// The last node identified is an object expression, so do the assignment
if (lastNode.type === 'ObjectExpression') {
@@ -14801,7 +14785,7 @@ class ConfigParser {
}
}
module.exports = {ConfigParser}
module.exports = { ConfigParser }
/***/ }),
@@ -14833,7 +14817,7 @@ function getContext() {
return requiredVars
}
module.exports = {getContext}
module.exports = { getContext }
/***/ }),
@@ -14859,7 +14843,7 @@ module.exports = outputPagesBaseUrl
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
const core = __nccwpck_require__(2186)
const {ConfigParser} = __nccwpck_require__(8395)
const { ConfigParser } = __nccwpck_require__(8395)
// Return the settings to be passed to a {ConfigParser} for a given
// static site generator and a Pages path value to inject
@@ -14911,7 +14895,7 @@ function getConfigParserSettings(staticSiteGenerator, path) {
}
// Inject Pages configuration in a given static site generator's configuration file
function setPagesPath({staticSiteGenerator, path}) {
function setPagesPath({ staticSiteGenerator, path }) {
try {
// Parse the configuration file and try to inject the Pages configuration in it
const settings = getConfigParserSettings(staticSiteGenerator, path)
@@ -14925,7 +14909,7 @@ function setPagesPath({staticSiteGenerator, path}) {
}
}
module.exports = {getConfigParserSettings, setPagesPath}
module.exports = { getConfigParserSettings, setPagesPath }
/***/ }),

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long