@rollup/plugin-node-resolve
Advanced tools
Comparing version 15.0.2 to 15.1.0
@@ -15,3 +15,3 @@ 'use strict'; | ||
var version = "15.0.2"; | ||
var version = "15.1.0"; | ||
var peerDependencies = { | ||
@@ -1094,7 +1094,14 @@ rollup: "^2.78.0||^3.0.0" | ||
// TypeScript files may import '.js' to refer to either '.ts' or '.tsx' | ||
if (importer && importee.endsWith('.js')) { | ||
for (const ext of ['.ts', '.tsx']) { | ||
if (importer.endsWith(ext) && extensions.includes(ext)) { | ||
importSpecifierList.push(importee.replace(/.js$/, ext)); | ||
// TypeScript files may import '.mjs' or '.cjs' to refer to either '.mts' or '.cts'. | ||
// They may also import .js to refer to either .ts or .tsx, and .jsx to refer to .tsx. | ||
if (importer && /\.(ts|mts|cts|tsx)$/.test(importer)) { | ||
for (const [importeeExt, resolvedExt] of [ | ||
['.js', '.ts'], | ||
['.js', '.tsx'], | ||
['.jsx', '.tsx'], | ||
['.mjs', '.mts'], | ||
['.cjs', '.cts'] | ||
]) { | ||
if (importee.endsWith(importeeExt) && extensions.includes(resolvedExt)) { | ||
importSpecifierList.push(importee.slice(0, -importeeExt.length) + resolvedExt); | ||
} | ||
@@ -1101,0 +1108,0 @@ } |
@@ -11,3 +11,3 @@ import path, { dirname, resolve, extname, normalize, sep } from 'path'; | ||
var version = "15.0.2"; | ||
var version = "15.1.0"; | ||
var peerDependencies = { | ||
@@ -1090,7 +1090,14 @@ rollup: "^2.78.0||^3.0.0" | ||
// TypeScript files may import '.js' to refer to either '.ts' or '.tsx' | ||
if (importer && importee.endsWith('.js')) { | ||
for (const ext of ['.ts', '.tsx']) { | ||
if (importer.endsWith(ext) && extensions.includes(ext)) { | ||
importSpecifierList.push(importee.replace(/.js$/, ext)); | ||
// TypeScript files may import '.mjs' or '.cjs' to refer to either '.mts' or '.cts'. | ||
// They may also import .js to refer to either .ts or .tsx, and .jsx to refer to .tsx. | ||
if (importer && /\.(ts|mts|cts|tsx)$/.test(importer)) { | ||
for (const [importeeExt, resolvedExt] of [ | ||
['.js', '.ts'], | ||
['.js', '.tsx'], | ||
['.jsx', '.tsx'], | ||
['.mjs', '.mts'], | ||
['.cjs', '.cts'] | ||
]) { | ||
if (importee.endsWith(importeeExt) && extensions.includes(resolvedExt)) { | ||
importSpecifierList.push(importee.slice(0, -importeeExt.length) + resolvedExt); | ||
} | ||
@@ -1097,0 +1104,0 @@ } |
{ | ||
"name": "@rollup/plugin-node-resolve", | ||
"version": "15.0.2", | ||
"version": "15.1.0", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89449
2334