Skip to content

@W-23123159@ - feat: delete the sf metadata enrich CLI command#65

Merged
kumar-aman2-general merged 7 commits into
mainfrom
W-23123159-delete-enrich-cli
Jul 8, 2026
Merged

@W-23123159@ - feat: delete the sf metadata enrich CLI command#65
kumar-aman2-general merged 7 commits into
mainfrom
W-23123159-delete-enrich-cli

Conversation

@kumar-aman2-general

@kumar-aman2-general kumar-aman2-general commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Note: Same-repo re-open of #62 so build verification and test runs are invoked (the original was from a fork, where CI does not fire). Content is identical to #62's branch head. The body below is carried over from #62; note the final commits on this branch further removed the placeholder smoke test and test scaffolding per review.

What & Why

Retires the preview-state sf metadata enrich CLI command in favor of the sanctioned portable Skill (the supported migration target). This plugin's only command was metadata enrich, so retiring it effectively guts the plugin: the command and everything that existed solely to support it are removed. Resolves @W-23123159@.

Changes

  • Deleted the command: src/commands/metadata/enrich.ts.
  • Deleted its message bundles: messages/metadata.enrich.md, messages/metrics.md, messages/errors.md.
  • Deleted its result schema: schemas/metadata-enrich.json.
  • Deleted its tests: test/nuts/enrich.nut.ts, test/unit/enrichmentRecords.test.ts, test/unit/componentProcessor.test.ts.
  • Emptied command-snapshot.json ([]) and removed the metadata oclif topic from package.json — no dangling metadata:enrich registration.
  • Dropped the now-unused @salesforce/metadata-enrichment dependency, plus stale /messages and /schemas entries from the package files array.
  • Per review, fully retired the plugin: removed remaining runtime deps, deleted command-snapshot.json + supporting tooling, and removed the placeholder smoke test and test scaffolding.
  • Updated README.md with a deprecation/retirement notice pointing users to the Skill.

Acceptance criteria

  • sf metadata enrich command removed; oclif command/topic registration and snapshot cleaned; no dangling metadata:enrich.
  • Deprecate + unpublish the npm package @salesforce/plugin-metadata-enrichment — ops step requiring npm publish rights (see below).
  • Docs / examples updated to point users to the Skill.

Required follow-up ops step (npm)

Per the story, the command and its hosting package retire together. The npm side can't be done from this PR (needs publish rights):

npm deprecate @salesforce/plugin-metadata-enrichment "Retired in favor of the portable Skill"
npm unpublish @salesforce/plugin-metadata-enrichment --force

Verification

  • yarn build (compile + lint) — passes.
  • yarn test — passes (command-reference + lint + link-check).
  • Repo-wide grep — no remaining metadata:enrich, MetadataEnrich, or @salesforce/metadata-enrichment references outside the README deprecation notice and CHANGELOG.

🤖 Generated with Claude Code

@kumar-aman2-general
kumar-aman2-general requested review from a team as code owners July 7, 2026 13:13
@kumar-aman2-general kumar-aman2-general changed the title @W-23123159 - feat: delete the sf metadata enrich CLI command @W-23123159@ - feat: delete the sf metadata enrich CLI command Jul 7, 2026
TESTKIT_SETUP_RETRIES: 2
SF_DISABLE_TELEMETRY: true
DEBUG: ${{ vars.DEBUG }}
# NUTs (integration tests) were removed along with the retired `sf metadata enrich`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to still have this file?

@kumar-aman2-general kumar-aman2-general Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes Shipra, even without commands it still runs lockfile check + compile + lint + command-reference, so it catches any future break. Only removed the NUT jobs since there are no .nut.ts files.

Comment thread .husky/pre-push Outdated
. "$(dirname "$0")/_/husky.sh"

yarn build && yarn run test:only -- --forbid-only
yarn build

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file needed?

@kumar-aman2-general kumar-aman2-general Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Shipra, it was just a local pre-push convenience hook. Removed it.

Comment thread .sfdevrc.json
@@ -0,0 +1,21 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Showing a new file?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this one's needed. dev-scripts' standardizer rewrites package.json on install and assumes every plugin has a test/ dir (forces eslint src test, adds test:only etc.). Since we deleted test/, that failed CI with "No files matching test". This .sfdevrc.json overrides those defaults back to src-only so the build stays green.

