Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Bump devDependencies (eslint 10, typescript 6, eslint-plugin-jsdoc 62, etc.).

## [2.0.2] - 2026-03-10

### Fixed
Expand All @@ -21,8 +24,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
predicted from developers (#351).

### Fixed
- Explicitly setting `reflect` to `false` now works. Previously, setting this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Wrote this one twice — just doing some unrelated cleanup. It didn’t feel like it warranted a separate commit / PR…

explicitly (versus omitting entirely) would cause a runtime error (#354).
- Custom element constructors are no longer invoked during template analysis.
Previously, the internal computation and caching of a `DocumentFragment` would
cause custom element’s constructors to run. Now, an inert document is used at
Expand Down
794 changes: 354 additions & 440 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@
],
"devDependencies": {
"@netflix/eslint-config": "3.0.0",
"@netflix/x-test": "2.0.0-rc.2",
"@netflix/x-test": "2.0.0-rc.6",
"@netflix/x-test-cli": "1.0.0-rc.2",
"esbuild": "0.27.0",
"eslint": "9.39.0",
"eslint-plugin-jsdoc": "61.1.11",
"puppeteer": "24.27.0",
"typescript": "5.9.3"
"esbuild": "0.27.4",
"eslint": "10.1.0",
"eslint-plugin-jsdoc": "62.8.0",
"globals": "17.4.0",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is added explicitly now. We were always importing it in our eslint config… so we should have had this all along, really.

"puppeteer": "24.40.0",
"typescript": "6.0.2"
},
"engines": {
"node": ">=22.14",
Expand Down
7 changes: 6 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
// https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html
"declarationMap": true,
"noEmitOnError": true,
"module": "NodeNext" // Approximates browser target.
"module": "NodeNext", // Approximates browser target.
// TODO: #357: Fix strict type errors.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will tackle this one-by-one, elsewhere. Way too much noise to pull it into this PR.

"noImplicitAny": false,
"strictNullChecks": false,
"useUnknownInCatchVariables": false,
"strictFunctionTypes": false
}
}
94 changes: 47 additions & 47 deletions types/x-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,56 +127,56 @@ export default class XElement extends HTMLElement {
* @returns {templateCallback}
*/
static template(html: (strings: TemplateStringsArray, ...values: unknown[]) => unknown): (properties: object, host: HTMLElement) => any;
static "__#private@#analyzeConstructor"(constructor: any): void;
static "__#private@#validateProperties"(constructor: any, properties: any, entries: any): void;
static "__#private@#validateProperty"(constructor: any, key: any, property: any): void;
static "__#private@#validatePropertyAttribute"(constructor: any, key: any, property: any, attribute: any): void;
static "__#private@#propertyIsCyclic"(property: any, inputMap: any, seen?: Set<any>): boolean;
static "__#private@#validateListeners"(constructor: any, listeners: any, entries: any): void;
static "__#private@#mutateProperty"(constructor: any, propertyMap: any, key: any, property: any): void;
static "__#private@#addPropertyInitial"(constructor: any, property: any): void;
static "__#private@#addPropertyDefault"(constructor: any, property: any): void;
static "__#private@#addPropertySync"(constructor: any, property: any): void;
static "__#private@#addPropertyReflect"(constructor: any, property: any): void;
static "__#private@#addPropertyCompute"(constructor: any, property: any): void;
static "__#private@#addPropertyObserve"(constructor: any, property: any): void;
static "__#private@#constructHost"(host: any): void;
static "__#private@#defineProperty"(host: any, property: any, hostInfo: any): void;
static "__#private@#createInternal"(host: any): any;
static "__#private@#createProperties"(host: any): any;
static "__#private@#connectHost"(host: any): void;
static "__#private@#disconnectHost"(host: any): void;
static "__#private@#initializeHost"(host: any): boolean;
static "__#private@#upgradeOwnProperties"(host: any): void;
static "__#private@#getPreUpgradePropertyValue"(host: any, property: any, hostInfo: any): {
static #analyzeConstructor(constructor: any): void;
static #validateProperties(constructor: any, properties: any, entries: any): void;
static #validateProperty(constructor: any, key: any, property: any): void;
static #validatePropertyAttribute(constructor: any, key: any, property: any, attribute: any): void;
static #propertyIsCyclic(property: any, inputMap: any, seen?: Set<any>): boolean;
static #validateListeners(constructor: any, listeners: any, entries: any): void;
static #mutateProperty(constructor: any, propertyMap: any, key: any, property: any): void;
static #addPropertyInitial(constructor: any, property: any): void;
static #addPropertyDefault(constructor: any, property: any): void;
static #addPropertySync(constructor: any, property: any): void;
static #addPropertyReflect(constructor: any, property: any): void;
static #addPropertyCompute(constructor: any, property: any): void;
static #addPropertyObserve(constructor: any, property: any): void;
static #constructHost(host: any): void;
static #defineProperty(host: any, property: any, hostInfo: any): void;
static #createInternal(host: any): any;
static #createProperties(host: any): any;
static #connectHost(host: any): void;
static #disconnectHost(host: any): void;
static #initializeHost(host: any): boolean;
static #upgradeOwnProperties(host: any): void;
static #getPreUpgradePropertyValue(host: any, property: any, hostInfo: any): {
value: any;
found: boolean;
};
static "__#private@#addListener"(host: any, element: any, type: any, callback: any, options: any): void;
static "__#private@#addListeners"(host: any): void;
static "__#private@#removeListener"(host: any, element: any, type: any, callback: any, options: any): void;
static "__#private@#removeListeners"(host: any): void;
static "__#private@#getListener"(host: any, listener: any): any;
static "__#private@#updateHost"(host: any): void;
static "__#private@#toPathString"(host: any): string;
static "__#private@#invalidateProperty"(host: any, property: any): void;
static "__#private@#getPropertyValue"(host: any, property: any): any;
static "__#private@#validatePropertyMutable"(host: any, property: any): void;
static "__#private@#validatePropertyValue"(host: any, property: any, value: any): void;
static "__#private@#setPropertyValue"(host: any, property: any, value: any): void;
static "__#private@#serializeProperty"(host: any, property: any, value: any): any;
static "__#private@#deserializeProperty"(host: any, property: any, value: any): any;
static "__#private@#propertyHasAttribute"(property: any): boolean;
static "__#private@#getTypeName"(value: any): any;
static "__#private@#notNullish"(value: any): boolean;
static "__#private@#typeIsWrong"(type: any, value: any): boolean;
static "__#private@#camelToKebab"(camel: any): any;
static "__#private@#constructors": WeakMap<WeakKey, any>;
static "__#private@#hosts": WeakMap<WeakKey, any>;
static "__#private@#propertyKeys": Set<string>;
static "__#private@#serializableTypes": Set<StringConstructor | BooleanConstructor | NumberConstructor>;
static "__#private@#caseMap": Map<any, any>;
static "__#private@#prototypeInterface": Set<string>;
static #addListener(host: any, element: any, type: any, callback: any, options: any): void;
static #addListeners(host: any): void;
static #removeListener(host: any, element: any, type: any, callback: any, options: any): void;
static #removeListeners(host: any): void;
static #getListener(host: any, listener: any): any;
static #updateHost(host: any): void;
static #toPathString(host: any): string;
static #invalidateProperty(host: any, property: any): void;
static #getPropertyValue(host: any, property: any): any;
static #validatePropertyMutable(host: any, property: any): void;
static #validatePropertyValue(host: any, property: any, value: any): void;
static #setPropertyValue(host: any, property: any, value: any): void;
static #serializeProperty(host: any, property: any, value: any): any;
static #deserializeProperty(host: any, property: any, value: any): any;
static #propertyHasAttribute(property: any): boolean;
static #getTypeName(value: any): string;
static #notNullish(value: any): boolean;
static #typeIsWrong(type: any, value: any): boolean;
static #camelToKebab(camel: any): any;
static #constructors: WeakMap<WeakKey, any>;
static #hosts: WeakMap<WeakKey, any>;
static #propertyKeys: Set<string>;
static #serializableTypes: Set<StringConstructor | BooleanConstructor | NumberConstructor>;
static #caseMap: Map<any, any>;
static #prototypeInterface: Set<string>;
/**
* Extends HTMLElement.prototype.connectedCallback.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/x-element.d.ts.map

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

Loading