Skip to content

Commit c1b9cd3

Browse files
committed
build: updated deps and build configs
1 parent 3d88374 commit c1b9cd3

8 files changed

Lines changed: 66 additions & 35 deletions

File tree

eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import path from "path";
22
import {fileURLToPath} from "url";
3-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
4-
53
import {defineConfig} from "eslint/config";
64
import tsParticlesESLintConfig from "@tsparticles/eslint-config";
75

6+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
7+
88
export default defineConfig([
99
tsParticlesESLintConfig,
1010
{

files/empty-project/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,11 @@
8585
"devDependencies": {
8686
"@babel/core": "^7.28.3",
8787
"@tsparticles/cli": "^3.0.5",
88-
"@tsparticles/eslint-config": "^3.0.3",
88+
"@tsparticles/eslint-config": "^3.0.5",
8989
"@tsparticles/prettier-config": "^3.0.1",
90-
"@tsparticles/tsconfig": "^3.0.4",
91-
"@tsparticles/webpack-plugin": "^3.0.3",
90+
"@tsparticles/tsconfig": "^3.0.5",
91+
"@tsparticles/webpack-plugin": "^3.0.5",
9292
"@types/webpack-env": "^1.18.8",
93-
"@typescript-eslint": "^8.41.0",
9493
"babel-loader": "^10.0.0",
9594
"browserslist": "^4.25.4",
9695
"copyfiles": "^2.4.1",
@@ -100,6 +99,7 @@
10099
"rimraf": "^6.0.1",
101100
"terser-webpack-plugin": "^5.3.14",
102101
"typescript": "^5.9.2",
102+
"typescript-eslint": "^8.41.0",
103103
"webpack": "^5.101.3",
104104
"webpack-bundle-analyzer": "^4.10.2",
105105
"webpack-cli": "^6.0.1"
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
import {loadParticlesTemplate} from "@tsparticles/webpack-plugin";
2-
import { version } from "./package.json" assert { type: "json" };
2+
import {fileURLToPath} from "url";
3+
import fs from "fs-extra";
4+
import path from "path";
35

4-
export default loadParticlesTemplate({moduleName: "empty", templateName: "Empty", version, dir: __dirname});
6+
const __filename = fileURLToPath(import.meta.url),
7+
__dirname = path.dirname(__filename),
8+
rootPkgPath = path.join(__dirname, "package.json"),
9+
pkg = await fs.readJson(rootPkgPath);
10+
11+
export default loadParticlesTemplate({
12+
moduleName: "empty",
13+
templateName: "Empty",
14+
version: pkg.version,
15+
dir: __dirname
16+
});

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
"version": "node scripts/postversion.js && git add files/empty-project/package.json"
3131
},
3232
"dependencies": {
33-
"@tsparticles/eslint-config": "^3.0.3",
33+
"@tsparticles/eslint-config": "^3.0.5",
3434
"@tsparticles/prettier-config": "^3.0.1",
35-
"@tsparticles/tsconfig": "^3.0.4",
36-
"@tsparticles/webpack-plugin": "^3.0.3",
35+
"@tsparticles/tsconfig": "^3.0.5",
36+
"@tsparticles/webpack-plugin": "^3.0.5",
3737
"commander": "^14.0.0",
3838
"eslint": "^9.34.0",
3939
"eslint-config-prettier": "^10.1.8",

pnpm-lock.yaml

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
#!/usr/bin/env node
22
import { buildCommand } from "./build/build.js";
33
import { createCommand } from "./create/create.js";
4-
import pkgInfo from "../package.json" assert { type: "json" };
4+
import { fileURLToPath } from "url";
5+
import fs from "fs-extra";
6+
import path from "path";
57
import { program } from "commander";
68

9+
const __filename = fileURLToPath(import.meta.url),
10+
__dirname = path.dirname(__filename),
11+
rootPkgPath = path.join(__dirname, "package.json"),
12+
pkg = (await fs.readJson(rootPkgPath)) as { version: string };
13+
714
program.name("tsparticles-cli");
815
program.description("tsParticles CLI");
9-
program.version(pkgInfo.version, "-v, --version", "output the current version");
16+
program.version(pkg.version, "-v, --version", "output the current version");
1017
program.addCommand(buildCommand);
1118
program.addCommand(createCommand);
1219
program.parse(process.argv);

src/tsconfig.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@
1313
/* Language and Environment */
1414
"target": "ESNext",
1515
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
16-
"lib": ["ESNext", "ES2022", "ES2021", "ES2020", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015"],
16+
"lib": [
17+
"ESNext",
18+
"ES2024",
19+
"ES2023",
20+
"ES2022",
21+
"ES2021",
22+
"ES2020",
23+
"ES2019",
24+
"ES2018",
25+
"ES2017",
26+
"ES2016",
27+
"ES2015"
28+
],
1729
/* Specify a set of bundled library declaration files that describe the target runtime environment. */
1830
// "jsx": "preserve", /* Specify what JSX code is generated. */
1931
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
@@ -27,11 +39,11 @@
2739
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2840

2941
/* Modules */
30-
"module": "ESNext",
42+
"module": "NodeNext",
3143
/* Specify what module code is generated. */
3244
"rootDir": ".",
3345
/* Specify the root folder within your source files. */
34-
"moduleResolution": "node",
46+
"moduleResolution": "NodeNext",
3547
/* Specify how TypeScript looks up a file from a given module specifier. */
3648
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
3749
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */

tests/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"target": "ES2021",
4-
"module": "commonjs",
5-
"lib": ["ESNext", "ES2022", "ES2021", "ES2020", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015", "DOM"],
4+
"module": "NodeNext",
5+
"lib": ["ESNext", "ES2024", "ES2023", "ES2022", "ES2021", "ES2020", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015", "DOM"],
66
"types": ["jsdom", "vitest", "node"],
77
"allowJs": true,
88
"rootDir": ".",
@@ -14,7 +14,7 @@
1414
"strictNullChecks": true,
1515
"alwaysStrict": true,
1616
"noFallthroughCasesInSwitch": true,
17-
"moduleResolution": "node",
17+
"moduleResolution": "NodeNext",
1818
"allowSyntheticDefaultImports": true,
1919
"esModuleInterop": true,
2020
"experimentalDecorators": true,

0 commit comments

Comments
 (0)