kumar-aman2-general and others added 7 commits July 8, 2026 09:49
Retire the preview-state `sf metadata enrich` CLI command in favor of the
sanctioned portable Skill migration target. This plugin's only command was
`metadata enrich`, so the command and everything that existed solely to
support it are removed.

- Delete src/commands/metadata/enrich.ts (the command)
- Delete its message bundles (metadata.enrich.md, metrics.md, errors.md)
- Delete its result schema (schemas/metadata-enrich.json)
- Delete its tests (enrich.nut.ts, enrichmentRecords.test.ts, componentProcessor.test.ts)
- Empty command-snapshot.json and remove the `metadata` oclif topic
- Drop the now-unused @salesforce/metadata-enrichment dependency
- Drop stale /messages and /schemas entries from package "files"
- Add a placeholder smoke test so the test pipeline stays coherent
- Update README with a deprecation/retirement notice pointing to the Skill

The hosting npm package @salesforce/plugin-metadata-enrichment must be
deprecated and unpublished as a separate ops step (needs npm publish rights):
  npm deprecate @salesforce/plugin-metadata-enrichment "Retired in favor of the portable Skill"
  npm unpublish @salesforce/plugin-metadata-enrichment --force

Verified: build (compile + lint), unit tests, and snapshot deprecation-policy
check all pass; no dangling metadata:enrich references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address reviewer feedback (ShipraShreyasi, william-xie-sf): fully retire the
plugin rather than leaving a functional-but-command-less shell.

- Remove all runtime dependencies (were used only by the deleted command)
- Delete command-snapshot.json and its supporting tooling
  (@oclif/plugin-command-snapshot devPlugin/dep, test:deprecation-policy
  and test:json-schema wireit steps, snapshot refs in format)
- Trim README to the deprecation notice + Issues (drop Build/Contributing/
  Commands boilerplate that contradicted "no longer ships a command")

Build, lint, and the full test suite pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The retired plugin ships no commands, so the placeholder smoke test added
to keep the mocha pipeline coherent is unnecessary. Per review feedback,
delete test/unit/smoke.test.ts along with the now-empty test/ scaffolding
(tsconfig, eslintrc), and drop the test:only / test:compile wireit targets
and test-dir globs from lint/format. The test pipeline now runs
command-reference + lint + link-check, which stay green with no commands
and no unit tests. yarn build and yarn test pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…a test/ dir

The plugin is now a command-less tombstone with no test/ directory (removed in
190506d per review). @salesforce/dev-scripts' install-time standardizer rewrites
package.json to the plugin defaults, which assume every plugin has tests: it
forces `lint`/`fix-license` to `eslint src test`, injects test:only/test:compile,
and adds them to the `test` wireit target. With no test/ dir, `eslint src test`
fails CI ("No files matching the pattern \"test\"").

Add an .sfdevrc.json that dev-scripts merges over its defaults:
- override wireit.lint/format and scripts.fix-license back to `src`-only
- exclude the test-dir scripts (test:only, test:compile, test:deprecation-policy,
  test:json-schema) so they aren't injected
- override the `test` target to depend only on command-reference, lint, link-check

Verified: yarn build and yarn test pass; sf-install no longer rewrites any script.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tracked .husky/pre-push ran `yarn run test:only`, but the retired plugin
has no test/ dir and test:only is excluded via .sfdevrc.json, so every push
failed with "Command test:only not found". dev-scripts only seeds husky hooks
when none exist (husky-init.js), so this tracked edit is durable. Reduce the
hook to `yarn build`, which via wireit runs compile + lint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tombstone has no *.nut.ts files (deleted with the `sf metadata enrich`
command), so `yarn test:nuts` (mocha "**/*.nut.ts") failed every run with
"No test files found", taking down the `nuts` matrix and the
`nuts-pilot-perm-disabled` job.

Remove both nuts jobs from test.yml and drop the now-orphaned test:nuts
script. CI keeps lockfile-check + linux/windows unit tests, which pass.
There is nothing left to integration-test, and this drops the JWT/org
secret dependency the nuts jobs required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The retired plugin isn't actively developed, so the local pre-push
convenience hook (yarn build) is unnecessary. Removing per review feedback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kumar-aman2-general
kumar-aman2-general force-pushed the W-23123159-delete-enrich-cli branch from 6c7c5e7 to 1facc5d Compare July 8, 2026 04:19
@kumar-aman2-general
kumar-aman2-general merged commit 0ded880 into main Jul 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants