Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 31, 2024
1 parent 9b060a2 commit 0d1a4e6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tasks/transform_conformance/update_fixtures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ const FILTER_OUT_PLUGINS = [
'transform-destructuring',
];

const CLASS_PLUGINS = ['transform-class-properties', 'transform-private-methods', 'transform-private-property-in-object'];
const CLASS_PLUGINS = [
'transform-class-properties',
'transform-private-methods',
'transform-private-property-in-object',
];

const PACKAGES_PATH = pathJoin(import.meta.dirname, '../coverage/babel/packages');

Expand Down Expand Up @@ -130,7 +134,7 @@ function updateOptions(options) {

// Ensure all class plugins are enabled if any of class related plugins are enabled
function ensureAllClassPluginsEnabled(options) {
let plugins = options.plugins
let plugins = options.plugins;
if (!plugins) return false;

let already_enabled = [];
Expand All @@ -141,16 +145,16 @@ function ensureAllClassPluginsEnabled(options) {
if (Array.isArray(plugin) && plugin[1]) {
// Store options for the plugin, so that we can ensure all plugins are
// enabled with the same options
pluginOptions = plugin[1]
pluginOptions = plugin[1];
}
already_enabled.push(pluginName);
}
})
});

// `transform-class-properties` is already enabled,
// we don't need to enable other class plugins
if (already_enabled.includes(CLASS_PLUGINS[0])) {
return false
return false;
}

if (already_enabled.length) {
Expand All @@ -162,7 +166,7 @@ function ensureAllClassPluginsEnabled(options) {
plugins.push(pluginName);
}
}
})
});
return true;
} else {
return false;
Expand All @@ -188,7 +192,6 @@ async function transform(inputPath, options) {
delete options.validateLogs;
delete options.SKIP_ON_PUBLISH;


function prefixName(plugin, type) {
if (Array.isArray(plugin)) {
plugin = [...plugin];
Expand Down

0 comments on commit 0d1a4e6

Please sign in to comment.