New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@siteimprove/alfa-dom

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@siteimprove/alfa-dom - npm Package Compare versions

Comparing version 0.97.0 to 0.98.0

10

CHANGELOG.md
# @siteimprove/alfa-dom
## 0.98.0
### Minor Changes
- **Changed:** Node serialization with `Low` verbosity now also include the `Node#path`. ([#1748](https://github.com/Siteimprove/alfa/pull/1748))
### Patch Changes
- **Changed:** Classes that do not implement the Singleton pattern now have `protected` constructor and can be extended. ([#1735](https://github.com/Siteimprove/alfa/pull/1735))
## 0.97.0

@@ -4,0 +14,0 @@

5

dist/node.d.ts
import type { Device } from "@siteimprove/alfa-device";
import { Flags } from "@siteimprove/alfa-flags";
import { Serializable } from "@siteimprove/alfa-json";
import { Option } from "@siteimprove/alfa-option";

@@ -9,3 +10,3 @@ import type { Predicate } from "@siteimprove/alfa-predicate";

import type * as earl from "@siteimprove/alfa-earl";
import type * as json from "@siteimprove/alfa-json";
import * as json from "@siteimprove/alfa-json";
import type * as sarif from "@siteimprove/alfa-sarif";

@@ -44,2 +45,3 @@ import * as tree from "@siteimprove/alfa-tree";

equals(value: unknown): value is this;
toJSON(options?: Serializable.Options): Node.JSON<T>;
toEARL(): Node.EARL;

@@ -85,2 +87,3 @@ toSARIF(): sarif.Location;

interface JSON<T extends string = string> extends tree.Node.JSON<T> {
path?: string;
}

@@ -87,0 +90,0 @@ interface SerializationOptions extends json.Serializable.Options {

20

dist/node.js
import { Cache } from "@siteimprove/alfa-cache";
import { Comparable, Comparison, } from "@siteimprove/alfa-comparable";
import { Flags } from "@siteimprove/alfa-flags";
import { Serializable } from "@siteimprove/alfa-json";
import { Lazy } from "@siteimprove/alfa-lazy";

@@ -9,2 +10,3 @@ import { Option } from "@siteimprove/alfa-option";

import { String } from "@siteimprove/alfa-string";
import * as json from "@siteimprove/alfa-json";
import * as tree from "@siteimprove/alfa-tree";

@@ -111,6 +113,8 @@ import { Attribute, Comment, Document, Element, Fragment, Shadow, Slot, Slotable, Text, Type, } from "./index.js";

* @remarks
* It is important that this expansion happens **after** sorting by tabindex
* It is important that this expansion happens **after** sorting by
* tabindex
* since shadow DOM and content documents build their own sequential focus
* order that is inserted as-is in the light tree or parent browsing context.
* That is, a tabindex of 1 in a shadow tree or content document does
* order that is inserted as-is in the light tree or parent browsing
* context. That is, a tabindex of 1 in a shadow tree or content document
* does
* **not** come before a tabindex of 2 in the main document.

@@ -195,2 +199,12 @@ */

}
toJSON(options) {
const verbosity = options?.verbosity ?? json.Serializable.Verbosity.Medium;
return {
...super.toJSON(options),
...(json.Serializable.Verbosity.Minimal < verbosity &&
verbosity < json.Serializable.Verbosity.Medium
? { path: this.path(Node.composedNested) }
: {}),
};
}
toEARL() {

@@ -197,0 +211,0 @@ return {

@@ -20,3 +20,3 @@ import { Option } from "@siteimprove/alfa-option";

private _owner;
private constructor();
protected constructor(namespace: Option<Namespace>, prefix: Option<string>, name: N, value: string, externalId?: string, internalId?: string, extraData?: any);
get namespace(): Option<Namespace>;

@@ -23,0 +23,0 @@ get prefix(): Option<string>;

@@ -11,3 +11,3 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";

private readonly _data;
private constructor();
protected constructor(data: string, externalId?: string, internalId?: string, extraData?: any);
get data(): string;

@@ -14,0 +14,0 @@ /**

@@ -18,3 +18,3 @@ import { Array } from "@siteimprove/alfa-array";

private _frame;
private constructor();
protected constructor(children: Array<Node>, style: Iterable<Sheet>, externalId?: string, internalId?: string, extraData?: any);
get style(): Iterable<Sheet>;

@@ -21,0 +21,0 @@ get frame(): Option<Element>;

@@ -34,3 +34,3 @@ import type { Device } from "@siteimprove/alfa-device";

private readonly _boxes;
private constructor();
protected constructor(namespace: Option<Namespace>, prefix: Option<string>, name: N, attributes: Array<Attribute>, children: Array<Node>, style: Option<Block>, box: Option<Rectangle>, device: Option<Device>, externalId?: string, internalId?: string, extraData?: any);
get namespace(): Option<Namespace>;

@@ -37,0 +37,0 @@ get prefix(): Option<string>;

@@ -11,3 +11,3 @@ import type { Device } from "@siteimprove/alfa-device";

static empty(): Fragment;
private constructor();
protected constructor(children: Array<Node>, externalId?: string, internalId?: string, extraData?: any);
/**

@@ -14,0 +14,0 @@ * @internal

@@ -18,3 +18,3 @@ import { Option } from "@siteimprove/alfa-option";

private readonly _style;
private constructor();
protected constructor(children: Array<Node>, style: Array<Sheet>, mode: Shadow.Mode, externalId?: string, internalId?: string, extraData?: any);
get mode(): Shadow.Mode;

@@ -21,0 +21,0 @@ get host(): Option<Element>;

@@ -14,3 +14,3 @@ import type { Option } from "@siteimprove/alfa-option";

private readonly _data;
private constructor();
protected constructor(data: string, externalId?: string, internalId?: string, extraData?: any);
get data(): string;

@@ -17,0 +17,0 @@ assignedSlot(): Option<Slot>;

@@ -14,3 +14,3 @@ import { Option } from "@siteimprove/alfa-option";

private readonly _systemId;
private constructor();
protected constructor(name: N, publicId: Option<string>, systemId: Option<string>, externalId?: string, internalId?: string, extraData?: any);
get name(): N;

@@ -17,0 +17,0 @@ get publicId(): Option<string>;

@@ -13,3 +13,3 @@ import type { Equatable } from "@siteimprove/alfa-equatable";

private _declarations;
private constructor();
protected constructor(declarations: Array<Declaration>);
get declarations(): Iterable<Declaration>;

@@ -16,0 +16,0 @@ get size(): number;

@@ -31,3 +31,3 @@ import type { Equatable } from "@siteimprove/alfa-equatable";

private _owner;
private constructor();
protected constructor(name: string, value: string, important: boolean);
get name(): string;

@@ -34,0 +34,0 @@ get value(): string;

@@ -11,3 +11,3 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";

private readonly _style;
private constructor();
protected constructor(declarations: Array<Declaration>);
get style(): Block;

@@ -14,0 +14,0 @@ toJSON(): FontFaceRule.JSON;

@@ -20,3 +20,3 @@ import { Feature } from "@siteimprove/alfa-css-feature";

private _layer;
private constructor();
protected constructor(href: string, sheet: Sheet, mediaCondition: Option<string>, supportCondition: Option<string>, layer: Option<string>);
get supportCondition(): Option<string>;

@@ -23,0 +23,0 @@ get mediaQueries(): Feature.Media.List;

@@ -12,3 +12,3 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";

private readonly _style;
private constructor();
protected constructor(key: string, declarations: Array<Declaration>);
get key(): string;

@@ -15,0 +15,0 @@ get style(): Block;

@@ -10,3 +10,3 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";

private readonly _name;
private constructor();
protected constructor(name: string, rules: Array<Rule>);
get name(): string;

@@ -13,0 +13,0 @@ toJSON(): KeyframesRule.JSON;

@@ -27,3 +27,3 @@ import { Array } from "@siteimprove/alfa-array";

private readonly _layers;
private constructor();
protected constructor(layers: Array<string>);
get layers(): Iterable<string>;

@@ -48,3 +48,3 @@ toJSON(): StatementRule.JSON;

private readonly _layer;
private constructor();
protected constructor(layer: Option<string>, rules: Array<Rule>);
get layer(): Option<string>;

@@ -51,0 +51,0 @@ equals(value: unknown): value is this;

@@ -14,3 +14,3 @@ import { Feature } from "@siteimprove/alfa-css-feature";

private readonly _queries;
private constructor();
protected constructor(condition: string, rules: Array<Rule>);
get queries(): Feature.Media.List;

@@ -17,0 +17,0 @@ toJSON(): MediaRule.JSON;

@@ -11,3 +11,3 @@ import { Option } from "@siteimprove/alfa-option";

private readonly _prefix;
private constructor();
protected constructor(namespace: string, prefix: Option<string>);
get namespace(): string;

@@ -14,0 +14,0 @@ get prefix(): Option<string>;

@@ -12,3 +12,3 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";

private readonly _style;
private constructor();
protected constructor(selector: string, declarations: Array<Declaration>);
get selector(): string;

@@ -15,0 +15,0 @@ get style(): Block;

@@ -13,3 +13,3 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";

private readonly _hint;
private constructor();
protected constructor(selector: string, declarations: Array<Declaration>, hint: boolean);
get selector(): string;

@@ -16,0 +16,0 @@ get style(): Block;

@@ -14,3 +14,3 @@ import { Feature } from "@siteimprove/alfa-css-feature";

private readonly _query;
private constructor();
protected constructor(condition: string, rules: Array<Rule>);
get query(): Option<Feature.Supports.Query>;

@@ -17,0 +17,0 @@ toJSON(): SupportsRule.JSON;

@@ -15,3 +15,3 @@ import type { Equatable } from "@siteimprove/alfa-equatable";

private readonly _condition;
private constructor();
protected constructor(rules: Array<Rule>, disabled: boolean, condition: Option<string>);
get rules(): Iterable<Rule>;

@@ -18,0 +18,0 @@ get disabled(): boolean;

@@ -5,3 +5,3 @@ {

"homepage": "https://alfa.siteimprove.com",
"version": "0.97.0",
"version": "0.98.0",
"license": "MIT",

@@ -39,33 +39,33 @@ "description": "Implementations of the core DOM and CSSOM node types",

"dependencies": {
"@siteimprove/alfa-array": "^0.97.0",
"@siteimprove/alfa-cache": "^0.97.0",
"@siteimprove/alfa-comparable": "^0.97.0",
"@siteimprove/alfa-css": "^0.97.0",
"@siteimprove/alfa-css-feature": "^0.97.0",
"@siteimprove/alfa-device": "^0.97.0",
"@siteimprove/alfa-earl": "^0.97.0",
"@siteimprove/alfa-equatable": "^0.97.0",
"@siteimprove/alfa-flags": "^0.97.0",
"@siteimprove/alfa-iterable": "^0.97.0",
"@siteimprove/alfa-json": "^0.97.0",
"@siteimprove/alfa-lazy": "^0.97.0",
"@siteimprove/alfa-map": "^0.97.0",
"@siteimprove/alfa-option": "^0.97.0",
"@siteimprove/alfa-parser": "^0.97.0",
"@siteimprove/alfa-predicate": "^0.97.0",
"@siteimprove/alfa-rectangle": "^0.97.0",
"@siteimprove/alfa-refinement": "^0.97.0",
"@siteimprove/alfa-result": "^0.97.0",
"@siteimprove/alfa-sarif": "^0.97.0",
"@siteimprove/alfa-selective": "^0.97.0",
"@siteimprove/alfa-sequence": "^0.97.0",
"@siteimprove/alfa-slice": "^0.97.0",
"@siteimprove/alfa-string": "^0.97.0",
"@siteimprove/alfa-trampoline": "^0.97.0",
"@siteimprove/alfa-tree": "^0.97.0"
"@siteimprove/alfa-array": "^0.98.0",
"@siteimprove/alfa-cache": "^0.98.0",
"@siteimprove/alfa-comparable": "^0.98.0",
"@siteimprove/alfa-css": "^0.98.0",
"@siteimprove/alfa-css-feature": "^0.98.0",
"@siteimprove/alfa-device": "^0.98.0",
"@siteimprove/alfa-earl": "^0.98.0",
"@siteimprove/alfa-equatable": "^0.98.0",
"@siteimprove/alfa-flags": "^0.98.0",
"@siteimprove/alfa-iterable": "^0.98.0",
"@siteimprove/alfa-json": "^0.98.0",
"@siteimprove/alfa-lazy": "^0.98.0",
"@siteimprove/alfa-map": "^0.98.0",
"@siteimprove/alfa-option": "^0.98.0",
"@siteimprove/alfa-parser": "^0.98.0",
"@siteimprove/alfa-predicate": "^0.98.0",
"@siteimprove/alfa-rectangle": "^0.98.0",
"@siteimprove/alfa-refinement": "^0.98.0",
"@siteimprove/alfa-result": "^0.98.0",
"@siteimprove/alfa-sarif": "^0.98.0",
"@siteimprove/alfa-selective": "^0.98.0",
"@siteimprove/alfa-sequence": "^0.98.0",
"@siteimprove/alfa-slice": "^0.98.0",
"@siteimprove/alfa-string": "^0.98.0",
"@siteimprove/alfa-trampoline": "^0.98.0",
"@siteimprove/alfa-tree": "^0.98.0"
},
"devDependencies": {
"@siteimprove/alfa-test": "^0.97.0",
"@siteimprove/alfa-test": "^0.98.0",
"@types/jsdom": "^21.1.6",
"jsdom": "^25.0.0"
"jsdom": "^26.0.0"
},

@@ -72,0 +72,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc