torch-it 3.0.0 → 3.0.1

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/README.md CHANGED
@@ -172,7 +172,7 @@ torch-it --yes --json # the result
172
172
 
173
173
  ```json
174
174
  {
175
- "version": "3.0.0",
175
+ "version": "3.0.1",
176
176
  "ok": true,
177
177
  "exitCode": 0,
178
178
  "dryRun": true,
@@ -416,6 +416,7 @@ npm run build # bundle to dist/torch-it.js
416
416
  - `npm run fallow` checks for unused code, duplication and over-complex functions. It runs in the pre-push hook and in CI.
417
417
  - Branches are named `feat/…`, `fix/…`, `hotfix/…`, `release/…` or `chore/…`, and commits follow [Conventional Commits](https://www.conventionalcommits.org/). Both are checked by hooks and in CI.
418
418
  - Open pull requests against `dev`. `dev` is merged into `main` for a release.
419
+ - Notable changes for each release are recorded in [CHANGELOG.md](CHANGELOG.md).
419
420
 
420
421
  ---
421
422
 
package/dist/torch-it.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Tt=Object.create;var Ce=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Pt=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,Ot=Object.prototype.hasOwnProperty;var wt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var At=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Pt(t))!Ot.call(e,s)&&s!==o&&Ce(e,s,{get:()=>t[s],enumerable:!(n=Et(t,s))||n.enumerable});return e};var f=(e,t,o)=>(o=e!=null?Tt(Dt(e)):{},At(t||!e||!e.__esModule?Ce(o,"default",{value:e,enumerable:!0}):o,e));var Re=wt((bo,xt)=>{xt.exports={name:"torch-it",version:"3.0.0",description:"CLI to reset, clean, and rebuild Node.js project environments.",keywords:["cleanup","cli","docker","node"],homepage:"https://github.com/piyook/torch-it#readme",bugs:{url:"https://github.com/piyook/torch-it/issues"},license:"MIT",author:"piyook",repository:{type:"git",url:"git+https://github.com/piyook/torch-it.git"},bin:{"torch-it":"dist/torch-it.js"},files:["dist","README.md","llms.txt"],type:"commonjs",main:"dist/torch-it.js",engines:{node:">=20"},scripts:{build:'esbuild src/torch.ts --bundle --outfile=dist/torch-it.js --platform=node --format=cjs --target=node20 --minify --banner:js="#!/usr/bin/env node"',"torch-it":"npm run build && node dist/torch-it.js","torch-it:ts":"tsx src/torch.ts",lint:"oxlint .","lint:fix":"oxlint . --fix",format:'prettier --check "src/**/*.{ts,js,json}" "tests/**/*.{ts,js,json}" package.json package-lock.json .commitlintrc.json',"format:write":'prettier --write "src/**/*.{ts,js,json}" "tests/**/*.{ts,js,json}" package.json package-lock.json .commitlintrc.json',fallow:"fallow",quality:"npm run lint && npm run format && npm run fallow && npm test","validate-branch-name":"validate-branch-name",prepare:"husky",prepublishOnly:"npm run build",test:"tsc --noEmit && vitest run","test:watch":"vitest"},devDependencies:{"@commitlint/cli":"^21.2.3","@commitlint/config-conventional":"^21.2.3","@types/node":"^26.6.4",esbuild:"^0.28.2",fallow:"^3.33.0",husky:"^9.1.7","lint-staged":"^17.6.0",oxlint:"^1.87.0",prettier:"^3.9.9",tsx:"^4.23.15",typescript:"^7.0.2","validate-branch-name":"^1.3.2",vitest:"^5.0.3"},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs}":["oxlint --fix","prettier --write"],"*.json":"prettier --write"},"validate-branch-name":{pattern:"^(main|dev){1}$|^(feat|fix|hotfix|release|chore)/.+$",errorMsg:"INVALID BRANCH NAME: use format 'feat|fix|hotfix|release|chore/your-branch-name'"}}});var Q=!0,ke=e=>{Q=e},E=(e,t)=>o=>Q?`\x1B[${e}m${o}\x1B[${t}m`:o,u={BOLD:E("1","22"),CYAN:E("36","39"),GREEN:E("32","39"),RED:E("31","39"),YELLOW:E("33","39"),PURPLE:E("35","39"),RESET:e=>Q?`\x1B[0m${e}`:e},p={OK:0,ERROR:1,STEP_FAILED:2,CANCELLED:3},i={INFO:"\u{1F525}",SUCCESS:"\u2705",FAIL:"\u274C",EXCLAMATION:"\u2757",WARN:"\u26A0\uFE0F",ROCKET:"\u{1F525}",CLEAN:"\u{1F525}",PHOENIX:"\u{1F525}",BUILD:"\u{1F528}",TARGET:"\u{1F525}",CELEBRATE:"\u{1F525}",STARS:"\u2728",BOX:"\u{1F4E6}",CLIPBOARD:"\u{1F4CB}",DOCKER:"\u{1F433}",WAIT:"\u23F3"};var z=f(require("fs")),F="torch-it.log",Z=!1;function vt(e){let t=new RegExp("\x1B\\[[0-9;]*m","g");return e.replace(t,"")}var P=e=>{Z=e},be=()=>{Z&&z.default.writeFileSync(F,"")},D=e=>{if(!Z)return;let t=vt(e).replace(/^\n/,""),o=new Date().toISOString();z.default.appendFileSync(F,`[${o}] ${t}
2
+ "use strict";var Tt=Object.create;var Ce=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Pt=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,Ot=Object.prototype.hasOwnProperty;var wt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var At=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Pt(t))!Ot.call(e,s)&&s!==o&&Ce(e,s,{get:()=>t[s],enumerable:!(n=Et(t,s))||n.enumerable});return e};var f=(e,t,o)=>(o=e!=null?Tt(Dt(e)):{},At(t||!e||!e.__esModule?Ce(o,"default",{value:e,enumerable:!0}):o,e));var Re=wt((bo,xt)=>{xt.exports={name:"torch-it",version:"3.0.1",description:"CLI to reset, clean, and rebuild Node.js project environments.",keywords:["cleanup","cli","docker","node"],homepage:"https://github.com/piyook/torch-it#readme",bugs:{url:"https://github.com/piyook/torch-it/issues"},license:"MIT",author:"piyook",repository:{type:"git",url:"git+https://github.com/piyook/torch-it.git"},bin:{"torch-it":"dist/torch-it.js"},files:["dist","README.md","llms.txt"],type:"commonjs",main:"dist/torch-it.js",engines:{node:">=20"},scripts:{build:'esbuild src/torch.ts --bundle --outfile=dist/torch-it.js --platform=node --format=cjs --target=node20 --minify --banner:js="#!/usr/bin/env node"',"torch-it":"npm run build && node dist/torch-it.js","torch-it:ts":"tsx src/torch.ts",lint:"oxlint .","lint:fix":"oxlint . --fix",format:'prettier --check "src/**/*.{ts,js,json}" "tests/**/*.{ts,js,json}" package.json package-lock.json .commitlintrc.json',"format:write":'prettier --write "src/**/*.{ts,js,json}" "tests/**/*.{ts,js,json}" package.json package-lock.json .commitlintrc.json',fallow:"fallow",quality:"npm run lint && npm run format && npm run fallow && npm test","validate-branch-name":"validate-branch-name",prepare:"husky",prepublishOnly:"npm run build",test:"tsc --noEmit && vitest run","test:watch":"vitest"},devDependencies:{"@commitlint/cli":"^21.2.4","@commitlint/config-conventional":"^21.2.4","@types/node":"^26.6.6",esbuild:"^0.28.2",fallow:"^3.40.0",husky:"^9.1.7","lint-staged":"^17.6.0",oxlint:"^1.92.0",prettier:"^3.9.10",tsx:"^4.23.15",typescript:"^7.0.2","validate-branch-name":"^1.3.2",vitest:"^5.1.0"},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs}":["oxlint --fix","prettier --write"],"*.json":"prettier --write"},"validate-branch-name":{pattern:"^(main|dev){1}$|^(feat|fix|hotfix|release|chore)/.+$",errorMsg:"INVALID BRANCH NAME: use format 'feat|fix|hotfix|release|chore/your-branch-name'"}}});var Q=!0,ke=e=>{Q=e},E=(e,t)=>o=>Q?`\x1B[${e}m${o}\x1B[${t}m`:o,u={BOLD:E("1","22"),CYAN:E("36","39"),GREEN:E("32","39"),RED:E("31","39"),YELLOW:E("33","39"),PURPLE:E("35","39"),RESET:e=>Q?`\x1B[0m${e}`:e},p={OK:0,ERROR:1,STEP_FAILED:2,CANCELLED:3},i={INFO:"\u{1F525}",SUCCESS:"\u2705",FAIL:"\u274C",EXCLAMATION:"\u2757",WARN:"\u26A0\uFE0F",ROCKET:"\u{1F525}",CLEAN:"\u{1F525}",PHOENIX:"\u{1F525}",BUILD:"\u{1F528}",TARGET:"\u{1F525}",CELEBRATE:"\u{1F525}",STARS:"\u2728",BOX:"\u{1F4E6}",CLIPBOARD:"\u{1F4CB}",DOCKER:"\u{1F433}",WAIT:"\u23F3"};var z=f(require("fs")),F="torch-it.log",Z=!1;function vt(e){let t=new RegExp("\x1B\\[[0-9;]*m","g");return e.replace(t,"")}var P=e=>{Z=e},be=()=>{Z&&z.default.writeFileSync(F,"")},D=e=>{if(!Z)return;let t=vt(e).replace(/^\n/,""),o=new Date().toISOString();z.default.appendFileSync(F,`[${o}] ${t}
3
3
  `)};var T=()=>Re().version;var ee=!1,te=[],oe=[],ye=e=>{ee=e},g=()=>ee;function Te(e,t){e==="warn"&&te.push(t),e==="fail"&&oe.push(t)}function O(e){process.stdout.write(`${JSON.stringify(e,null,2)}
4
4
  `)}function m(){ee&&O({version:T(),ok:!1,exitCode:p.ERROR,changed:!1,warnings:te,errors:oe}),process.exit(p.ERROR)}var Lt={NO_DOCKER:"skipped",DOCKER_UNAVAILABLE:"unavailable",DOCKER_FAIL:"failed",OK:"ok"},L=e=>e?"ok":"failed";function St(e){let t=Lt[e.dockerClean],o=e.rebuild!==!1&&(t==="ok"||t==="failed");return{dockerTeardown:t,dockerRebuild:o?L(e.dockerRebuild):"skipped",dockerStart:o&&e.dockerRebuild?L(e.dockerLaunch):"skipped"}}function Ee(e,t){let o=St(e);return{version:T(),ok:t===p.OK,exitCode:t,dryRun:e.dryRun===!0,changed:e.dryRun!==!0,cwd:process.cwd(),packageManager:e.packageManager??null,removed:e.paths?.removed??[],failed:e.paths?.failed??[],keptTracked:e.paths?.tracked??[],steps:{dockerTeardown:o.dockerTeardown,cleanup:L((e.cleanupFailures??0)===0),cacheClean:e.cacheClean===!1?"skipped":L(e.packageManagerClean),install:e.rebuild===!1?"skipped":L(e.dependencyInstall),dockerRebuild:o.dockerRebuild,dockerStart:o.dockerStart},warnings:te,errors:oe}}var w=!1,R=!1,_t={success:"ok: ",warn:"warning: ",fail:"error: ",step:"> "};function De(e){w=e.plain===!0||g()||process.stdout.isTTY!==!0,R=e.quiet===!0,ke(!w&&!process.env.NO_COLOR)}var Oe=()=>R;function j(e){let t=R;R=!1;try{e()}finally{R=t}}var $t=new RegExp(`(?:${[...new Set(Object.values(i))].join("|")})\\uFE0F? ?`,"gu"),M=e=>e.replace($t,"").trimEnd();function Nt(e,t){switch(t){case"info":return`${u.CYAN(i.INFO)} ${u.BOLD(e)}${u.RESET("")}`;case"success":return`${u.GREEN(i.SUCCESS)} ${e}${u.RESET("")}`;case"warn":return`${u.YELLOW(i.WARN)} ${e}${u.RESET("")}`;case"fail":return`${u.RED(i.FAIL)} ${e}${u.RESET("")}`;case"step":return`
5
5
  ${u.PURPLE("\u25B6")} ${u.BOLD(e)}${u.RESET("")}`;default:return e}}var It=(e,t)=>`${_t[t]??""}${M(e).replace(/^\n+/,"")}`;function r(e,t){let o=w?It(e,t):Nt(e,t);D(o),Te(t,M(e).replace(/^\n+/,"")),t==="warn"||t==="fail"?console.error(o):!R&&!g()&&console.log(o)}function we(){if(w||R)return;K([` ${i.TARGET} TORCH LIT ${i.ROCKET}`],u.PURPLE);let e=`
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # torch-it
2
2
 
3
- > A Node.js CLI that deletes a project's build output, caches and `node_modules`, clears the package manager cache, then reinstalls dependencies. Optionally tears down and rebuilds Docker Compose services. Describes torch-it 3.0.0 (`torch-it --version`). This file is the reference for AI agents and scripts; `README.md` is the human guide. `torch-it --llms` prints this file for the installed version, and `torch-it --help` prints a short version of the same rules.
3
+ > A Node.js CLI that deletes a project's build output, caches and `node_modules`, clears the package manager cache, then reinstalls dependencies. Optionally tears down and rebuilds Docker Compose services. Describes torch-it 3.0.1 (`torch-it --version`). This file is the reference for AI agents and scripts; `README.md` is the human guide. `torch-it --llms` prints this file for the installed version, and `torch-it --help` prints a short version of the same rules.
4
4
 
5
5
  ## What it does and does not do
6
6
 
@@ -136,7 +136,7 @@ Optional file in the project root. For the boolean options the command line over
136
136
 
137
137
  ```json
138
138
  {
139
- "version": "3.0.0",
139
+ "version": "3.0.1",
140
140
  "ok": true,
141
141
  "exitCode": 0,
142
142
  "dryRun": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "torch-it",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "CLI to reset, clean, and rebuild Node.js project environments.",
5
5
  "keywords": [
6
6
  "cleanup",
@@ -48,19 +48,19 @@
48
48
  "test:watch": "vitest"
49
49
  },
50
50
  "devDependencies": {
51
- "@commitlint/cli": "^21.2.3",
52
- "@commitlint/config-conventional": "^21.2.3",
53
- "@types/node": "^26.6.4",
51
+ "@commitlint/cli": "^21.2.4",
52
+ "@commitlint/config-conventional": "^21.2.4",
53
+ "@types/node": "^26.6.6",
54
54
  "esbuild": "^0.28.2",
55
- "fallow": "^3.33.0",
55
+ "fallow": "^3.40.0",
56
56
  "husky": "^9.1.7",
57
57
  "lint-staged": "^17.6.0",
58
- "oxlint": "^1.87.0",
59
- "prettier": "^3.9.9",
58
+ "oxlint": "^1.92.0",
59
+ "prettier": "^3.9.10",
60
60
  "tsx": "^4.23.15",
61
61
  "typescript": "^7.0.2",
62
62
  "validate-branch-name": "^1.3.2",
63
- "vitest": "^5.0.3"
63
+ "vitest": "^5.1.0"
64
64
  },
65
65
  "lint-staged": {
66
66
  "*.{ts,tsx,js,jsx,mjs,cjs}": [