chore: default to private npm publishing and unify publish scripts#1002
chore: default to private npm publishing and unify publish scripts#1002jacobsimionato wants to merge 3 commits intogoogle:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request standardizes the npm publishing workflow across all @a2ui web packages by separating the default private publishing command from a new public publishing script. Key changes include updating the documentation to include the React package, bumping the web_core version to 0.9.0, and enhancing the shared prepare-publish.mjs script to support peer dependency updates and more reliable path resolution. Additionally, the package-specific preparation script for markdown-it was removed in favor of the shared utility. I have no feedback to provide.
|
Why are we defaulting to private publishing, I don't think we can even do that, right? The NPM org is a public-only org, we'd have to upgrade it to support private publishing. |
Description of Changes
This PR updates the npm publishing configuration for all web renderer packages to default to private publishing and unifies the pre-publish preparation scripts.
--access publicflag from thepublish:packageNPM scripts across all renderer packages (web_core,angular,lit,react, andmarkdown-it). Scoped@a2uipackages will now default to private publishing.publish:publicscript to all packages which callsnpm run publish:package -- --access publicfor intentional public releases.renderers/markdown/markdown-it/prepare-publish.mjsscript.renderers/scripts/prepare-publish.mjsto resolve paths relative toimport.meta.url(instead ofprocess.cwd()), allowing it to be safely executed from nested package directories likemarkdown-it.@a2ui/web_coreis correctly version-bumped inpeerDependencies.renderers/docs/web_publishing.mdto reflect the inclusion of thereactpackage, explain the new default private publishing behavior, and document thepublish:publiccommand.Rationale
By defaulting to private publishing, we reduce the risk of accidentally releasing unfinished packages publicly. Furthermore, unifying
prepare-publish.mjsensures all renderer packages share the exact same publishing metadata preparation logic (such as strippingdevDependenciesand updatingfile:dependencies), making the repository easier to maintain.Testing/Running Instructions
cd renderers/markdown/markdown-it).npm run buildfollowed bynode ../../scripts/prepare-publish.mjs.dist/package.jsonfile. Ensure that:@a2ui/web_coreversion inpeerDependencies/dependencieshas been correctly updated to^0.9.0.devDependencieshave been removed.main,types, andexportsno longer contain the./dist/prefix.npm run publish:packagewill prepare the dist folder and runnpm publish dist/(which defaults to private). Runningnpm run publish:publicwill append--access public.