-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for non-browser specs #496
Merged
Merged
Conversation
This file contains 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
This update brings a number of changes to the preparation and release of browser-specs as an NPM package in order to support extending the list of specs to also contain specs that are not targeted at browsers. A new `categories` property was added to the description of specs. It contains a list of categories that the spec belongs to. The only category so far is `"browser"` for specs that target web browsers. That category is automatically computed based on the name of the group that develops the spec for now. Explicit info in `specs.json` may be used to override the computed value. The code reuses the list of groups and repos in `src/data/ignore.json` to identify specs that do not target web browsers for the time being. That list should get split into two lists on a short term basis: a list of groups and repos that `find-specs.js` should indeed ignore, and a list of groups and repos linked to specs that are not targeted at browsers (we won't ignore them anymore, but we won't flag them with a `"browser"` category). That split is not done in this update. In general, I expect the logic in `compute-categories.js` to evolve based on non-browser specs that we add to the list. The release workflow is a copy-and-paste from the one used in webref: - A new `packages` folder contains the list of packages that can be released. Two packages: `web-specs` which contains all the specs, and `browser-specs` which contains all specs that target Web browsers. - A `prepare-packages.js` script prepares the contents of these packages. - A `bump-packages-minor.js` script bumps the minor version of these packages whenever a new spec gets added to the package or when a spec gets removed. - A `prepare-release.js` script prepares a pre-release PR per package that contains the diff to release (the actual PR is a patch bump on the package version) - A `release-package.js` script actually releases the packages to NPM when the pre-release PR gets merged. Jobs were adjusted accordingly. In particular, the build job now only commits updates provided that tests pass, so as not to end up with a committed list that we know is wrong. It also creates the pre-release PRs as needed. The release job tags the released commit on the main branch, and updates the `web-specs@latest` and `browser-specs@latest` branches. The `web-specs@latest` is the one intended to be published to GitHub Pages. Note the packages READMEs are automatically completed based on the main README. It could be interesting to further general common scripts between browser-specs and webref. The scripts are sufficiently similar that this seems worth pursuing, and sufficiently different that this makes is a bit painful. Plus I'm not too crazy about having to create yet another repo for hosting that common glue code. I propose to address that later on. This addresses #436.
kudos again on a giant piece of work! |
Co-authored-by: Dominique Hazael-Massieux <dom@w3.org>
The i18n glossary spec is rather flagged as non-browser in specs.json
dontcallmedom
approved these changes
Feb 8, 2022
Markdown does not seem to like it when a comment is followed by text on the same line...
The versions in the `package.json` files now represent the version that will be published.
OK, I wouldn't be surprised if we end up needing to fix a few things in the jobs here and there, but I'll give it a shot ;) |
This was referenced Feb 8, 2022
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.
This addresses #436.
This update brings a number of changes to the preparation and release of browser-specs as an NPM package in order to support extending the list of specs to also contain specs that are not targeted at browsers.
A new
categories
property was added to the description of specs. It contains a list of categories that the spec belongs to. The only category so far is"browser"
for specs that target web browsers. That category is automatically computed based on the name of the group that develops the spec for now. Explicit info inspecs.json
may be used to override the computed value.The code reuses the list of groups and repos in
src/data/ignore.json
to identify specs that do not target web browsers for the time being. That list should get split into two lists on a short term basis: a list of groups and repos thatfind-specs.js
should indeed ignore, and a list of groups and repos linked to specs that are not targeted at browsers (we won't ignore them anymore, but we won't flag them with a"browser"
category). That split is not done in this update. In general, I expect the logic incompute-categories.js
to evolve based on non-browser specs that we add to the list.The release workflow is a copy-and-paste from the one used in webref:
packages
folder contains the list of packages that can be released. Two packages:web-specs
which contains all the specs, andbrowser-specs
which contains all specs that target Web browsers.prepare-packages.js
script prepares the contents of these packages.bump-packages-minor.js
script bumps the minor version of these packages whenever a new spec gets added to the package or when a spec gets removed.prepare-release.js
script prepares a pre-release PR per package that contains the diff to release (the actual PR is a patch bump on the package version)release-package.js
script actually releases the packages to NPM when the pre-release PR gets merged.Jobs were adjusted accordingly. In particular, the build job now only commits updates provided that tests pass, so as not to end up with a committed list that we know is wrong. It also creates the pre-release PRs as needed.
The release job tags the released commit on the main branch, and updates the
web-specs@latest
andbrowser-specs@latest
branches. Theweb-specs@latest
is the one intended to be published to GitHub Pages.Notes:
Things to do before the PR may be merged:
web-specs
npm packageweb-specs@latest
andbrowser-specs@latest
branchesweb-specs
in Reffy (otherwise we'll lose specs such as the W3C Patent Policy or the i18n glossary from Webref)Things to do before we add further non-browser specs to the list: