-
-
Notifications
You must be signed in to change notification settings - Fork 99
🔨 Refactor(init): rm init module and move it to picgo-init #187
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
Changes from all commits
960075f
cadf42c
55be20b
6e24a9a
50a4e4a
3faeb27
4cae773
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,7 @@ package-lock.json | |
| test.jpg | ||
| .serena/ | ||
| .pnpm-store/ | ||
| test.js | ||
| test.js | ||
| specs/ | ||
| .env | ||
| openspec/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <!-- OPENSPEC:START --> | ||
| # OpenSpec Instructions | ||
|
|
||
| These instructions are for AI assistants working in this project. | ||
|
|
||
| Always open `@/openspec/AGENTS.md` when the request: | ||
| - Mentions planning or proposals (words like proposal, spec, change, plan) | ||
| - Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work | ||
| - Sounds ambiguous and you need the authoritative spec before coding | ||
|
|
||
| Use `@/openspec/AGENTS.md` to learn: | ||
| - How to create and apply change proposals | ||
| - Spec format and conventions | ||
| - Project structure and guidelines | ||
|
|
||
| Keep this managed block so 'openspec update' can refresh the instructions. | ||
|
|
||
| Always ask questions before create proposal files if unsure about anything in these instructions or the spec file. | ||
|
|
||
| <!-- OPENSPEC:END --> | ||
|
|
||
| # PicGo-Core: Agent Notes | ||
|
|
||
| ## Package Manager / Dependency Installation | ||
| - This repo uses `pnpm` (has `pnpm-lock.yaml`). | ||
| - If dependencies change, do not only edit `package.json`; run `pnpm install` to ensure deps + lockfile are consistent. Only run this when the user explicitly asks/coordinates it. | ||
| - In non-TTY environments, `pnpm install` may fail with `ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY`; use `CI=true pnpm install`. Only run this when the user explicitly asks/coordinates it. | ||
|
|
||
| ## Code Conventions | ||
| - **Exports**: do not use `export default` for new/modified modules. Prefer named exports (e.g. `export { ServerManager }`) and named imports (e.g. `import { ServerManager } from '...'`). | ||
| - Keep TypeScript types explicit; avoid ad-hoc `any` when possible. | ||
| - Don't write `as any` in TypeScript code unless absolutely necessary. Always prefer explicit types. | ||
| - **Config persistence**: use `ctx.saveConfig(...)` for changes that must persist to disk; use `ctx.setConfig(...)` only for in-memory/session updates. | ||
|
|
||
| ## Execution Rules | ||
| - If a command fails due to insufficient permissions, rerun with elevated approval. | ||
| - For `pnpm` commands that hit network issues, retry first. | ||
|
|
||
| ## Serena MCP & Context7 Tools | ||
| When starting work or if you hit issues, try checking MCP for Serena or Context7 tooling. If available, use those tools to navigate, edit, or fetch docs efficiently. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,7 @@ | |
| }, | ||
| "scripts": { | ||
| "start": "node ./bin/picgo", | ||
| "lint": "eslint src --ext .ts", | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "lint": "eslint src --ext .ts && tsc --noEmit", | ||
| "build": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js", | ||
| "dev": "cross-env NODE_ENV=development rollup -c rollup.config.js -w", | ||
|
Comment on lines
17
to
18
|
||
| "patch": "npm version patch && git push origin master && git push origin --tags", | ||
|
|
@@ -56,19 +55,15 @@ | |
| "@rollup/plugin-terser": "^0.4.4", | ||
| "@rollup/plugin-typescript": "^12.3.0", | ||
| "@types/cross-spawn": "^6.0.0", | ||
| "@types/ejs": "^3.0.5", | ||
| "@types/fs-extra": "^5.0.4", | ||
| "@types/glob": "^7.2.0", | ||
| "@types/image-size": "^0.0.29", | ||
| "@types/inquirer": "^0.0.42", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/lodash": "^4.14.175", | ||
| "@types/md5": "^2.1.32", | ||
| "@types/mime-types": "^2.1.0", | ||
| "@types/minimatch": "^3.0.3", | ||
| "@types/node": "20.19.26", | ||
| "@types/resolve": "^0.0.8", | ||
| "@types/rimraf": "^3.0.0", | ||
| "@types/tunnel": "^0.0.3", | ||
| "@typescript-eslint/eslint-plugin": "^8.49.0", | ||
| "@typescript-eslint/parser": "^8.49.0", | ||
|
|
@@ -87,6 +82,7 @@ | |
| "rollup": "^4.53.3", | ||
| "rollup-plugin-copy": "^3.5.0", | ||
| "rollup-plugin-string": "^3.0.0", | ||
| "rimraf": "^6.1.2", | ||
| "typescript": "^5.9.3" | ||
| }, | ||
| "dependencies": { | ||
|
|
@@ -95,25 +91,20 @@ | |
| "axios": "^1.13.2", | ||
| "chalk": "^2.4.1", | ||
| "commander": "^8.1.0", | ||
| "comment-json": "^2.3.1", | ||
| "comment-json": "^4.5.1", | ||
| "cross-spawn": "^6.0.5", | ||
| "dayjs": "^1.7.4", | ||
| "ejs": "^3.1.10", | ||
| "form-data": "^4.0.5", | ||
| "fs-extra": "^6.0.1", | ||
|
||
| "giget": "^2.0.0", | ||
| "globby": "^11.0.4", | ||
| "image-size": "^0.8.3", | ||
| "inquirer": "^6.0.0", | ||
| "is-wsl": "^2.2.0", | ||
| "js-yaml": "^4.1.0", | ||
| "lodash": "^4.17.21", | ||
| "md5": "^2.2.1", | ||
| "mime-types": "3.0.2", | ||
| "minimatch": "^3.0.4", | ||
| "minimist": "^1.2.5", | ||
| "resolve": "^1.8.1", | ||
| "rimraf": "^6.1.2", | ||
| "tunnel": "^0.0.6" | ||
| }, | ||
| "repository": { | ||
|
|
@@ -125,6 +116,6 @@ | |
| }, | ||
| "plugins": {}, | ||
| "engines": { | ||
| "node": ">= 20.0.0" | ||
| "node": ">= 22.12.0" | ||
| } | ||
| } | ||
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 lint script now includes "tsc --noEmit" which is a good practice to catch TypeScript type errors during linting. However, this change should be explicitly mentioned in the PR description as it makes the lint step potentially slower and may catch new type errors that weren't detected before.