@W-23123159 - feat: delete the sf metadata enrich CLI command#62
@W-23123159 - feat: delete the sf metadata enrich CLI command#62kumar-aman2-general wants to merge 3 commits into
Conversation
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>
Heads-up for reviewers: one follow-up step + a downstream dependencyThis PR removes the 1. There's an npm step that can't be done in this PR. npm deprecate @salesforce/plugin-metadata-enrichment "Retired in favor of the portable Skill"
npm unpublish @salesforce/plugin-metadata-enrichment --forceNote: 2. Merging this unblocks another story. So the order is: merge this + MCP #470 → publish → then W-23123169 can proceed. Nothing in the code here is blocked — build, unit tests, lint, and the snapshot deprecation-policy check all pass, and the CLA is signed. Just flagging the human/ops steps so they don't fall through the cracks. |
| @@ -1,11 +0,0 @@ | |||
| # errors.component.not.found | |||
|
|
|||
| Component not found in project. | |||
|
Have you considered just archiving the repository (removing all credentials and publish steps) and doing the npm unpublish so it can't be installed anymore? Is there any value to removing the code when it can just be accessed in the commit history? |
Hey @william-xie-sf , I looked into both: npm unpublish: 0.1.3 was published ~29 days ago, so it's outside npm's 72-hour unpublish window. Past that, npm only allows it under narrow conditions and for @salesforce-scoped packages it usually needs the npm org owner and is often restricted so I don't think "unpublish so it can't be installed" is reliably available. deprecate is the realistic end state. Happy to defer to whoever owns the npm org to confirm. Archiving the repo: fully agree as a follow-up, it's a single-command plugin, no reason to keep it writable once this lands. I'd treat it as complementary rather than a replacement, since archiving alone leaves main showing a working command and leaves published 0.1.3 still installable. "Why delete the code if git history keeps it?": fair point on history, but the deletion isn't about hiding the code, it's the prerequisite for the next step. 0.1.3 still depends on @salesforce/metadata-enrichment ^0.0.18, and W-23123169 (retire that shared library) is gated on nothing depending on it. Deprecating/archiving doesn't change what the published artifact depends on only publishing a new version with the dependency removed does, and that needs the code gone first. Unpublish would also satisfy the gate, but per above it's likely unavailable. Suggested order: merge this + mcp#470 → publish a new plugin version (dependency dropped) → deprecate on npm → archive the repo. Open to folding the archive into this if you'd prefer. |
| "plugin": "@salesforce/plugin-metadata-enrichment" | ||
| } | ||
| ] | ||
| [] |
There was a problem hiding this comment.
This file can be deleted
| ```bash | ||
| sf plugins install @salesforce/plugin-metadata-enrichment@x.y.z | ||
| ``` | ||
| > **⚠️ Deprecated and retired.** The `sf metadata enrich` CLI command and its npm package `@salesforce/plugin-metadata-enrichment` have been retired. Conversational and agent-assisted metadata enrichment is now served by the sanctioned portable Skill, which is the supported migration target. This repository no longer ships a CLI command. |
| @@ -10,7 +10,6 @@ | |||
| "@oclif/table": "^0.5.1", | |||
There was a problem hiding this comment.
This file can be deleted?
|
Can we do npm unpublish before deleting it? |
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>
|
Thanks @ShipraShreyasi, good call. I pushed a commit that fully guts the plugin instead of leaving a working shell:
Build, lint and tests all pass. On unpublishing before deleting: unpublish hits npm directly so the order doesn't really matter, but 0.1.3 is about a month old now and npm only lets you unpublish within 72 hours, so it'll probably get rejected anyway and needs whoever owns the npm org. So deprecate is realistically the end state, as a follow-up after merge. Happy to be corrected if someone knows the npm side better. cc: @william-xie-sf |
| it('ships no commands', () => { | ||
| expect(true).to.equal(true); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
This is showing as a new file. Please delete it
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>
What & Why
Retires the preview-state
sf metadata enrichCLI command in favor of the sanctioned portable Skill (the supported migration target). This plugin's only command wasmetadata enrich, so retiring it effectively guts the plugin: the command and everything that existed solely to support it are removed. Resolves W-23123159.Changes
src/commands/metadata/enrich.ts.messages/metadata.enrich.md,messages/metrics.md,messages/errors.md.schemas/metadata-enrich.json.test/nuts/enrich.nut.ts,test/unit/enrichmentRecords.test.ts,test/unit/componentProcessor.test.ts.command-snapshot.json([]) and removed themetadataoclif topic frompackage.json— no danglingmetadata:enrichregistration.@salesforce/metadata-enrichmentdependency, plus stale/messagesand/schemasentries from the packagefilesarray.test/lintpipeline stays coherent (dev-scripts lintssrc test).README.mdwith a deprecation/retirement notice pointing users to the Skill.Acceptance criteria
sf metadata enrichcommand removed; oclif command/topic registration and snapshot cleaned; no danglingmetadata:enrich.@salesforce/plugin-metadata-enrichment— ops step requiring npm publish rights (see below).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 --forceVerification
yarn build(compile + lint) — passes.yarn test:only— passes (smoke test).bin/dev.js snapshot:compare(deprecation policy) — "No changes have been detected".metadata:enrich,MetadataEnrich, or@salesforce/metadata-enrichmentreferences outside the README deprecation notice and CHANGELOG.🤖 Generated with Claude Code