-
-
Notifications
You must be signed in to change notification settings - Fork 0
3.0.0 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.0 #62
Changes from 28 commits
38da21b
d66bdfb
34af9cc
f275d81
84a390a
4b7ab77
33c35f6
962b031
d4dd087
c23627f
17f4157
40a02c9
2cd3d7c
8be9b89
431b685
e8da7df
61bd03e
986f452
1bb5554
8aaefe7
366cb91
3d88374
c1b9cd3
1bcbc48
b13b270
37734fe
25faccf
ddea6e5
d9c9098
7e2e802
108969b
637477d
8d9a16f
b6869d8
6383926
791ec95
2875f31
278e13d
a346f80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||||||||||||||||||
| import path from "path"; | ||||||||||||||||||||||||||||||
| import {fileURLToPath} from "url"; | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| import {fileURLToPath} from "url"; | |
| import { fileURLToPath } from "url"; |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing in the import statement. Missing space after the comma following "path" and after the opening brace for "defineConfig".
| import {fileURLToPath} from "url"; | |
| import {defineConfig} from "eslint/config"; | |
| import { fileURLToPath } from "url"; | |
| import { defineConfig } from "eslint/config"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix sourceType placement (ESLint flat config).
sourceType belongs under languageOptions, not parserOptions. Current placement may be ignored.
- languageOptions: {
- parserOptions: {
- project: [path.resolve(__dirname, "src/tsconfig.json")],
- tsconfigRootDir: __dirname,
- sourceType: "module"
- }
- },
+ languageOptions: {
+ sourceType: "module",
+ parserOptions: {
+ project: [path.resolve(__dirname, "src/tsconfig.json")],
+ tsconfigRootDir: __dirname
+ }
+ },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| languageOptions: { | |
| parserOptions: { | |
| project: [path.resolve(__dirname, "src/tsconfig.json")], | |
| tsconfigRootDir: __dirname, | |
| sourceType: "module" | |
| } | |
| }, | |
| languageOptions: { | |
| sourceType: "module", | |
| parserOptions: { | |
| project: [path.resolve(__dirname, "src/tsconfig.json")], | |
| tsconfigRootDir: __dirname | |
| } | |
| }, |
🤖 Prompt for AI Agents
In eslint.config.js around lines 11 to 17, the sourceType is incorrectly placed
inside parserOptions (so it may be ignored by ESLint flat config); move
sourceType out of parserOptions and set it directly on languageOptions (e.g.,
languageOptions.sourceType = "module"), leaving parserOptions with only project
and tsconfigRootDir, so ESLint recognizes the module source type correctly.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import tsParticlesESLintConfig from "@tsparticles/eslint-config"; | ||
| import { defineConfig } from "eslint/config"; | ||
|
|
||
| export default defineConfig([ | ||
| tsParticlesESLintConfig, | ||
| ]); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| "name": "@tsparticles/empty-template", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "type": "module", | ||
| "author": "Matteo Bruni <[email protected]>", | ||
| "description": "tsParticles empty template", | ||
| "homepage": "https://particles.js.org", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| "name": "@tsparticles/empty-template", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "type": "module", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "type": "module" conflicts with CommonJS "main" entry; use exports map or .cjs. With "type": "module", Node treats .js as ESM. Pointing "main" at dist/cjs/index.js (CommonJS) will break require/import. Prefer an exports map and emit .cjs for CJS output. Apply: - "main": "dist/cjs/index.js",
- "module": "dist/esm/index.js",
- "types": "dist/types/index.d.ts",
+ "exports": {
+ ".": {
+ "types": "./dist/types/index.d.ts",
+ "import": "./dist/esm/index.js",
+ "require": "./dist/cjs/index.cjs"
+ },
+ "./package.json": "./package.json"
+ },
+ "main": "./dist/esm/index.js",
+ "types": "./dist/types/index.d.ts",Note: ensure your build emits dist/cjs/index.cjs (or rename accordingly). Also applies to: 81-83 🤖 Prompt for AI Agents |
||
| "description": "tsParticles empty template", | ||
| "homepage": "https://particles.js.org", | ||
| "scripts": { | ||
|
|
@@ -82,29 +83,28 @@ | |
| "types": "dist/types/index.d.ts", | ||
| "prettier": "@tsparticles/prettier-config", | ||
| "devDependencies": { | ||
| "@babel/core": "^7.23.9", | ||
| "@tsparticles/cli": "^2.3.3", | ||
| "@tsparticles/eslint-config": "^2.2.1", | ||
| "@tsparticles/prettier-config": "^2.1.6", | ||
| "@tsparticles/tsconfig": "^2.1.7", | ||
| "@tsparticles/webpack-plugin": "^2.2.1", | ||
| "@types/webpack-env": "^1.18.4", | ||
| "@typescript-eslint/eslint-plugin": "^7.1.0", | ||
| "@typescript-eslint/parser": "^7.1.0", | ||
| "babel-loader": "^9.1.3", | ||
| "browserslist": "^4.23.0", | ||
| "@babel/core": "^7.28.3", | ||
| "@tsparticles/cli": "^3.0.8", | ||
| "@tsparticles/eslint-config": "^3.0.5", | ||
| "@tsparticles/prettier-config": "^3.0.1", | ||
| "@tsparticles/tsconfig": "^3.0.5", | ||
| "@tsparticles/webpack-plugin": "^3.0.5", | ||
| "@types/webpack-env": "^1.18.8", | ||
| "babel-loader": "^10.0.0", | ||
| "browserslist": "^4.25.4", | ||
| "copyfiles": "^2.4.1", | ||
| "eslint": "^8.56.0", | ||
| "eslint-config-prettier": "^9.1.0", | ||
| "prettier": "^3.2.4", | ||
| "rimraf": "^5.0.5", | ||
| "terser-webpack-plugin": "^5.3.10", | ||
| "typescript": "^5.3.3", | ||
| "webpack": "^5.90.0", | ||
| "webpack-bundle-analyzer": "^4.10.1", | ||
| "webpack-cli": "^5.1.4" | ||
| "eslint": "^9.34.0", | ||
| "eslint-config-prettier": "^10.1.8", | ||
| "prettier": "^3.6.2", | ||
| "rimraf": "^6.0.1", | ||
| "terser-webpack-plugin": "^5.3.14", | ||
| "typescript": "^5.9.2", | ||
| "typescript-eslint": "^8.41.0", | ||
| "webpack": "^5.101.3", | ||
| "webpack-bundle-analyzer": "^4.10.2", | ||
| "webpack-cli": "^6.0.1" | ||
| }, | ||
| "dependencies": { | ||
| "@tsparticles/engine": "^3.3.0" | ||
| "@tsparticles/engine": "^3.9.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,16 @@ | ||||||||||
| const { loadParticlesTemplate } = require("@tsparticles/webpack-plugin"), | ||||||||||
| version = require("./package.json").version; | ||||||||||
| import {loadParticlesTemplate} from "@tsparticles/webpack-plugin"; | ||||||||||
| import {fileURLToPath} from "url"; | ||||||||||
|
Comment on lines
+1
to
+2
|
||||||||||
| import {loadParticlesTemplate} from "@tsparticles/webpack-plugin"; | |
| import {fileURLToPath} from "url"; | |
| import { loadParticlesTemplate } from "@tsparticles/webpack-plugin"; | |
| import { fileURLToPath } from "url"; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,8 @@ | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| "name": "@tsparticles/cli", | ||||||||||||||||||||||
| "version": "2.3.3", | ||||||||||||||||||||||
| "version": "3.0.8", | ||||||||||||||||||||||
| "license": "MIT", | ||||||||||||||||||||||
| "type": "module", | ||||||||||||||||||||||
| "bin": { | ||||||||||||||||||||||
| "tsparticles-cli": "dist/cli.js" | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
|
|
@@ -21,66 +22,60 @@ | |||||||||||||||||||||
| "compile:ci": "pnpm run build:ts", | ||||||||||||||||||||||
| "build:ts": "pnpm run build:ts:cjs", | ||||||||||||||||||||||
| "build:ts:cjs": "tsc -p src", | ||||||||||||||||||||||
| "test": "cross-env TS_NODE_PROJECT='./tests/tsconfig.json' nyc mocha --timeout 300000", | ||||||||||||||||||||||
| "test": "vitest run", | ||||||||||||||||||||||
| "build": "pnpm run clear:dist && pnpm run prettify:src && pnpm run lint && pnpm run compile && pnpm run circular-deps && pnpm run prettify:readme && chmod +x dist/cli.js && chmod +x dist/build/build.js && chmod +x dist/create/create.js && chmod +x dist/create/preset/preset.js", | ||||||||||||||||||||||
| "build:ci": "pnpm run clear:dist && pnpm run prettify:ci:src && pnpm run lint:ci && pnpm run compile:ci && pnpm run prettify:ci:readme", | ||||||||||||||||||||||
| "clear:dist": "rimraf ./dist", | ||||||||||||||||||||||
| "prepack": "pnpm run build", | ||||||||||||||||||||||
| "version": "node scripts/postversion.js && git add files/empty-project/package.json" | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| "dependencies": { | ||||||||||||||||||||||
| "@tsparticles/eslint-config": "^2.3.0", | ||||||||||||||||||||||
| "@tsparticles/prettier-config": "^2.1.6", | ||||||||||||||||||||||
| "@tsparticles/tsconfig": "^2.3.0", | ||||||||||||||||||||||
| "@tsparticles/webpack-plugin": "^2.3.0", | ||||||||||||||||||||||
| "@typescript-eslint/eslint-plugin": "^7.1.1", | ||||||||||||||||||||||
| "@typescript-eslint/parser": "^7.1.1", | ||||||||||||||||||||||
| "commander": "^12.0.0", | ||||||||||||||||||||||
| "eslint": "^8.57.0", | ||||||||||||||||||||||
| "eslint-config-prettier": "^9.1.0", | ||||||||||||||||||||||
| "eslint-plugin-jsdoc": "^48.2.0", | ||||||||||||||||||||||
| "eslint-plugin-prettier": "^5.1.3", | ||||||||||||||||||||||
| "eslint-plugin-tsdoc": "^0.2.17", | ||||||||||||||||||||||
| "fs-extra": "^11.2.0", | ||||||||||||||||||||||
| "@tsparticles/eslint-config": "^3.0.5", | ||||||||||||||||||||||
| "@tsparticles/prettier-config": "^3.0.1", | ||||||||||||||||||||||
| "@tsparticles/tsconfig": "^3.0.5", | ||||||||||||||||||||||
| "@tsparticles/webpack-plugin": "^3.0.5", | ||||||||||||||||||||||
| "commander": "^14.0.0", | ||||||||||||||||||||||
| "eslint": "^9.34.0", | ||||||||||||||||||||||
| "eslint-config-prettier": "^10.1.8", | ||||||||||||||||||||||
| "eslint-plugin-jsdoc": "^54.1.1", | ||||||||||||||||||||||
| "eslint-plugin-prettier": "^5.5.4", | ||||||||||||||||||||||
| "eslint-plugin-tsdoc": "^0.4.0", | ||||||||||||||||||||||
| "fs-extra": "^11.3.1", | ||||||||||||||||||||||
| "klaw": "^4.1.0", | ||||||||||||||||||||||
| "lookpath": "^1.2.2", | ||||||||||||||||||||||
| "madge": "^6.1.0", | ||||||||||||||||||||||
| "path-scurry": "^1.10.1", | ||||||||||||||||||||||
| "prettier": "^3.2.5", | ||||||||||||||||||||||
| "prettier-plugin-multiline-arrays": "^3.0.4", | ||||||||||||||||||||||
| "lookpath": "^1.2.3", | ||||||||||||||||||||||
| "madge": "^8.0.0", | ||||||||||||||||||||||
| "path-scurry": "^2.0.0", | ||||||||||||||||||||||
| "prettier": "^3.6.2", | ||||||||||||||||||||||
| "prettier-plugin-multiline-arrays": "^4.0.3", | ||||||||||||||||||||||
| "prompts": "^2.4.2", | ||||||||||||||||||||||
| "rimraf": "^5.0.5", | ||||||||||||||||||||||
| "typescript": "^5.4.2", | ||||||||||||||||||||||
| "webpack": "^5.90.3" | ||||||||||||||||||||||
| "rimraf": "^6.0.1", | ||||||||||||||||||||||
| "typescript": "^5.9.2", | ||||||||||||||||||||||
| "typescript-eslint": "^8.41.0", | ||||||||||||||||||||||
| "webpack": "^5.101.3" | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| "devDependencies": { | ||||||||||||||||||||||
| "@babel/core": "^7.23.9", | ||||||||||||||||||||||
| "@tsparticles/cli": "^2.2.4", | ||||||||||||||||||||||
| "@tsparticles/engine": "^3.3.0", | ||||||||||||||||||||||
| "@types/chai": "^4.3.12", | ||||||||||||||||||||||
| "@types/eslint": "^8.56.5", | ||||||||||||||||||||||
| "@babel/core": "^7.28.3", | ||||||||||||||||||||||
| "@tsparticles/cli": "^2.3.3", | ||||||||||||||||||||||
| "@tsparticles/engine": "^3.9.1", | ||||||||||||||||||||||
|
||||||||||||||||||||||
| "@babel/core": "^7.28.3", | |
| "@tsparticles/cli": "^2.3.3", | |
| "@tsparticles/engine": "^3.9.1", | |
| "@babel/core": "^7.28.3", | |
| "@tsparticles/engine": "^3.9.1", |
🤖 Prompt for AI Agents
package.json around lines 57-59: remove the package's own name from
devDependencies (the self-dependency entry) so the project does not list itself
as a devDependency; delete that dependency line, save package.json, then run
your package manager (npm install or yarn install) to update node_modules and
the lockfile and verify package.json remains valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
"main" points to eslint.config.js; set it to the CLI entry or drop it.
Current value breaks consumers importing the package.
- "main": "eslint.config.js",
+ "main": "dist/cli.js",
+ "exports": {
+ ".": "./dist/cli.js",
+ "./package.json": "./package.json"
+ },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "main": "eslint.config.js", | |
| // before (around line 79) | |
| - "main": "eslint.config.js", | |
| // after | |
| "main": "dist/cli.js", | |
| "exports": { | |
| ".": "./dist/cli.js", | |
| "./package.json": "./package.json" | |
| }, |
🤖 Prompt for AI Agents
In package.json around line 79, the "main" field incorrectly points to
eslint.config.js which breaks consumers; update the "main" field to point to
your package's actual runtime/CLI entry (e.g., the built CommonJS entry like
"lib/index.js" or the published CLI entry), or remove the "main" field entirely
if the package is only a CLI and you expose binaries via "bin"; ensure the
chosen path exists in the published package and matches your build/output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pnpm action versions are inconsistent between the two jobs. Job "main" uses "@v4" (line 22) while job "pr" uses "@V3" (line 60). They should use the same version for consistency.