@W-23123159@ - feat: delete the sf metadata enrich CLI command#65
Conversation
| TESTKIT_SETUP_RETRIES: 2 | ||
| SF_DISABLE_TELEMETRY: true | ||
| DEBUG: ${{ vars.DEBUG }} | ||
| # NUTs (integration tests) were removed along with the retired `sf metadata enrich` |
There was a problem hiding this comment.
Do we need to still have this file?
There was a problem hiding this comment.
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.
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| yarn build && yarn run test:only -- --forbid-only | ||
| yarn build |
There was a problem hiding this comment.
Is this file needed?
There was a problem hiding this comment.
No Shipra, it was just a local pre-push convenience hook. Removed it.
| @@ -0,0 +1,21 @@ | |||
| { | |||
There was a problem hiding this comment.
Showing a new file?
There was a problem hiding this comment.
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.
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>
6c7c5e7 to
1facc5d
Compare
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.command-snapshot.json+ supporting tooling, and removed the placeholder smoke test and test scaffolding.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— passes (command-reference + lint + link-check).metadata:enrich,MetadataEnrich, or@salesforce/metadata-enrichmentreferences outside the README deprecation notice and CHANGELOG.🤖 Generated with Claude Code