@tsparticles/cli 3.0.10 → 3.0.12
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/.github/workflows/node.js-ci.yml +2 -2
- package/dist/build/build-distfiles.js +3 -3
- package/dist/build/build-tsc.js +1 -0
- package/dist/build/build.js +2 -1
- package/dist/utils/string-utils.js +1 -1
- package/files/empty-project/eslint.config.js +1 -1
- package/files/empty-project/package.json +15 -15
- package/package.json +25 -25
- package/src/build/build-distfiles.ts +5 -3
- package/src/build/build-tsc.ts +2 -0
- package/src/build/build.ts +11 -9
- package/src/tsconfig.json +17 -17
- package/src/utils/string-utils.ts +1 -1
- package/vitest.config.ts +1 -1
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
fetch-depth: 0
|
|
19
19
|
- uses: actions/setup-node@v4
|
|
20
20
|
with:
|
|
21
|
-
node-version: "
|
|
21
|
+
node-version: "24"
|
|
22
22
|
- uses: pnpm/action-setup@v4
|
|
23
23
|
name: Install pnpm
|
|
24
24
|
id: pnpm-install
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
fetch-depth: 0
|
|
57
57
|
- uses: actions/setup-node@v4
|
|
58
58
|
with:
|
|
59
|
-
node-version: "
|
|
59
|
+
node-version: "24"
|
|
60
60
|
- uses: pnpm/action-setup@v3
|
|
61
61
|
name: Install pnpm
|
|
62
62
|
id: pnpm-install
|
|
@@ -11,12 +11,12 @@ export async function buildDistFiles(basePath) {
|
|
|
11
11
|
try {
|
|
12
12
|
const pkgInfo = JSON.parse((await fs.readFile(path.join(basePath, "package.json"))).toString()), libPackage = path.join(basePath, "package.dist.json"), distPath = path.join(basePath, pkgInfo.publishConfig?.directory ?? "dist");
|
|
13
13
|
const data = await fs.readFile(libPackage), text = data.toString(), libObj = JSON.parse(text);
|
|
14
|
-
libObj
|
|
14
|
+
libObj["version"] = pkgInfo.version;
|
|
15
15
|
if (pkgInfo.dependencies) {
|
|
16
|
-
libObj
|
|
16
|
+
libObj["dependencies"] = JSON.parse(JSON.stringify(pkgInfo.dependencies).replaceAll("workspace:", ""));
|
|
17
17
|
}
|
|
18
18
|
else if (pkgInfo.peerDependencies) {
|
|
19
|
-
libObj
|
|
19
|
+
libObj["peerDependencies"] = JSON.parse(JSON.stringify(pkgInfo.peerDependencies).replaceAll("workspace:", ""));
|
|
20
20
|
}
|
|
21
21
|
const jsonIndent = 2;
|
|
22
22
|
await fs.writeFile(libPackage, `${JSON.stringify(libObj, undefined, jsonIndent)}\n`, "utf8");
|
package/dist/build/build-tsc.js
CHANGED
package/dist/build/build.js
CHANGED
|
@@ -12,7 +12,8 @@ buildCommand.option("-p, --prettify", "Prettify the source files", false);
|
|
|
12
12
|
buildCommand.option("-t, --tsc", "Build the library using TypeScript", false);
|
|
13
13
|
buildCommand.argument("[path]", `Path to the project root folder, default is "src"`, "src");
|
|
14
14
|
buildCommand.action(async (argPath) => {
|
|
15
|
-
const opts = buildCommand.opts(), ci = !!opts
|
|
15
|
+
const opts = buildCommand.opts(), ci = !!opts["ci"], all = !!opts["all"] ||
|
|
16
|
+
(!opts["bundle"] && !opts["clean"] && !opts["dist"] && !opts["lint"] && !opts["prettify"] && !opts["tsc"]), doBundle = all || !!opts["bundle"], circularDeps = all || !!opts["circularDeps"], clean = all || !!opts["clean"], distfiles = all || !!opts["dist"], doLint = all || !!opts["lint"], prettier = all || !!opts["prettify"], tsc = all || !!opts["tsc"];
|
|
16
17
|
const basePath = process.cwd(), { getDistStats } = await import("./build-diststats.js"), oldStats = await getDistStats(basePath);
|
|
17
18
|
if (clean) {
|
|
18
19
|
const { clearDist } = await import("./build-clear.js");
|
|
@@ -29,6 +29,6 @@ export function camelize(str, ...splits) {
|
|
|
29
29
|
* @returns the dashed string
|
|
30
30
|
*/
|
|
31
31
|
export function dash(str) {
|
|
32
|
-
const index = 0, dashed = str.replace(/([A-Z])/g, g => `-${g[index]
|
|
32
|
+
const index = 0, dashed = str.replace(/([A-Z])/g, g => `-${g[index]?.toLowerCase() ?? ""}`), startPos = 1;
|
|
33
33
|
return dashed.startsWith("-") ? dashed.substring(startPos) : dashed;
|
|
34
34
|
}
|
|
@@ -83,25 +83,25 @@
|
|
|
83
83
|
"types": "dist/types/index.d.ts",
|
|
84
84
|
"prettier": "@tsparticles/prettier-config",
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@babel/core": "^7.28.
|
|
87
|
-
"@tsparticles/cli": "^3.0.
|
|
88
|
-
"@tsparticles/eslint-config": "^3.0.
|
|
89
|
-
"@tsparticles/prettier-config": "^3.0.
|
|
90
|
-
"@tsparticles/tsconfig": "^3.0.
|
|
91
|
-
"@tsparticles/webpack-plugin": "^3.0.
|
|
86
|
+
"@babel/core": "^7.28.5",
|
|
87
|
+
"@tsparticles/cli": "^3.0.12",
|
|
88
|
+
"@tsparticles/eslint-config": "^3.0.6",
|
|
89
|
+
"@tsparticles/prettier-config": "^3.0.6",
|
|
90
|
+
"@tsparticles/tsconfig": "^3.0.6",
|
|
91
|
+
"@tsparticles/webpack-plugin": "^3.0.6",
|
|
92
92
|
"@types/webpack-env": "^1.18.8",
|
|
93
93
|
"babel-loader": "^10.0.0",
|
|
94
|
-
"browserslist": "^4.
|
|
94
|
+
"browserslist": "^4.28.1",
|
|
95
95
|
"copyfiles": "^2.4.1",
|
|
96
|
-
"eslint": "^9.
|
|
96
|
+
"eslint": "^9.39.2",
|
|
97
97
|
"eslint-config-prettier": "^10.1.8",
|
|
98
|
-
"prettier": "^3.
|
|
99
|
-
"rimraf": "^6.
|
|
100
|
-
"terser-webpack-plugin": "^5.3.
|
|
101
|
-
"typescript": "^5.9.
|
|
102
|
-
"typescript-eslint": "^8.
|
|
103
|
-
"webpack": "^5.
|
|
104
|
-
"webpack-bundle-analyzer": "^
|
|
98
|
+
"prettier": "^3.7.4",
|
|
99
|
+
"rimraf": "^6.1.2",
|
|
100
|
+
"terser-webpack-plugin": "^5.3.16",
|
|
101
|
+
"typescript": "^5.9.3",
|
|
102
|
+
"typescript-eslint": "^8.50.0",
|
|
103
|
+
"webpack": "^5.104.1",
|
|
104
|
+
"webpack-bundle-analyzer": "^5.1.0",
|
|
105
105
|
"webpack-cli": "^6.0.1"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,49 +11,49 @@
|
|
|
11
11
|
},
|
|
12
12
|
"prettier": "@tsparticles/prettier-config",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@tsparticles/eslint-config": "^3.0.
|
|
15
|
-
"@tsparticles/prettier-config": "^3.0.
|
|
16
|
-
"@tsparticles/tsconfig": "^3.0.
|
|
17
|
-
"@tsparticles/webpack-plugin": "^3.0.
|
|
18
|
-
"commander": "^14.0.
|
|
19
|
-
"eslint": "^9.
|
|
14
|
+
"@tsparticles/eslint-config": "^3.0.7",
|
|
15
|
+
"@tsparticles/prettier-config": "^3.0.7",
|
|
16
|
+
"@tsparticles/tsconfig": "^3.0.6",
|
|
17
|
+
"@tsparticles/webpack-plugin": "^3.0.7",
|
|
18
|
+
"commander": "^14.0.2",
|
|
19
|
+
"eslint": "^9.39.2",
|
|
20
20
|
"eslint-config-prettier": "^10.1.8",
|
|
21
|
-
"eslint-plugin-jsdoc": "^
|
|
21
|
+
"eslint-plugin-jsdoc": "^61.5.0",
|
|
22
22
|
"eslint-plugin-prettier": "^5.5.4",
|
|
23
|
-
"eslint-plugin-tsdoc": "^0.
|
|
24
|
-
"fs-extra": "^11.3.
|
|
23
|
+
"eslint-plugin-tsdoc": "^0.5.0",
|
|
24
|
+
"fs-extra": "^11.3.3",
|
|
25
25
|
"klaw": "^4.1.0",
|
|
26
26
|
"lookpath": "^1.2.3",
|
|
27
27
|
"madge": "^8.0.0",
|
|
28
|
-
"path-scurry": "^2.0.
|
|
29
|
-
"prettier": "^3.
|
|
30
|
-
"prettier-plugin-multiline-arrays": "^4.
|
|
28
|
+
"path-scurry": "^2.0.1",
|
|
29
|
+
"prettier": "^3.7.4",
|
|
30
|
+
"prettier-plugin-multiline-arrays": "^4.1.3",
|
|
31
31
|
"prompts": "^2.4.2",
|
|
32
|
-
"rimraf": "^6.
|
|
33
|
-
"typescript": "^5.9.
|
|
34
|
-
"typescript-eslint": "^8.
|
|
35
|
-
"webpack": "^5.
|
|
32
|
+
"rimraf": "^6.1.2",
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"typescript-eslint": "^8.50.1",
|
|
35
|
+
"webpack": "^5.104.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@babel/core": "^7.28.
|
|
39
|
-
"@tsparticles/cli": "^
|
|
38
|
+
"@babel/core": "^7.28.5",
|
|
39
|
+
"@tsparticles/cli": "^3.0.11",
|
|
40
40
|
"@tsparticles/engine": "^3.9.1",
|
|
41
41
|
"@types/eslint": "^9.6.1",
|
|
42
42
|
"@types/estree": "^1.0.8",
|
|
43
43
|
"@types/fs-extra": "^11.0.4",
|
|
44
44
|
"@types/klaw": "^3.0.7",
|
|
45
45
|
"@types/madge": "^5.0.3",
|
|
46
|
-
"@types/node": "^
|
|
46
|
+
"@types/node": "^25.0.3",
|
|
47
47
|
"@types/prompts": "^2.4.9",
|
|
48
48
|
"@types/webpack-env": "^1.18.8",
|
|
49
49
|
"babel-loader": "^10.0.0",
|
|
50
|
-
"browserslist": "^4.
|
|
50
|
+
"browserslist": "^4.28.1",
|
|
51
51
|
"copyfiles": "^2.4.1",
|
|
52
|
-
"cross-env": "^10.
|
|
53
|
-
"terser-webpack-plugin": "^5.3.
|
|
52
|
+
"cross-env": "^10.1.0",
|
|
53
|
+
"terser-webpack-plugin": "^5.3.16",
|
|
54
54
|
"ts-node": "^10.9.2",
|
|
55
|
-
"vitest": "^
|
|
56
|
-
"webpack-bundle-analyzer": "^
|
|
55
|
+
"vitest": "^4.0.16",
|
|
56
|
+
"webpack-bundle-analyzer": "^5.1.0",
|
|
57
57
|
"webpack-cli": "^6.0.1"
|
|
58
58
|
},
|
|
59
59
|
"description": "tsParticles CLI",
|
|
@@ -25,12 +25,14 @@ export async function buildDistFiles(basePath: string): Promise<boolean> {
|
|
|
25
25
|
text = data.toString(),
|
|
26
26
|
libObj = JSON.parse(text) as Record<string, unknown>;
|
|
27
27
|
|
|
28
|
-
libObj
|
|
28
|
+
libObj["version"] = pkgInfo.version;
|
|
29
29
|
|
|
30
30
|
if (pkgInfo.dependencies) {
|
|
31
|
-
libObj
|
|
31
|
+
libObj["dependencies"] = JSON.parse(JSON.stringify(pkgInfo.dependencies).replaceAll("workspace:", ""));
|
|
32
32
|
} else if (pkgInfo.peerDependencies) {
|
|
33
|
-
libObj
|
|
33
|
+
libObj["peerDependencies"] = JSON.parse(
|
|
34
|
+
JSON.stringify(pkgInfo.peerDependencies).replaceAll("workspace:", ""),
|
|
35
|
+
);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
const jsonIndent = 2;
|
package/src/build/build-tsc.ts
CHANGED
package/src/build/build.ts
CHANGED
|
@@ -24,15 +24,17 @@ buildCommand.option("-t, --tsc", "Build the library using TypeScript", false);
|
|
|
24
24
|
buildCommand.argument("[path]", `Path to the project root folder, default is "src"`, "src");
|
|
25
25
|
buildCommand.action(async (argPath: string) => {
|
|
26
26
|
const opts = buildCommand.opts(),
|
|
27
|
-
ci = !!opts
|
|
28
|
-
all =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
ci = !!opts["ci"],
|
|
28
|
+
all =
|
|
29
|
+
!!opts["all"] ||
|
|
30
|
+
(!opts["bundle"] && !opts["clean"] && !opts["dist"] && !opts["lint"] && !opts["prettify"] && !opts["tsc"]),
|
|
31
|
+
doBundle = all || !!opts["bundle"],
|
|
32
|
+
circularDeps = all || !!opts["circularDeps"],
|
|
33
|
+
clean = all || !!opts["clean"],
|
|
34
|
+
distfiles = all || !!opts["dist"],
|
|
35
|
+
doLint = all || !!opts["lint"],
|
|
36
|
+
prettier = all || !!opts["prettify"],
|
|
37
|
+
tsc = all || !!opts["tsc"];
|
|
36
38
|
|
|
37
39
|
const basePath = process.cwd(),
|
|
38
40
|
{ getDistStats } = await import("./build-diststats.js"),
|
package/src/tsconfig.json
CHANGED
|
@@ -97,24 +97,24 @@
|
|
|
97
97
|
/* Ensure that casing is correct in imports. */
|
|
98
98
|
|
|
99
99
|
/* Type Checking */
|
|
100
|
-
"strict": true
|
|
100
|
+
"strict": true,
|
|
101
101
|
/* Enable all strict type-checking options. */
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
102
|
+
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
|
|
103
|
+
"strictNullChecks": true /* When type checking, take into account 'null' and 'undefined'. */,
|
|
104
|
+
"strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
|
|
105
|
+
"strictBindCallApply": true /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */,
|
|
106
|
+
"strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
|
|
107
|
+
"noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */,
|
|
108
|
+
"useUnknownInCatchVariables": true /* Default catch clause variables as 'unknown' instead of 'any'. */,
|
|
109
|
+
"alwaysStrict": true /* Ensure 'use strict' is always emitted. */,
|
|
110
|
+
"noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
|
|
111
|
+
"noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
|
|
112
|
+
"exactOptionalPropertyTypes": true /* Interpret optional property types as written, rather than adding 'undefined'. */,
|
|
113
|
+
"noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
|
|
114
|
+
"noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
|
|
115
|
+
"noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
|
|
116
|
+
"noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an override modifier. */,
|
|
117
|
+
"noPropertyAccessFromIndexSignature": true /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
118
118
|
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
119
119
|
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
120
120
|
|
|
@@ -34,7 +34,7 @@ export function camelize(str: string, ...splits: string[]): string {
|
|
|
34
34
|
*/
|
|
35
35
|
export function dash(str: string): string {
|
|
36
36
|
const index = 0,
|
|
37
|
-
dashed = str.replace(/([A-Z])/g, g => `-${g[index]
|
|
37
|
+
dashed = str.replace(/([A-Z])/g, g => `-${g[index]?.toLowerCase() ?? ""}`),
|
|
38
38
|
startPos = 1;
|
|
39
39
|
|
|
40
40
|
return dashed.startsWith("-") ? dashed.substring(startPos) : dashed;
|