@ripast/cli 0.3.0 → 0.4.0

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +7 -4
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -265,13 +265,13 @@ const unusedCmd = defineCommand({
265
265
  glob: globArg,
266
266
  exports: {
267
267
  type: "string",
268
- description: "Declaration filter: all, exported, or local. Defaults to local."
268
+ description: "Declaration filter: all, exported, or local. Defaults to exported (unused local declarations are already caught by tsc noUnusedLocals)."
269
269
  },
270
270
  tsconfig: { type: "string" },
271
271
  json: jsonArg
272
272
  },
273
273
  run({ args }) {
274
- const exportFilter = args.exports == null ? "local" : resolveExportFilter(args.exports);
274
+ const exportFilter = args.exports == null ? "exported" : resolveExportFilter(args.exports);
275
275
  const unused = buildUnusedDeclarations({
276
276
  glob: args.glob ? args.glob.split(",") : void 0,
277
277
  exports: exportFilter,
@@ -349,6 +349,7 @@ const deleteCmd = defineCommand({
349
349
  });
350
350
  function emitResult(r, apply, verify = false, json = false, agentProfile = false) {
351
351
  const s = summarize(r.changes);
352
+ const warnings = r.warnings ?? [];
352
353
  if (json) {
353
354
  const blockedByRegression = verify && apply && r.regressions.length > 0;
354
355
  const wrote = apply && !blockedByRegression;
@@ -365,12 +366,14 @@ function emitResult(r, apply, verify = false, json = false, agentProfile = false
365
366
  before: c.before,
366
367
  after: c.after
367
368
  })),
368
- regressions: r.regressions
369
+ regressions: r.regressions,
370
+ warnings
369
371
  };
370
372
  process.stdout.write(`${JSON.stringify(payload)}\n`);
371
373
  if (blockedByRegression) process.exit(1);
372
374
  return;
373
375
  }
376
+ for (const w of warnings) process.stderr.write(`warning: ${w}\n`);
374
377
  if (agentProfile) {
375
378
  const blockedByRegression = verify && apply && r.regressions.length > 0;
376
379
  process.stdout.write(`${profileHeader()}\n`);
@@ -829,7 +832,7 @@ runMain(defineCommand({
829
832
  glob: globArg,
830
833
  checks: {
831
834
  type: "string",
832
- description: "Comma-separated subset: dangling-reexport, stale-reexport, stale-import, duplicate-export, orphan-file, orphan-test, inconsistent-import-path, circular-dep. Default: all."
835
+ description: "Comma-separated subset: dangling-reexport, stale-reexport, stale-import, duplicate-export, orphan-file, orphan-test, inconsistent-import-path, circular-dep, phantom-component, shadowed-component, cross-realm-import, stale-nuxt-config-ref. Default: all (adapter checks run when their framework is detected)."
833
836
  },
834
837
  entry: {
835
838
  type: "string",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ripast/cli",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "CLI for ripast. Deterministic AST refactors (rename, move, find-usages, tailwind/CSS class migration) for TypeScript and frontend frameworks. Auto-installs framework adapters as needed.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "citty": "^0.2.2",
52
52
  "std-env": "^4.1.0",
53
- "@ripast/core": "0.3.0"
53
+ "@ripast/core": "0.4.0"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "obuild",