Skip to content

Commit

Permalink
Fix import with wrong extension (#15952)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo authored Sep 12, 2023
1 parent 5671333 commit 04a4ee3
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -174,6 +174,7 @@ module.exports = [
"@babel/development/no-deprecated-clone": "error",
"guard-for-in": "error",
"import/extensions": ["error", "ignorePackages"],
"import/no-unresolved": "error",
},
},
...compat.extends("plugin:jest/recommended").map(config => {
@@ -225,6 +226,7 @@ module.exports = [
{ version: "12.17.0", ignores: ["modules"] },
],
"@babel/development-internal/require-default-import-fallback": "error",
"import/no-unresolved": "error",
},
},
{
@@ -269,6 +271,7 @@ module.exports = [
"comma-dangle": "off",
"no-func-assign": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
},
},
{
2 changes: 1 addition & 1 deletion packages/babel-core/src/config/files/plugins.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import { isAsync } from "../../gensync-utils/async.ts";
import loadCodeDefault, { supportsESM } from "./module-types.ts";
import { fileURLToPath, pathToFileURL } from "url";

import { resolve as importMetaResolve } from "../../vendor/import-meta-resolve.ts";
import { resolve as importMetaResolve } from "../../vendor/import-meta-resolve.js";

import { createRequire } from "module";
const require = createRequire(import.meta.url);
1 change: 1 addition & 0 deletions packages/babel-node/src/babel-node.ts
Original file line number Diff line number Diff line change
@@ -84,6 +84,7 @@ getV8Flags(async function (err, v8Flags) {
}

try {
// eslint-disable-next-line import/no-unresolved
const { default: kexec } = await import("kexec");
kexec(process.argv[0], args);
} catch (err) {
1 change: 1 addition & 0 deletions scripts/get-artifact-files.sh
Original file line number Diff line number Diff line change
@@ -13,5 +13,6 @@ find . \
-o -type f -path "./packages/babel-runtime/*" -name "*.js" \
-o -type f -path "./packages/babel-runtime-corejs2/*" -name "*.js" \
-o -type f -path "./packages/babel-runtime-corejs3/*" -name "*.js" \
-o -type f -path "./packages/babel-core/src/vendor/*" -name "*.js" \
\) \
-print0

0 comments on commit 04a4ee3

Please sign in to comment.