@getodk/xpath 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ export type AdapterAttribute<T extends XPathNode> = Extract<T, XPathAttribute>;
6
6
  export type AdapterText<T extends XPathNode> = Extract<T, XPathText>;
7
7
  export type AdapterComment<T extends XPathNode> = Extract<T, XPathComment>;
8
8
  export type AdapterProcessingInstruction<T extends XPathNode> = Extract<T, XPathProcessingInstruction>;
9
+ export type AdapterNode<T extends XPathNode> = AdapterChildNode<T> | AdapterParentNode<T>;
9
10
  export type AdapterParentNode<T extends XPathNode> = AdapterDocument<T> | AdapterElement<T>;
10
11
  export type AdapterChildNode<T extends XPathNode> = AdapterElement<T> | AdapterText<T> | AdapterComment<T> | AdapterAttribute<T> | AdapterProcessingInstruction<T>;
11
12
  export type AdapterQualifiedNamedNode<T extends XPathNode> = AdapterElement<T> | AdapterAttribute<T>;
@@ -1,5 +1,5 @@
1
1
  import { XPathNode } from './XPathNode.ts';
2
- import { AdapterAttribute, AdapterChildNode, AdapterDocument, AdapterElement, AdapterNamespaceDeclaration, AdapterParentNode } from './XPathNodeKindAdapter.ts';
2
+ import { AdapterAttribute, AdapterChildNode, AdapterDocument, AdapterElement, AdapterNamespaceDeclaration, AdapterNode } from './XPathNodeKindAdapter.ts';
3
3
  export type DocumentOrderComparison = -1 | 0 | 1;
4
4
  export interface XPathTraversalAdapter<T extends XPathNode> {
5
5
  /**
@@ -14,7 +14,7 @@ export interface XPathTraversalAdapter<T extends XPathNode> {
14
14
  readonly getContainingDocument: (node: T) => AdapterDocument<T>;
15
15
  readonly getNamespaceDeclarations: (node: T) => ReadonlyArray<AdapterNamespaceDeclaration<T>>;
16
16
  readonly getAttributes: (node: T) => ReadonlyArray<AdapterAttribute<T>>;
17
- readonly getParentNode: (node: T) => AdapterParentNode<T> | null;
17
+ readonly getParentNode: (node: T) => AdapterNode<T> | null;
18
18
  readonly getChildNodes: (node: T) => ReadonlyArray<AdapterChildNode<T>>;
19
19
  readonly getChildElements: (node: T) => ReadonlyArray<AdapterElement<T>>;
20
20
  readonly getPreviousSiblingNode: (node: T) => AdapterChildNode<T> | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getodk/xpath",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "XPath implementation for ODK Web Forms",
6
6
  "type": "module",
@@ -53,7 +53,7 @@
53
53
  "test:types:test": "tsc --project ./test/tsconfig.json --emitDeclarationOnly false --noEmit"
54
54
  },
55
55
  "dependencies": {
56
- "@getodk/common": "0.11.0",
56
+ "@getodk/common": "0.11.1",
57
57
  "crypto-js": "^4.2.0",
58
58
  "temporal-polyfill": "^0.3.0"
59
59
  },