🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

create-email

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-email - npm Package Compare versions

Comparing version

to
1.0.3

src/index.spec.ts

6

CHANGELOG.md
# create-email
## 1.0.3
### Patch Changes
- 0c4d4dd: fix undefined behavior when template has already been created, fix error on tree when using custom project name
## 1.0.2

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

6

package.json
{
"name": "create-email",
"version": "1.0.2",
"version": "1.0.3",
"description": "The easiest way to get started with React Email",

@@ -30,4 +30,8 @@ "main": "src/index.js",

"devDependencies": {
"typescript": "5.8.2",
"tsconfig": "0.0.0"
},
"scripts": {
"test": "vitest run"
}
}

@@ -12,4 +12,2 @@ #!/usr/bin/env node

const init = async (name) => {
const spinner = ora('Preparing files...\n').start();
let projectPath = name;

@@ -29,2 +27,11 @@

if (fse.existsSync(resolvedProjectPath)) {
console.error(`Project called ${projectPath} already exists!`);
process.exit(1);
}
const spinner = ora({
text: 'Preparing files...\n',
}).start();
fse.copySync(templatePath, resolvedProjectPath, {

@@ -65,3 +72,9 @@ recursive: true,

// eslint-disable-next-line no-console
console.log(await tree('./react-email-starter', 4));
console.info(
await tree(resolvedProjectPath, 4, (dirent) => {
return !path
.join(dirent.parentPath, dirent.name)
.includes('node_modules');
}),
);
};

@@ -68,0 +81,0 @@

11

src/tree.js

@@ -15,3 +15,3 @@ // copied from packages/react-email/src/cli/utils/tree.ts

const getTreeLines = async (dirPath, depth, currentDepth = 0) => {
const getTreeLines = async (dirPath, depth, filter, currentDepth = 0) => {
const base = process.cwd();

@@ -48,2 +48,6 @@ const dirFullpath = path.resolve(base, dirPath);

if (filter?.(dirent) === false) {
continue;
}
if (dirent.isFile()) {

@@ -56,2 +60,3 @@ lines.push(`${branchingSymbol}${dirent.name}`);

depth,
filter,
currentDepth + 1,

@@ -73,5 +78,5 @@ );

export const tree = async (dirPath, depth) => {
const lines = await getTreeLines(dirPath, depth);
export const tree = async (dirPath, depth, filter) => {
const lines = await getTreeLines(dirPath, depth, filter);
return lines.join(os.EOL);
};
{
"name": "react-email-starter",
"version": "1.0.2",
"version": "1.0.3",
"private": true,

@@ -11,3 +11,3 @@ "scripts": {

"dependencies": {
"@react-email/components": "workspace:0.0.34",
"@react-email/components": "workspace:0.0.35",
"react-dom": "19.0.0",

@@ -19,4 +19,4 @@ "react": "19.0.0"

"@types/react-dom": "19.0.1",
"react-email": "workspace:4.0.2"
"react-email": "workspace:4.0.3"
}
}
{
"extends": "tsconfig/react-library.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"extends": "tsconfig/base.json",
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["dist", "build", "node_modules", ".test"],
"compilerOptions": {
"noEmit": true
}
}