Conversation
Contributor
|
682f51a was deployed to: https://fred-pr1697.review.mdn.allizom.net/ |
Add a `fred` bin dispatching `server`/`ssr` subcommands so consumers can run `npx @mdn/fred ssr` instead of the squattable bare-bin form `npx fred-ssr`. Keep `fred-server`/`fred-ssr` as deprecated shims for backward compatibility, and switch the publish-simulation workflow to `npx @mdn/fred ssr`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a single
fredbinary that dispatchesserver/ssrsubcommands, so@mdn/fredcan be run asnpx @mdn/fred ssr. The existingfred-server/fred-ssrbinaries are kept as deprecated shims (which print a warning and delegate) for backward compatibility, and the publish-simulation workflow now usesnpx @mdn/fred ssr.bin/fred.jsdispatcher (fred <server|ssr>).fred-server/fred-ssrbins to deprecation shims inbin/.binentries inpackage.json/package-lock.jsonat the new wrappers.scripts/server.jsandbuild/ssr.js(no longerbinentries).npx @mdn/fred ssr.Motivation
Prevent the risk of bare
npx fred-server/npx fred-ssrresolving to squatted registry packages when@mdn/fredis not installed locally, by steering consumers to the unambiguousnpx @mdn/fred <command>(andnpx --package=@mdn/fred fred-ssrduring the deprecation window).Additional details
Both target invocations are verified to work:
npx @mdn/fred ssrproduces byte-identical output to runningbuild/ssr.jsdirectly, andnpx --package=@mdn/fred fred-ssrcontinues to work via the shim. The two standalone bins remain only as a temporary bridge and can be dropped in a future major.Related issues and pull requests
Part of #1680.