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 and Dunqing committed Dec 31, 2024
1 parent d3ba189 commit acb328e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
32 changes: 32 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 3 additions & 0 deletions tasks/transform_conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
"@babel/runtime": "^7.26.0"
},
"dependencies": {
"@babel/plugin-transform-typescript": "^7.26.3"
}
}
14 changes: 13 additions & 1 deletion tasks/transform_conformance/update_fixtures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ const CLASS_PLUGINS = [

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

// These fixtures transform incorrectly by Babel. Haven't figured out why yet.
const IGNORED_FIXTURES = [
'compile-to-class/constructor-collision-ignores-types',
'compile-to-class/constructor-collision-ignores-types-loose'
]

// Copied from `@babel/helper-transform-fixture-test-runner`
const EXTERNAL_HELPERS_VERSION = '7.100.0';

Expand All @@ -53,6 +59,10 @@ for (const packageName of PACKAGES) {
* @returns {undefined}
*/
async function updateDir(dirPath, options, hasChangedOptions) {
if (IGNORED_FIXTURES.some(p => dirPath.endsWith(p))) {
return
}

const files = await readdir(dirPath, { withFileTypes: true });

const dirFiles = [],
Expand Down Expand Up @@ -149,7 +159,7 @@ function ensureAllClassPluginsEnabled(options) {
}
already_enabled.push(pluginName);
}
});
})

if (already_enabled.length) {
CLASS_PLUGINS.forEach(pluginName => {
Expand Down Expand Up @@ -185,6 +195,8 @@ async function transform(inputPath, options) {
delete options.SKIP_ON_PUBLISH;
delete options.SKIP_babel7plugins_babel8core;
delete options.minNodeVersion;
delete options.validateLogs;
delete options.SKIP_ON_PUBLISH;

function prefixName(plugin, type) {
if (Array.isArray(plugin)) {
Expand Down

0 comments on commit acb328e

Please sign in to comment.