Skip to content

Commit

Permalink
chore(deps-dev): bump prettier from 3.3.0 to 3.4.1 (w3c#1895)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump prettier from 3.3.0 to 3.4.1

Bumps [prettier](https://github.com/prettier/prettier) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.3.0...3.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* remove prettier warnings

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Denis Ah-Kang <denis@w3.org>
  • Loading branch information
dependabot[bot] and deniak authored Dec 2, 2024
1 parent 2289eac commit 3d89a75
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 134 deletions.
184 changes: 92 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ The following example run tests to all the documents, but limit to `copyright` r
$ RULE=copyright TYPE=noCopyright npm run test
```

- http://localhost:8001/doc-views/TR/Recommendation/WD?rule=copyright&type=noCopyright
- http://localhost:8001/doc-views/TR/Registry/CRYD/?rule=copyright&type=noCopyright
- http://localhost:8001/doc-views/TR/Note/DNOTE-Echidna?rule=copyright&type=noCopyright
- ... and all profiles
- http://localhost:8001/doc-views/TR/Recommendation/WD?rule=copyright&type=noCopyright
- http://localhost:8001/doc-views/TR/Registry/CRYD/?rule=copyright&type=noCopyright
- http://localhost:8001/doc-views/TR/Note/DNOTE-Echidna?rule=copyright&type=noCopyright
- ... and all profiles

## 4. JS API

Expand All @@ -161,14 +161,14 @@ const specberus = new Specberus(apiKey);

This method takes an object with the following fields:

- `url`: URL of the content to check. One of `url`, `source`, `file`, or `document` must be
specified and if several are they will be used in this order.
- `source`: A `String` with the content to check.
- `file`: A file system path to the content to check.
- `document`: A DOM `Document` object to be checked.
- `profile`: A profile object which defines the validation. Required. See below.
- `events`: An event sink which supports the same interface as the Node.js `EventEmitter`. Required. See
below for the events that get generated.
- `url`: URL of the content to check. One of `url`, `source`, `file`, or `document` must be
specified and if several are they will be used in this order.
- `source`: A `String` with the content to check.
- `file`: A file system path to the content to check.
- `document`: A DOM `Document` object to be checked.
- `profile`: A profile object which defines the validation. Required. See below.
- `events`: An event sink which supports the same interface as the Node.js `EventEmitter`. Required. See
below for the events that get generated.

### `extractMetadata(options)`

Expand All @@ -180,24 +180,24 @@ goals of this method).

`this.meta` will be an `Object` and may include up to 16 properties described below:

- `profile`
- `title`: The (possible) title of the document.
- `docDate`: The date associated to the document.
- `thisVersion`: URL of this version of the document.
- `latestVersion`: URL of the latest version of the document.
- `previousVersion`: URL of the previous version of the document (the last one, if multiple are shown).
- `editorsDraft`: URL of the latest editor's draft.
- `delivererIDs`: ID(s) of the deliverer(s); an `Array` of `Number`s.
- `editorIDs`: ID(s) of the editor(s) responsible for the document; an `Array` of `Number`s.
- `informative`: Whether the document in informative or not.
- `process`: The process rules link.
- `sameWorkAs`: The previous shortlink if any.
- `implementationFeedbackDue`: The implementation review date for CRs.
- `prReviewsDue`: The review date for PRs.
- `implementationReport`: Implementation report link for CRs, PRs and RECs.
- `errata`: The errata link of the document.
- `substantiveChanges`: Whether the document is a REC and has proposed amendments
- `newFeatures`: Whether the document is a REC and has proposed additions
- `profile`
- `title`: The (possible) title of the document.
- `docDate`: The date associated to the document.
- `thisVersion`: URL of this version of the document.
- `latestVersion`: URL of the latest version of the document.
- `previousVersion`: URL of the previous version of the document (the last one, if multiple are shown).
- `editorsDraft`: URL of the latest editor's draft.
- `delivererIDs`: ID(s) of the deliverer(s); an `Array` of `Number`s.
- `editorIDs`: ID(s) of the editor(s) responsible for the document; an `Array` of `Number`s.
- `informative`: Whether the document in informative or not.
- `process`: The process rules link.
- `sameWorkAs`: The previous shortlink if any.
- `implementationFeedbackDue`: The implementation review date for CRs.
- `prReviewsDue`: The review date for PRs.
- `implementationReport`: Implementation report link for CRs, PRs and RECs.
- `errata`: The errata link of the document.
- `substantiveChanges`: Whether the document is a REC and has proposed amendments
- `newFeatures`: Whether the document is a REC and has proposed additions

If some of these pieces of metadata cannot be deduced, that key will not exist, or its value will not be defined.

Expand Down Expand Up @@ -302,11 +302,11 @@ e.g. https://www.w3.org/pubrules/api/validate?url=https://www.w3.org/TR/2021/WD-

Methods `metadata` and `validate` return a JSON object with these properties:

- `success` (`boolean`): whether the operation succeeded, or not.
- `errors` (`array`): all errors found.
- `warnings` (`array`): all warnings.
- `info` (`array`): additional, informative messages.
- `metadata` (`object`): extracted metadata; [see structure here](#extractmetadataoptions).
- `success` (`boolean`): whether the operation succeeded, or not.
- `errors` (`array`): all errors found.
- `warnings` (`array`): all warnings.
- `info` (`array`): additional, informative messages.
- `metadata` (`object`): extracted metadata; [see structure here](#extractmetadataoptions).

If there is an internal error, the document cannot be retrieved or is not recognised, or validation fails, both methods would return HTTP status code `400`.
Also, in the case of `validate`, `success` would be `false` and `errors.length > 0`.
Expand Down Expand Up @@ -354,65 +354,65 @@ When the profile is given by the user (instead of being set to `auto`), fewer it

Profiles are simple objects that support the following API:

- name: A `String` being the name of this profile.
- rules: An `Array` of rule objects which are checked in this profile.
- name: A `String` being the name of this profile.
- rules: An `Array` of rule objects which are checked in this profile.

A profile is basically a configuration of what to check. You can load a specific profile from under
`lib/profiles` or create your own.

Here follows the current hierarchy of profiles. Each profile inherits all rules from its parent profile.
Profiles that are identical to its parent profile, ie that do not add any new rules, are marked too.

- `base`
- `TR`
- `WD`
- `WD-Echidna`
- `FPWD` (identical)
- `PR`
- `CR`
- `CR-Echidna`
- `CRD`
- `CRD-Echidna`
- `REC`
- `REC-OBSOLETE`
- `REC-RSCND`
- `REC-SUPERSEDED`
- `DNOTE`
- `DNOTE-Echidna`
- `NOTE`
- `NOTE-Echidna`
- `STMT`
- `DRY`
- `CRY`
- `CRYD`
- `RY`
- `Submission`
- `SUBM`
- `MEM-SUBM`
- `base`
- `TR`
- `WD`
- `WD-Echidna`
- `FPWD` (identical)
- `PR`
- `CR`
- `CR-Echidna`
- `CRD`
- `CRD-Echidna`
- `REC`
- `REC-OBSOLETE`
- `REC-RSCND`
- `REC-SUPERSEDED`
- `DNOTE`
- `DNOTE-Echidna`
- `NOTE`
- `NOTE-Echidna`
- `STMT`
- `DRY`
- `CRY`
- `CRYD`
- `RY`
- `Submission`
- `SUBM`
- `MEM-SUBM`

## 7. Validation events

For a given checking run, the event sink you specify will be receiving a bunch of events as
indicated below. Events are shown as having parameters since those are passed to the event handler.

- `start-all(profile-name)`: Fired first to indicate that the profile's checking has started.
- `end-all(profile-name)`: Fired last to indicate that the profile's checking has completed. When
you receive this you are promised that all testing operations, including asynchronous ones, have
terminated.
- `done(rule-name)`: Fired when a specific rule has finished processing, including its asynchronous
tasks.
- `ok(rule-name)`: Fired to indicate that a rule has succeeded. There is only one `ok` per rule.
There cannot also be `err` events but there can be `warning` events.
- `err(error-name, data)`: Fired when an error is detected. The `data` contains further details,
that depend on the error but _should_ feature a `message` field. There can be multiple errors for
a given rule. There cannot also be `ok` events but there can be `warning`s.
- `warning(warnings-name, data)`: Fired for non-fatal problems with the document that may
nevertheless require investigation. There may be several for a rule.
- `info(info-name, data)`: Fired for additional information items detected by the validator.
- `metadata(key, value)`: Fired for every piece of document metadata found by the validator.
- `exception(message)`: Fired when there is a system error, such as a _File not found_ error. `message`
contains details about this error. All exceptions are displayed on the error console in addition to
this event being fired.
- `start-all(profile-name)`: Fired first to indicate that the profile's checking has started.
- `end-all(profile-name)`: Fired last to indicate that the profile's checking has completed. When
you receive this you are promised that all testing operations, including asynchronous ones, have
terminated.
- `done(rule-name)`: Fired when a specific rule has finished processing, including its asynchronous
tasks.
- `ok(rule-name)`: Fired to indicate that a rule has succeeded. There is only one `ok` per rule.
There cannot also be `err` events but there can be `warning` events.
- `err(error-name, data)`: Fired when an error is detected. The `data` contains further details,
that depend on the error but _should_ feature a `message` field. There can be multiple errors for
a given rule. There cannot also be `ok` events but there can be `warning`s.
- `warning(warnings-name, data)`: Fired for non-fatal problems with the document that may
nevertheless require investigation. There may be several for a rule.
- `info(info-name, data)`: Fired for additional information items detected by the validator.
- `metadata(key, value)`: Fired for every piece of document metadata found by the validator.
- `exception(message)`: Fired when there is a system error, such as a _File not found_ error. `message`
contains details about this error. All exceptions are displayed on the error console in addition to
this event being fired.

## 8. Writing rules

Expand All @@ -422,14 +422,14 @@ they're done.

The Specberus object exposes the following API that's useful for validation:

- `loader`. The loader object that loaded the content, which exposes the content's `url` and
`source` if they are known.
- `sink`. The event target on which to fire validation events.
- `version`. The Specberus version.
- `checkSelector(selector, rule-name, cb)`. Some rules need to do nothing other than to check that a
selector returns some content. For this case, the rule can just call this method with the selector
and its callback, and Specberus will conveniently take care of all the rest.
- `norm(text)`. Returns a whitespace-normalised version of the text.
- `getDocumentDate()`. Returns a Date object that matches the document's date as specified in the
headers' `stateElement` (id="w3c-state").
- `getDocumentStateElement()`. Returns the element that contains the document's date.
- `loader`. The loader object that loaded the content, which exposes the content's `url` and
`source` if they are known.
- `sink`. The event target on which to fire validation events.
- `version`. The Specberus version.
- `checkSelector(selector, rule-name, cb)`. Some rules need to do nothing other than to check that a
selector returns some content. For this case, the rule can just call this method with the selector
and its callback, and Specberus will conveniently take care of all the rest.
- `norm(text)`. Returns a whitespace-normalised version of the text.
- `getDocumentDate()`. Returns a Date object that matches the document's date as specified in the
headers' `stateElement` (id="w3c-state").
- `getDocumentStateElement()`. Returns the element that contains the document's date.
74 changes: 37 additions & 37 deletions doc/Presentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ _Specberus_ is expected to replace the [current pubrules tool](https://www.w3.or

--

- Complex maintenance.
- XSLT is not flexible enough.
- There is no clear separation between the documentation (_human-readable publication rules_) and the automatic checker (_the software_).
- Difficult to integrate within the broader publication workflow.
- Complex maintenance.
- XSLT is not flexible enough.
- There is no clear separation between the documentation (_human-readable publication rules_) and the automatic checker (_the software_).
- Difficult to integrate within the broader publication workflow.

---

Expand Down Expand Up @@ -140,55 +140,55 @@ Using [Jenkins](https://jenkins-ci.org/).

`# apt-get install`:

- [`nodejs`](https://nodejs.org/)
- [`npm`](https://github.com/isaacs/npm)
- [`nodejs`](https://nodejs.org/)
- [`npm`](https://github.com/isaacs/npm)

--

`$ npm install`
(but you can do `npm install -d` instead to install all at once):

- [`express`](https://www.npmjs.org/package/express) (web framework)
- [`express-rest`](https://www.npmjs.org/package/express-rest) (REST server framework)
- [`socket.io`](https://www.npmjs.org/package/socket.io) (realtime application server and client)
- [`safe-url-input-checker`](https://www.npmjs.org/package/safe-url-input-checker) (URL checker)
- [`superagent`](https://www.npmjs.org/package/superagent) (HTTP request library)
- [`whacko`](https://www.npmjs.org/package/whacko) (HTML parser)
- [`express`](https://www.npmjs.org/package/express) (web framework)
- [`express-rest`](https://www.npmjs.org/package/express-rest) (REST server framework)
- [`socket.io`](https://www.npmjs.org/package/socket.io) (realtime application server and client)
- [`safe-url-input-checker`](https://www.npmjs.org/package/safe-url-input-checker) (URL checker)
- [`superagent`](https://www.npmjs.org/package/superagent) (HTTP request library)
- [`whacko`](https://www.npmjs.org/package/whacko) (HTML parser)

---

# How: dependencies for debugging

Necessary for development, testing and debugging:

- [`mocha`](https://www.npmjs.org/package/mocha) (JavaScript test framework)
- [`expect.js`](https://www.npmjs.org/package/expect.js) (assertion library)
- [`mocha`](https://www.npmjs.org/package/mocha) (JavaScript test framework)
- [`expect.js`](https://www.npmjs.org/package/expect.js) (assertion library)

--

Nice to have for debugging:

- [`node-debug`](https://www.npmjs.org/package/debug)
- [`node-debug`](https://www.npmjs.org/package/debug)

---

# How Specberus has improved recently

`0.3.3``0.4.0`

- Recursive validation of compound documents.
- Better heuristics to detect and check dates, WG's, etc.
- Better output, more detailed feedback to the user:
- Colour-coding error/warning messages.
- Informative messages can be displayed, too.
- Ability to include markup in the output, eg hyperlinks.
- Added a _summary of results_, with internal links.
- Implemented a few new rules.
- Some enhancements related to usability and design.
- Extended the suite of tests (there are 63 individual tests now).
- Bug-fixing.
- Deployed on a dedicated _Node.js_ server.
- Exposing a REST API to enable integration within the broader publication workflow [WIP].
- Recursive validation of compound documents.
- Better heuristics to detect and check dates, WG's, etc.
- Better output, more detailed feedback to the user:
- Colour-coding error/warning messages.
- Informative messages can be displayed, too.
- Ability to include markup in the output, eg hyperlinks.
- Added a _summary of results_, with internal links.
- Implemented a few new rules.
- Some enhancements related to usability and design.
- Extended the suite of tests (there are 63 individual tests now).
- Bug-fixing.
- Deployed on a dedicated _Node.js_ server.
- Exposing a REST API to enable integration within the broader publication workflow [WIP].

---

Expand All @@ -212,8 +212,8 @@ Nice to have for debugging:

You are encouraged to try this new checker, and especially to submit bug reports and suggestions.

- General feedback about the publication workflow: [`public-pubrules-comments@w3.org`](public-pubrules-comments@w3.org)
- Specific bugs or ideas about the pubrules checker: [`https://github.com/w3c/specberus/issues`](https://github.com/w3c/specberus/issues)
- General feedback about the publication workflow: [`public-pubrules-comments@w3.org`](public-pubrules-comments@w3.org)
- Specific bugs or ideas about the pubrules checker: [`https://github.com/w3c/specberus/issues`](https://github.com/w3c/specberus/issues)

---

Expand All @@ -231,15 +231,15 @@ The `#pubrules` channel on [irc.w3.org](https://irc.w3.org/) is a good place if

## Deployments for testing

- Up to `v0.3.3-1`: [`https://pubrules.jit.su/`](https://pubrules.jit.su/).
- From: `V0.4.0` onwards: [`https://www.w3.org/2014/10/pubrules/`](https://www.w3.org/2014/10/pubrules).
- Up to `v0.3.3-1`: [`https://pubrules.jit.su/`](https://pubrules.jit.su/).
- From: `V0.4.0` onwards: [`https://www.w3.org/2014/10/pubrules/`](https://www.w3.org/2014/10/pubrules).

---

# Who

- [Robin](https://github.com/darobin).
- [Denis](https://github.com/deniak).
- [Guillaume](https://github.com/guibbs).
- [Antonio](https://github.com/tripu).
- You!?
- [Robin](https://github.com/darobin).
- [Denis](https://github.com/deniak).
- [Guillaume](https://github.com/guibbs).
- [Antonio](https://github.com/tripu).
- You!?
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"nock": "13.5.0",
"nodemon": "3.0.1",
"nyc": "17.1.0",
"prettier": "3.3.0"
"prettier": "3.4.1"
},
"scripts": {
"build": "npm run lint && npm run test",
Expand Down

0 comments on commit 3d89a75

Please sign in to comment.