Repository navigation
Publish the styles as the @devexpress/vale-styles npm package - #10
Closed
AndreyKozhevnikov wants to merge 8 commits into
Closed
AndreyKozhevnikov wants to merge 8 commits into
AndreyKozhevnikov wants to merge 8 commits into
Conversation
Collaborator
Author
AndreyKozhevnikov
requested review from
SavchenkoAlexander and
skudnoff
and removed request for
SavchenkoAlexander
October 26, 2026 09:00
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.
vNext wants to run Vale on its whole documentation repository and keep the check green. To do that, it needs to take rules from this repository by version instead of copying them. This PR publishes the styles to GitHub Packages as
@devexpress/vale-styles. Each package version is tied to a Vale version through an optional peer dependency. Thevale/folder layout does not change, so teams that copy it are not affected.Changes
package.json):@devexpress/vale-styles@1.0.0, published tonpm.pkg.github.com. It shipsdist/andTHIRD_PARTY_NOTICES.md(the MIT attribution for the Microsoft rules).@vvago/vale ~3.25.1is an optional peer dependency (peerDependenciesMeta). It's an npm wrapper that downloads the Vale binary in a postinstall script. If a consumer installs it, npm checks its version. npm doesn't install it on its own, so consumers who run Vale from a Docker image or another source don't download a second binary.3.25.1exactly as a dev dependency.allowScriptsapproves the wrapper's postinstall for npm 11.scripts/build.mjs, no dependencies): assemblesdist/.dist/DevExpress/is a Vale package directory.styles/is copied fromvale/vale/styles/..vale.iniisvale/.vale.iniwithout itsStylesPathline, sovale/.vale.inistays the only config to maintain.dist/templates/holds the JUnit and rdjsonl templates.Packages = node_modules/@devexpress/vale-styles/dist/DevExpressand runvale sync. Vale merges the package config underneath theirs.scripts/smoke-test.mjs,npm test): builds the package and syncs it into a temporary consumer. It fails if any of the following happens:DX,MicrosoftorVocab = DX.vale/vale/tests/clean.mdproduces any alert.CLAUDE.mdisn't skipped, or a consumer's own vocabulary doesn't combine withDX.npm packfile list differs from the expected one..github/workflows/ci.yml): runsnpm ciandnpm teston pull requests and on pushes tomain..github/workflows/release.yml): runs on avX.Y.Ztag, in two jobs.testrunsnpm ciandnpm testwith a read-only token.publishgetscontents: writeandpackages: writeand runs no third-party code: no install and no Vale binary.npm publishbuildsdist/throughprepackwith the dependency-freebuild.mjs. Both checkouts usepersist-credentials: false.publishfirst checks the tag againstpackage.jsonandCHANGELOG.md. For a stable tag, it also checks two things. The tagged commit must be in the first-parent history ofmain, so a commit from the PR branch fails even after the merge. The version must not be lower than the currentlatestdist-tag.vX.Y.Z-rc.Ntag on any commit publishes under thenextdist-tag and creates a GitHub prerelease. The notes come from the## X.Y.Zsection, or fromUnreleasedif that section doesn't exist yet. npm 11 rejects prerelease publishes without an explicit--tag.README.mdadds consumer setup:.npmrcand a token for local installs.vale.ini.gitignorepatternGITHUB_TOKENIt also adds sections on the version policy, development, releases, "Test a Release", and package visibility.
New
CHANGELOG.md.Reviewer notes
CHANGELOG.mdentry.npm ci,npm testand any other third-party code out of thepublishjob. Install scripts and the downloaded Vale binary must not run next to the write token. A comment at the top ofrelease.ymlsays this.mainand not older thanlatest" step, sov1.0.0is its first real run. If a check fails, nothing is published. Delete the tag and tag the correct commit (README, "Release a Version").v1.0.0-rc.1already created this one. An org owner must set its visibility to internal, or add each consumer repository under Manage Actions access.@vvago/vale: a community wrapper with a single maintainer. It's pinned exactly and locked. The peer version check only covers consumers who install it from npm. Consumers who run Vale from a Docker image must match the version themselves.v1.0.0on the merge commit onmainto publish. Because the tag goes on the merge commit, the1.0.0changelog date (2026-10-23) must be correct in this PR. Update it if the merge happens later. You can delete thev1.0.0-rc.1andv1.0.0-rc.2prereleases and package versions afterwards.Testing
npm test) passes on the PR head (5347d73).v1.0.0-rc.2(5347d73 plus the version bump) ranrelease.yml. Both jobs passed, the workflow published@devexpress/vale-styles@1.0.0-rc.2undernext, and it created the GitHub prerelease. The stable-tag check was skipped, as designed for prereleases.DevExpress/kozhevnikov-testinstalled1.0.0-rc.2in itsValeworkflow using only its ownGITHUB_TOKEN(packages: read, no stored secret).@vvago/vale@3.25.1was deduped against the peer. The workflow linted a test page that covers every DX and Microsoft rule. Vale reported 43 errors and 27 warnings, matching the page's labels; the lint step fails on purpose. The only flaggedCorrect:line is a knownMicrosoft.Unitscase.clean.md.1.0.0tarball with@vvago/vale@3.20.0fails withERESOLVE(conflictingpeerOptional). The tarball on its own installs without@vvago/vale.