You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-email

Package Overview
Dependencies
Maintainers
3
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-email - npm Package Compare versions

Comparing version

to
4.2.3

6

CHANGELOG.md
# react-email
## 4.2.3
### Patch Changes
- 8259eeb: fix files with extension-like suffixes (i.e. config, .spec) breaking dependency graph
## 4.2.2

@@ -4,0 +10,0 @@

16

dist/index.js

@@ -109,3 +109,3 @@ #!/usr/bin/env node

name: "react-email",
version: "4.2.2",
version: "4.2.3",
description: "A live preview of your emails right in your browser.",

@@ -560,5 +560,6 @@ bin: {

};
var javascriptExtensions = [".js", ".ts", ".jsx", ".tsx", ".mjs", ".cjs"];
var isJavascriptModule = (filePath) => {
const extensionName = path5.extname(filePath);
return [".js", ".ts", ".jsx", ".tsx", ".mjs", ".cjs"].includes(extensionName);
return javascriptExtensions.includes(extensionName);
};

@@ -639,7 +640,12 @@ var checkFileExtensionsUntilItExists = (pathWithoutExtension) => {

const pathWithEnsuredExtension = (() => {
if (extension.length > 0 && existsSync(pathToDependencyFromDirectory)) {
return pathToDependencyFromDirectory;
if (extension.length > 0 && javascriptExtensions.includes(extension)) {
if (existsSync(pathToDependencyFromDirectory)) {
return pathToDependencyFromDirectory;
}
return checkFileExtensionsUntilItExists(
pathToDependencyFromDirectory.replace(extension, "")
);
}
return checkFileExtensionsUntilItExists(
pathToDependencyFromDirectory.replace(extension, "")
pathToDependencyFromDirectory
);

@@ -646,0 +652,0 @@ })();

{
"name": "react-email",
"version": "4.2.2",
"version": "4.2.3",
"description": "A live preview of your emails right in your browser.",

@@ -5,0 +5,0 @@ "bin": {

@@ -37,6 +37,8 @@ import { existsSync, promises as fs, statSync } from 'node:fs';

const javascriptExtensions = ['.js', '.ts', '.jsx', '.tsx', '.mjs', '.cjs'];
const isJavascriptModule = (filePath: string) => {
const extensionName = path.extname(filePath);
return ['.js', '.ts', '.jsx', '.tsx', '.mjs', '.cjs'].includes(extensionName);
return javascriptExtensions.includes(extensionName);
};

@@ -148,8 +150,13 @@

extension.length > 0 &&
existsSync(pathToDependencyFromDirectory)
javascriptExtensions.includes(extension)
) {
return pathToDependencyFromDirectory;
if (existsSync(pathToDependencyFromDirectory)) {
return pathToDependencyFromDirectory;
}
return checkFileExtensionsUntilItExists(
pathToDependencyFromDirectory.replace(extension, ''),
);
}
return checkFileExtensionsUntilItExists(
pathToDependencyFromDirectory.replace(extension, ''),
pathToDependencyFromDirectory,
);

@@ -156,0 +163,0 @@ })();