-
-
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
base: main
Are you sure you want to change the base?
3.0.0 #62
Changes from 15 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
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"; | ||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
|
||
import {defineConfig} from "eslint/config"; | ||
import tsParticlesESLintConfig from "@tsparticles/eslint-config"; | ||
|
||
export default defineConfig([ | ||
tsParticlesESLintConfig, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
project: [path.resolve(__dirname, "src/tsconfig.json")], | ||
tsconfigRootDir: __dirname, | ||
sourceType: "module" | ||
} | ||
}, | ||
rules: { | ||
"no-console": "off" | ||
} | ||
} | ||
]); |
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": { | ||
|
@@ -83,7 +84,7 @@ | |
"prettier": "@tsparticles/prettier-config", | ||
"devDependencies": { | ||
"@babel/core": "^7.23.9", | ||
"@tsparticles/cli": "^2.3.3", | ||
"@tsparticles/cli": "^3.0.1", | ||
"@tsparticles/eslint-config": "^2.2.1", | ||
"@tsparticles/prettier-config": "^2.1.6", | ||
"@tsparticles/tsconfig": "^2.1.7", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
const { loadParticlesTemplate } = require("@tsparticles/webpack-plugin"), | ||
version = require("./package.json").version; | ||
import {loadParticlesTemplate} from "@tsparticles/webpack-plugin"; | ||
import {fileURLToPath} from 'url'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
|
||
module.exports = loadParticlesTemplate({ moduleName: "empty", templateName: "Empty", version, dir: __dirname }); | ||
const __filename = fileURLToPath(import.meta.url), | ||
__dirname = path.dirname(__filename), | ||
pkg = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8')), | ||
version = pkg.version; | ||
|
||
export default loadParticlesTemplate({moduleName: "empty", templateName: "Empty", version, dir: __dirname}); |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,8 @@ | ||||||||||||||||||||||
{ | ||||||||||||||||||||||
"name": "@tsparticles/cli", | ||||||||||||||||||||||
"version": "2.3.3", | ||||||||||||||||||||||
"version": "3.0.1", | ||||||||||||||||||||||
"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.3", | ||||||||||||||||||||||
"@tsparticles/prettier-config": "^3.0.1", | ||||||||||||||||||||||
"@tsparticles/tsconfig": "^3.0.1", | ||||||||||||||||||||||
"@tsparticles/webpack-plugin": "^3.0.3", | ||||||||||||||||||||||
"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", | ||||||||||||||||||||||
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. Remove self-dependency from devDependencies. The package lists itself as a devDependency, which can cause resolution issues. "devDependencies": {
- "@babel/core": "^7.28.3",
- "@tsparticles/cli": "^2.3.3",
+ "@babel/core": "^7.28.3", 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||
"@types/eslint": "^9.6.1", | ||||||||||||||||||||||
"@types/estree": "^1.0.8", | ||||||||||||||||||||||
"@types/fs-extra": "^11.0.4", | ||||||||||||||||||||||
"@types/klaw": "^3.0.6", | ||||||||||||||||||||||
"@types/klaw": "^3.0.7", | ||||||||||||||||||||||
"@types/madge": "^5.0.3", | ||||||||||||||||||||||
"@types/mocha": "^10.0.6", | ||||||||||||||||||||||
"@types/node": "^20.11.24", | ||||||||||||||||||||||
"@types/node": "^24.3.0", | ||||||||||||||||||||||
"@types/prompts": "^2.4.9", | ||||||||||||||||||||||
"@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", | ||||||||||||||||||||||
"chai": "^4.4.1", | ||||||||||||||||||||||
"@types/webpack-env": "^1.18.8", | ||||||||||||||||||||||
"babel-loader": "^10.0.0", | ||||||||||||||||||||||
"browserslist": "^4.25.4", | ||||||||||||||||||||||
"copyfiles": "^2.4.1", | ||||||||||||||||||||||
"cross-env": "^7.0.3", | ||||||||||||||||||||||
"mocha": "^10.3.0", | ||||||||||||||||||||||
"nyc": "^15.1.0", | ||||||||||||||||||||||
"terser-webpack-plugin": "^5.3.10", | ||||||||||||||||||||||
"cross-env": "^10.0.0", | ||||||||||||||||||||||
"terser-webpack-plugin": "^5.3.14", | ||||||||||||||||||||||
"ts-node": "^10.9.2", | ||||||||||||||||||||||
"webpack-bundle-analyzer": "^4.10.1", | ||||||||||||||||||||||
"webpack-cli": "^5.1.4" | ||||||||||||||||||||||
"vitest": "^1.5.6", | ||||||||||||||||||||||
"webpack-bundle-analyzer": "^4.10.2", | ||||||||||||||||||||||
"webpack-cli": "^6.0.1" | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
"description": "tsParticles CLI", | ||||||||||||||||||||||
"main": ".eslintrc.js", | ||||||||||||||||||||||
"main": "eslint.config.js", | ||||||||||||||||||||||
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. 🛠️ 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
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||
"author": "Matteo Bruni <[email protected]>" | ||||||||||||||||||||||
} |
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.
📝 Committable suggestion
🤖 Prompt for AI Agents