create-esmx 3.0.0-rc.77 → 3.0.0-rc.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.integration.test.mjs +1 -2
- package/dist/cli.mjs +1 -1
- package/dist/template.mjs +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/project-name.test.mjs +3 -3
- package/package.json +7 -7
- package/src/cli.integration.test.ts +1 -2
- package/src/cli.ts +1 -1
- package/src/template.ts +1 -1
- package/src/utils/index.ts +2 -2
- package/src/utils/package-manager.test.ts +1 -1
- package/src/utils/project-name.test.ts +4 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
2
|
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
4
3
|
import { tmpdir } from "node:os";
|
|
5
4
|
import { join } from "node:path";
|
package/dist/cli.mjs
CHANGED
|
@@ -52,7 +52,7 @@ async function getProjectName(argName, positionalName) {
|
|
|
52
52
|
if (!value.trim()) {
|
|
53
53
|
return "Project name or path is required";
|
|
54
54
|
}
|
|
55
|
-
if (!/^[a-zA-Z0-9_
|
|
55
|
+
if (!/^[a-zA-Z0-9_./@-]+$/.test(value.trim())) {
|
|
56
56
|
return "Project name or path should only contain letters, numbers, hyphens, underscores, dots, and slashes";
|
|
57
57
|
}
|
|
58
58
|
}
|
package/dist/template.mjs
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -191,7 +191,7 @@ describe("project-name utilities", () => {
|
|
|
191
191
|
const cwd = "D:\\workspace";
|
|
192
192
|
const result = formatProjectName(input, cwd);
|
|
193
193
|
expect(result.name).toBe("my-app");
|
|
194
|
-
expect(result.root).toMatch(/projects[
|
|
194
|
+
expect(result.root).toMatch(/projects[\\/]my-app/);
|
|
195
195
|
}
|
|
196
196
|
);
|
|
197
197
|
it.runIf(isWindows)("should handle Windows UNC paths", () => {
|
|
@@ -215,7 +215,7 @@ describe("project-name utilities", () => {
|
|
|
215
215
|
const cwd = "C:\\workspace";
|
|
216
216
|
const result = formatProjectName(input, cwd);
|
|
217
217
|
expect(result.name).toBe("bar");
|
|
218
|
-
expect(result.root).toMatch(/workspace[
|
|
218
|
+
expect(result.root).toMatch(/workspace[\\/]foo[\\/]bar/);
|
|
219
219
|
}
|
|
220
220
|
);
|
|
221
221
|
it.runIf(isWindows)(
|
|
@@ -225,7 +225,7 @@ describe("project-name utilities", () => {
|
|
|
225
225
|
const cwd = "C:\\workspace";
|
|
226
226
|
const result = formatProjectName(input, cwd);
|
|
227
227
|
expect(result.name).toBe("bar");
|
|
228
|
-
expect(result.root).toMatch(/workspace[
|
|
228
|
+
expect(result.root).toMatch(/workspace[\\/]foo[\\/]bar/);
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
231
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-esmx",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.79",
|
|
4
4
|
"description": "A scaffold tool for creating Esmx projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"picocolors": "^1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@biomejs/biome": "
|
|
27
|
-
"@esmx/core": "3.0.0-rc.
|
|
28
|
-
"@esmx/rspack": "3.0.0-rc.
|
|
29
|
-
"@esmx/rspack-vue": "3.0.0-rc.
|
|
26
|
+
"@biomejs/biome": "2.3.7",
|
|
27
|
+
"@esmx/core": "3.0.0-rc.79",
|
|
28
|
+
"@esmx/rspack": "3.0.0-rc.79",
|
|
29
|
+
"@esmx/rspack-vue": "3.0.0-rc.79",
|
|
30
30
|
"@types/minimist": "^1.2.5",
|
|
31
|
-
"@types/node": "^24.
|
|
31
|
+
"@types/node": "^24.0.0",
|
|
32
32
|
"@vitest/coverage-v8": "3.2.4",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"unbuild": "3.6.1",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"url": "https://github.com/esmnext/esmx/issues"
|
|
71
71
|
},
|
|
72
72
|
"homepage": "https://github.com/esmnext/esmx#readme",
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "29c95da5062140daffe10ba135ba66bae6e65fc6"
|
|
74
74
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
2
|
-
import { readFileSync } from 'node:fs';
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
2
|
import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
4
3
|
import { tmpdir } from 'node:os';
|
|
5
4
|
import { join } from 'node:path';
|
package/src/cli.ts
CHANGED
|
@@ -68,7 +68,7 @@ async function getProjectName(
|
|
|
68
68
|
if (!value.trim()) {
|
|
69
69
|
return 'Project name or path is required';
|
|
70
70
|
}
|
|
71
|
-
if (!/^[a-zA-Z0-9_
|
|
71
|
+
if (!/^[a-zA-Z0-9_./@-]+$/.test(value.trim())) {
|
|
72
72
|
return 'Project name or path should only contain letters, numbers, hyphens, underscores, dots, and slashes';
|
|
73
73
|
}
|
|
74
74
|
}
|
package/src/template.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
6
|
-
import { getCommand } from './package-manager';
|
|
7
6
|
import type { CommandType } from './package-manager';
|
|
7
|
+
import { getCommand } from './package-manager';
|
|
8
8
|
|
|
9
9
|
describe('package-manager utilities', () => {
|
|
10
10
|
// Store original environment variable
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { formatProjectName } from './project-name';
|
|
3
2
|
import type { ProjectNameResult } from './project-name';
|
|
3
|
+
import { formatProjectName } from './project-name';
|
|
4
4
|
|
|
5
5
|
const isWindows = process.platform === 'win32';
|
|
6
6
|
const isUnix = !isWindows;
|
|
@@ -256,7 +256,7 @@ describe('project-name utilities', () => {
|
|
|
256
256
|
const result: ProjectNameResult = formatProjectName(input, cwd);
|
|
257
257
|
|
|
258
258
|
expect(result.name).toBe('my-app');
|
|
259
|
-
expect(result.root).toMatch(/projects[
|
|
259
|
+
expect(result.root).toMatch(/projects[\\/]my-app/);
|
|
260
260
|
}
|
|
261
261
|
);
|
|
262
262
|
|
|
@@ -289,7 +289,7 @@ describe('project-name utilities', () => {
|
|
|
289
289
|
const result: ProjectNameResult = formatProjectName(input, cwd);
|
|
290
290
|
|
|
291
291
|
expect(result.name).toBe('bar');
|
|
292
|
-
expect(result.root).toMatch(/workspace[
|
|
292
|
+
expect(result.root).toMatch(/workspace[\\/]foo[\\/]bar/);
|
|
293
293
|
}
|
|
294
294
|
);
|
|
295
295
|
|
|
@@ -302,7 +302,7 @@ describe('project-name utilities', () => {
|
|
|
302
302
|
const result: ProjectNameResult = formatProjectName(input, cwd);
|
|
303
303
|
|
|
304
304
|
expect(result.name).toBe('bar');
|
|
305
|
-
expect(result.root).toMatch(/workspace[
|
|
305
|
+
expect(result.root).toMatch(/workspace[\\/]foo[\\/]bar/);
|
|
306
306
|
}
|
|
307
307
|
);
|
|
308
308
|
});
|