From 533699b4dc74533f59789d142db4b729947757a8 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 11:55:03 +0200 Subject: [PATCH 1/7] Bump TypeScript target to ES2020 Update tsconfig.json to set the compiler target from ES2019 to ES2020. This enables ES2020 language features (e.g. optional chaining, nullish coalescing, BigInt) to be emitted without downleveling; verify runtime/browser support or adjust transpilation/polyfills as needed. --- CHANGELOG.md | 3 ++- tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 903544d8..c0a1a72b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ First release. > This section will be removed after the beta phase.
> Note that semantic versioning rules are not strictly followed during this phase. +- v0.14.2: Update TS version to ES2020 to allow using `Promise.allSettled()` and other features. + - v0.14.1: Fix checkbox assignment bug in wb_node.ts where the value was not being assigned to this.checkbox. - v0.14.0: Refactor sorting: @@ -117,7 +119,6 @@ First release. - v0.7.0: #69 prevent iOS browser from opening links on drop. - v0.7.0: BREAKING CHANGE: Changed syntax format for compressed formats: - - `_keyMap: {"t": "title", ...}` -> `_keyMap: {"title": "t", ...}`. - `_typeList: [...]` -> `_valueMap: {"type": [...]}`. This allows to compress values of other properties than `type`. diff --git a/tsconfig.json b/tsconfig.json index e26ba415..9d33e929 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "ES2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ From 55baf6b6e3f30a5db684571088064637203bcbd4 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 11:55:38 +0200 Subject: [PATCH 2/7] Set TypeScript moduleResolution to bundler Update tsconfig.json to use "moduleResolution": "bundler" instead of "node". This enables bundler-style module resolution (improves handling of package exports/conditional exports) and may require TypeScript 5.0+ or corresponding toolchain support; verify build tooling and imports after the change. --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 9d33e929..1f4eca3e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,7 +36,7 @@ // "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, // "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "moduleResolution": "bundler" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ From c844ffcbb0b5a616e285068164639b5b3e2eafd2 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 11:56:50 +0200 Subject: [PATCH 3/7] Rename util.ts and types.ts to wb_util.ts and wb_types.ts --- src/common.ts | 4 ++-- src/wb_ext_dnd.ts | 6 +++--- src/wb_ext_edit.ts | 4 ++-- src/wb_ext_filter.ts | 4 ++-- src/wb_ext_grid.ts | 4 ++-- src/wb_ext_keynav.ts | 4 ++-- src/wb_ext_logger.ts | 4 ++-- src/wb_extension_base.ts | 2 +- src/wb_node.ts | 4 ++-- src/wb_options.ts | 2 +- src/{types.ts => wb_types.ts} | 0 src/{util.ts => wb_util.ts} | 0 src/wunderbaum.ts | 4 ++-- 13 files changed, 21 insertions(+), 21 deletions(-) rename src/{types.ts => wb_types.ts} (100%) rename src/{util.ts => wb_util.ts} (100%) diff --git a/src/common.ts b/src/common.ts index d5d46518..3034bc15 100644 --- a/src/common.ts +++ b/src/common.ts @@ -11,8 +11,8 @@ import { SourceObjectType, IconMapType, MatcherCallback, -} from "./types"; -import * as util from "./util"; +} from "./wb_types"; +import * as util from "./wb_util"; import { WunderbaumNode } from "./wb_node"; export const DEFAULT_DEBUGLEVEL = 4; // Replaced by rollup script diff --git a/src/wb_ext_dnd.ts b/src/wb_ext_dnd.ts index ae0c69fd..0517dae0 100644 --- a/src/wb_ext_dnd.ts +++ b/src/wb_ext_dnd.ts @@ -3,8 +3,8 @@ * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ -import * as util from "./util"; -import { EventCallbackType, onEvent } from "./util"; +import * as util from "./wb_util"; +import { EventCallbackType, onEvent } from "./wb_util"; import { Wunderbaum } from "./wunderbaum"; import { WunderbaumExtension } from "./wb_extension_base"; import { WunderbaumNode } from "./wb_node"; @@ -13,7 +13,7 @@ import { DropEffectType, DropRegionType, DropRegionTypeSet, -} from "./types"; +} from "./wb_types"; import { DebouncedFunction, throttle } from "./debounce"; const nodeMimeType = "application/x-wunderbaum-node"; diff --git a/src/wb_ext_edit.ts b/src/wb_ext_edit.ts index e519a4c7..475c98d0 100644 --- a/src/wb_ext_edit.ts +++ b/src/wb_ext_edit.ts @@ -15,10 +15,10 @@ import { isPlainObject, onEvent, ValidationError, -} from "./util"; +} from "./wb_util"; import { debounce } from "./debounce"; import { WunderbaumNode } from "./wb_node"; -import { EditOptionsType, InsertNodeType, WbNodeData } from "./types"; +import { EditOptionsType, InsertNodeType, WbNodeData } from "./wb_types"; // const START_MARKER = "\uFFF7"; diff --git a/src/wb_ext_filter.ts b/src/wb_ext_filter.ts index f0374c22..79a4aebe 100644 --- a/src/wb_ext_filter.ts +++ b/src/wb_ext_filter.ts @@ -11,14 +11,14 @@ import { escapeRegex, extend, onEvent, -} from "./util"; +} from "./wb_util"; import { FilterConnectType, FilterNodesOptions, FilterOptionsType, NodeFilterCallback, NodeStatusType, -} from "./types"; +} from "./wb_types"; import { Wunderbaum } from "./wunderbaum"; import { WunderbaumNode } from "./wb_node"; import { WunderbaumExtension } from "./wb_extension_base"; diff --git a/src/wb_ext_grid.ts b/src/wb_ext_grid.ts index 6635c34e..d5c064fb 100644 --- a/src/wb_ext_grid.ts +++ b/src/wb_ext_grid.ts @@ -6,9 +6,9 @@ import { Wunderbaum } from "./wunderbaum"; import { WunderbaumExtension } from "./wb_extension_base"; import { DragCallbackArgType, DragObserver } from "./drag_observer"; -import { ChangeType, ColumnDefinition, GridOptionsType } from "./types"; +import { ChangeType, ColumnDefinition, GridOptionsType } from "./wb_types"; import { DEFAULT_MIN_COL_WIDTH } from "./common"; -import { toBool, toPixel } from "./util"; +import { toBool, toPixel } from "./wb_util"; export class GridExtension extends WunderbaumExtension { protected observer: DragObserver; diff --git a/src/wb_ext_keynav.ts b/src/wb_ext_keynav.ts index 437b602a..f47a38ca 100644 --- a/src/wb_ext_keynav.ts +++ b/src/wb_ext_keynav.ts @@ -4,8 +4,8 @@ * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ -import { KeynavOptionsType, NavModeEnum } from "./types"; -import { eventToString } from "./util"; +import { KeynavOptionsType, NavModeEnum } from "./wb_types"; +import { eventToString } from "./wb_util"; import { Wunderbaum } from "./wunderbaum"; import { WunderbaumNode } from "./wb_node"; import { WunderbaumExtension } from "./wb_extension_base"; diff --git a/src/wb_ext_logger.ts b/src/wb_ext_logger.ts index 0b02c530..930160bc 100644 --- a/src/wb_ext_logger.ts +++ b/src/wb_ext_logger.ts @@ -4,8 +4,8 @@ * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ -import { LoggerOptionsType } from "./types"; -import { overrideMethod } from "./util"; +import { LoggerOptionsType } from "./wb_types"; +import { overrideMethod } from "./wb_util"; import { WunderbaumExtension } from "./wb_extension_base"; import { Wunderbaum } from "./wunderbaum"; diff --git a/src/wb_extension_base.ts b/src/wb_extension_base.ts index 7f21538a..1578c1fa 100644 --- a/src/wb_extension_base.ts +++ b/src/wb_extension_base.ts @@ -4,7 +4,7 @@ * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ -import * as util from "./util"; +import * as util from "./wb_util"; import { DndExtension } from "./wb_ext_dnd"; import { EditExtension } from "./wb_ext_edit"; import { FilterExtension } from "./wb_ext_filter"; diff --git a/src/wb_node.ts b/src/wb_node.ts index 2595e74e..2dbde22d 100644 --- a/src/wb_node.ts +++ b/src/wb_node.ts @@ -4,7 +4,7 @@ * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ -import * as util from "./util"; +import * as util from "./wb_util"; import { Wunderbaum } from "./wunderbaum"; import { @@ -41,7 +41,7 @@ import { TooltipOption, TristateType, WbNodeData, -} from "./types"; +} from "./wb_types"; import { decompressSourceData, diff --git a/src/wb_options.ts b/src/wb_options.ts index a4aac05f..19e9f053 100644 --- a/src/wb_options.ts +++ b/src/wb_options.ts @@ -39,7 +39,7 @@ import { WbRenderEventType, WbSelectEventType, WbTreeEventType, -} from "./types"; +} from "./wb_types"; /** * Properties of {@link wunderbaum.Wunderbaum.options}. diff --git a/src/types.ts b/src/wb_types.ts similarity index 100% rename from src/types.ts rename to src/wb_types.ts diff --git a/src/util.ts b/src/wb_util.ts similarity index 100% rename from src/util.ts rename to src/wb_util.ts diff --git a/src/wunderbaum.ts b/src/wunderbaum.ts index bae1fe48..22980388 100644 --- a/src/wunderbaum.ts +++ b/src/wunderbaum.ts @@ -12,7 +12,7 @@ */ // import "./wunderbaum.scss"; -import * as util from "./util"; +import * as util from "./wb_util"; import { FilterExtension } from "./wb_ext_filter"; import { KeynavExtension } from "./wb_ext_keynav"; import { LoggerExtension } from "./wb_ext_logger"; @@ -61,7 +61,7 @@ import { SortByPropertyOptions, ReloadOptions, LoadLazyNodesOptions, -} from "./types"; +} from "./wb_types"; import { DEFAULT_DEBUGLEVEL, defaultIconMaps, From 1ad8e5cc480403e35f8324de65362ec7a6224ada Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 12:05:36 +0200 Subject: [PATCH 4/7] Rename more files --- src/{common.ts => wb_common.ts} | 0 src/{debounce.ts => wb_debounce.ts} | 4 ++++ src/{deferred.ts => wb_deferred.ts} | 0 src/{drag_observer.ts => wb_drag_observer.ts} | 0 src/wb_ext_dnd.ts | 2 +- src/wb_ext_edit.ts | 2 +- src/wb_ext_filter.ts | 2 +- src/wb_ext_grid.ts | 4 ++-- src/wb_node.ts | 4 ++-- src/wb_util.ts | 2 +- src/wunderbaum.ts | 6 +++--- 11 files changed, 15 insertions(+), 11 deletions(-) rename src/{common.ts => wb_common.ts} (100%) rename src/{debounce.ts => wb_debounce.ts} (97%) rename src/{deferred.ts => wb_deferred.ts} (100%) rename src/{drag_observer.ts => wb_drag_observer.ts} (100%) diff --git a/src/common.ts b/src/wb_common.ts similarity index 100% rename from src/common.ts rename to src/wb_common.ts diff --git a/src/debounce.ts b/src/wb_debounce.ts similarity index 97% rename from src/debounce.ts rename to src/wb_debounce.ts index 578c0c61..b095cf8f 100644 --- a/src/debounce.ts +++ b/src/wb_debounce.ts @@ -38,9 +38,13 @@ export interface DebouncedFunction { /* --- */ /** Detect free variable `global` from Node.js. */ const freeGlobal = + // @ts-expect-error `global` is not defined in browser environments typeof global === "object" && + // @ts-expect-error `global` is not defined in browser environments global !== null && + // @ts-expect-error `global` is not defined in browser environments global.Object === Object && + // @ts-expect-error `global` is not defined in browser environments global; /** Detect free variable `globalThis` */ diff --git a/src/deferred.ts b/src/wb_deferred.ts similarity index 100% rename from src/deferred.ts rename to src/wb_deferred.ts diff --git a/src/drag_observer.ts b/src/wb_drag_observer.ts similarity index 100% rename from src/drag_observer.ts rename to src/wb_drag_observer.ts diff --git a/src/wb_ext_dnd.ts b/src/wb_ext_dnd.ts index 0517dae0..d6bd6209 100644 --- a/src/wb_ext_dnd.ts +++ b/src/wb_ext_dnd.ts @@ -14,7 +14,7 @@ import { DropRegionType, DropRegionTypeSet, } from "./wb_types"; -import { DebouncedFunction, throttle } from "./debounce"; +import { DebouncedFunction, throttle } from "./wb_debounce"; const nodeMimeType = "application/x-wunderbaum-node"; diff --git a/src/wb_ext_edit.ts b/src/wb_ext_edit.ts index 475c98d0..d711fd97 100644 --- a/src/wb_ext_edit.ts +++ b/src/wb_ext_edit.ts @@ -16,7 +16,7 @@ import { onEvent, ValidationError, } from "./wb_util"; -import { debounce } from "./debounce"; +import { debounce } from "./wb_debounce"; import { WunderbaumNode } from "./wb_node"; import { EditOptionsType, InsertNodeType, WbNodeData } from "./wb_types"; diff --git a/src/wb_ext_filter.ts b/src/wb_ext_filter.ts index 79a4aebe..37c495f1 100644 --- a/src/wb_ext_filter.ts +++ b/src/wb_ext_filter.ts @@ -22,7 +22,7 @@ import { import { Wunderbaum } from "./wunderbaum"; import { WunderbaumNode } from "./wb_node"; import { WunderbaumExtension } from "./wb_extension_base"; -import { debounce } from "./debounce"; +import { debounce } from "./wb_debounce"; const START_MARKER = "\uFFF7"; const END_MARKER = "\uFFF8"; diff --git a/src/wb_ext_grid.ts b/src/wb_ext_grid.ts index d5c064fb..1b0f1420 100644 --- a/src/wb_ext_grid.ts +++ b/src/wb_ext_grid.ts @@ -5,9 +5,9 @@ */ import { Wunderbaum } from "./wunderbaum"; import { WunderbaumExtension } from "./wb_extension_base"; -import { DragCallbackArgType, DragObserver } from "./drag_observer"; +import { DragCallbackArgType, DragObserver } from "./wb_drag_observer"; import { ChangeType, ColumnDefinition, GridOptionsType } from "./wb_types"; -import { DEFAULT_MIN_COL_WIDTH } from "./common"; +import { DEFAULT_MIN_COL_WIDTH } from "./wb_common"; import { toBool, toPixel } from "./wb_util"; export class GridExtension extends WunderbaumExtension { diff --git a/src/wb_node.ts b/src/wb_node.ts index 2dbde22d..d0ffc278 100644 --- a/src/wb_node.ts +++ b/src/wb_node.ts @@ -54,8 +54,8 @@ import { TEST_FILE_PATH, TEST_HTML, TITLE_SPAN_PAD_Y, -} from "./common"; -import { Deferred } from "./deferred"; +} from "./wb_common"; +import { Deferred } from "./wb_deferred"; /** WunderbaumNode properties that can be passed with source data. * (Any other source properties will be stored as `node.data.PROP`.) diff --git a/src/wb_util.ts b/src/wb_util.ts index 9ead4e35..ff3de91e 100644 --- a/src/wb_util.ts +++ b/src/wb_util.ts @@ -6,7 +6,7 @@ /** @module util */ -import { DebouncedFunction, debounce, throttle } from "./debounce"; +import { DebouncedFunction, debounce, throttle } from "./wb_debounce"; export { debounce, throttle }; diff --git a/src/wunderbaum.ts b/src/wunderbaum.ts index 22980388..04b8e206 100644 --- a/src/wunderbaum.ts +++ b/src/wunderbaum.ts @@ -71,12 +71,12 @@ import { DEFAULT_ROW_HEIGHT, TEST_FILE_PATH, TEST_HTML, -} from "./common"; +} from "./wb_common"; import { WunderbaumNode } from "./wb_node"; -import { Deferred } from "./deferred"; +import { Deferred } from "./wb_deferred"; import { EditExtension } from "./wb_ext_edit"; import { InitWunderbaumOptions, WunderbaumOptions } from "./wb_options"; -import { DebouncedFunction } from "./debounce"; +import { DebouncedFunction } from "./wb_debounce"; class WbSystemRoot extends WunderbaumNode { constructor(tree: Wunderbaum) { From 4582116f2bcf60eaa06fae6f343246a8f74e80a1 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 12:17:42 +0200 Subject: [PATCH 5/7] Finalize rename --- CHANGELOG.md | 5 ++++- src/wb_debounce.ts | 2 +- src/wb_deferred.ts | 2 +- src/wb_drag_observer.ts | 2 +- src/wunderbaum.ts | 4 ++-- tsconfig.json | 6 +++--- typedoc.json | 10 +++++----- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a1a72b..21239f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,10 @@ First release. > This section will be removed after the beta phase.
> Note that semantic versioning rules are not strictly followed during this phase. -- v0.14.2: Update TS version to ES2020 to allow using `Promise.allSettled()` and other features. +- v0.15.0: Rename modules `common`, `deferred`, `drag_observer`, `types`, `util` + to `wb_common`, `wb_deferred`, `wb_drag_observer`, `wb_types`, `wb_util` to + avoid name conflicts with other libraries. +- v0.15.0: Update TS version to ES2020 to allow using `Promise.allSettled()` and other features. - v0.14.1: Fix checkbox assignment bug in wb_node.ts where the value was not being assigned to this.checkbox. diff --git a/src/wb_debounce.ts b/src/wb_debounce.ts index b095cf8f..cc10c183 100644 --- a/src/wb_debounce.ts +++ b/src/wb_debounce.ts @@ -1,5 +1,5 @@ /*! - * Wunderbaum - debounce.ts + * Wunderbaum - wb_debounce.ts * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_deferred.ts b/src/wb_deferred.ts index afc89a02..ba7e13d0 100644 --- a/src/wb_deferred.ts +++ b/src/wb_deferred.ts @@ -1,5 +1,5 @@ /*! - * Wunderbaum - deferred + * Wunderbaum - wb_deferred * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_drag_observer.ts b/src/wb_drag_observer.ts index 25c6950a..5e3394b4 100644 --- a/src/wb_drag_observer.ts +++ b/src/wb_drag_observer.ts @@ -1,5 +1,5 @@ /*! - * Wunderbaum - drag_observer + * Wunderbaum - wb_drag_observer * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wunderbaum.ts b/src/wunderbaum.ts index 04b8e206..9c98dd6f 100644 --- a/src/wunderbaum.ts +++ b/src/wunderbaum.ts @@ -161,7 +161,7 @@ export class Wunderbaum { /** A Promise that is resolved when the tree was initialized (similar to `init(e)` event). */ public readonly ready: Promise; - /** Expose some useful methods of the util.ts module as `Wunderbaum.util`. */ + /** Expose some useful methods of the wb_util.ts module as `Wunderbaum.util`. */ public static util = util; /** A map of default iconMaps. * May be used as default, when passing partial icon definition maps: @@ -175,7 +175,7 @@ export class Wunderbaum { * ``` */ public static iconMaps = defaultIconMaps; - /** Expose some useful methods of the util.ts module as `tree._util`. */ + /** Expose some useful methods of the wb_util.ts module as `tree._util`. */ public _util = util; // --- SELECT --- diff --git a/tsconfig.json b/tsconfig.json index 1f4eca3e..26bc9a76 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -72,9 +72,9 @@ "src/wunderbaum.ts", "src/wb_node.ts", "src/wb_options.ts", - "src/common.ts", - "src/types.ts", - "src/util.ts" + "src/wb_common.ts", + "src/wb_types.ts", + "src/wb_util.ts" ], "out": "docs/api", "excludePrivate": true, diff --git a/typedoc.json b/typedoc.json index c3dad146..d5adddcf 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,9 +1,9 @@ { "intentionallyNotExported": [ - "src/debounce.ts:DebouncedFunction", - "src/debounce.ts:DebounceOptions", - "src/debounce.ts:ThrottleOptions", - "src/debounce.ts:Procedure" - // "src/debounce.ts" + "src/wb_debounce.ts:DebouncedFunction", + "src/wb_debounce.ts:DebounceOptions", + "src/wb_debounce.ts:ThrottleOptions", + "src/wb_debounce.ts:Procedure" + // "src/wb_debounce.ts" ] } From b0246f80e349953c1fd08a0dc60a226b623f3243 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 12:34:15 +0200 Subject: [PATCH 6/7] Assume node.js >= v12 --- CHANGELOG.md | 2 ++ src/wb_debounce.ts | 25 ++----------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21239f43..a65851d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ First release. to `wb_common`, `wb_deferred`, `wb_drag_observer`, `wb_types`, `wb_util` to avoid name conflicts with other libraries. - v0.15.0: Update TS version to ES2020 to allow using `Promise.allSettled()` and other features. +- v0.15.0: Update module format to "bundler" to allow better tree-shaking and smaller bundles. +- v0.15.0: Assume that `globalThis` is available (requires Node.js >= v12). - v0.14.1: Fix checkbox assignment bug in wb_node.ts where the value was not being assigned to this.checkbox. diff --git a/src/wb_debounce.ts b/src/wb_debounce.ts index cc10c183..5f16758f 100644 --- a/src/wb_debounce.ts +++ b/src/wb_debounce.ts @@ -36,31 +36,10 @@ export interface DebouncedFunction { } /* --- */ -/** Detect free variable `global` from Node.js. */ -const freeGlobal = - // @ts-expect-error `global` is not defined in browser environments - typeof global === "object" && - // @ts-expect-error `global` is not defined in browser environments - global !== null && - // @ts-expect-error `global` is not defined in browser environments - global.Object === Object && - // @ts-expect-error `global` is not defined in browser environments - global; - -/** Detect free variable `globalThis` */ -const freeGlobalThis = - typeof globalThis === "object" && - globalThis !== null && - globalThis.Object == Object && - globalThis; - -/** Detect free variable `self`. */ -const freeSelf = - typeof self === "object" && self !== null && self.Object === Object && self; - /** Used as a reference to the global object. */ const root = - freeGlobalThis || freeGlobal || freeSelf || Function("return this")(); + (typeof globalThis !== "undefined" && globalThis) || + Function("return this")(); /** * Checks if `value` is the From bba8a33f90d649345a3fe80b177cf4aa9ab11e70 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 12 Apr 2026 12:36:25 +0200 Subject: [PATCH 7/7] 2026 --- docs/demo/demo-custom.js | 2 +- docs/demo/demo-editable.js | 2 +- docs/demo/demo-fixedcol.js | 2 +- docs/demo/demo-grid.js | 2 +- docs/demo/demo-large.js | 2 +- docs/demo/demo-minimal.js | 2 +- docs/demo/demo-plain.js | 2 +- docs/demo/demo-readonly.js | 2 +- docs/demo/demo-select.js | 2 +- docs/demo/demo-welcome.js | 2 +- docs/unittest/test-core-fixture1.js | 2 +- docs/unittest/test-core.js | 2 +- src/wb_common.ts | 2 +- src/wb_debounce.ts | 2 +- src/wb_deferred.ts | 2 +- src/wb_drag_observer.ts | 2 +- src/wb_ext_dnd.ts | 2 +- src/wb_ext_edit.ts | 2 +- src/wb_ext_filter.ts | 2 +- src/wb_ext_grid.ts | 2 +- src/wb_ext_keynav.ts | 2 +- src/wb_ext_logger.ts | 2 +- src/wb_extension_base.ts | 2 +- src/wb_node.ts | 2 +- src/wb_options.ts | 2 +- src/wb_types.ts | 2 +- src/wb_util.ts | 2 +- src/wunderbaum.scss | 2 +- src/wunderbaum.ts | 2 +- test/unit/test-core-fixture1.js | 2 +- test/unit/test-core.js | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/demo/demo-custom.js b/docs/demo/demo-custom.js index 0b526ba7..71256aeb 100644 --- a/docs/demo/demo-custom.js +++ b/docs/demo/demo-custom.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ diff --git a/docs/demo/demo-editable.js b/docs/demo/demo-editable.js index 3cdb682f..8b6f24ec 100644 --- a/docs/demo/demo-editable.js +++ b/docs/demo/demo-editable.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-fixedcol.js b/docs/demo/demo-fixedcol.js index 9b09a470..db14b7b7 100644 --- a/docs/demo/demo-fixedcol.js +++ b/docs/demo/demo-fixedcol.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-grid.js b/docs/demo/demo-grid.js index 0f77bd81..15662c29 100644 --- a/docs/demo/demo-grid.js +++ b/docs/demo/demo-grid.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 addCssImport */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-large.js b/docs/demo/demo-large.js index 4697a6ff..a4062a9f 100644 --- a/docs/demo/demo-large.js +++ b/docs/demo/demo-large.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-minimal.js b/docs/demo/demo-minimal.js index 7c24e95a..619132b0 100644 --- a/docs/demo/demo-minimal.js +++ b/docs/demo/demo-minimal.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ diff --git a/docs/demo/demo-plain.js b/docs/demo/demo-plain.js index d215fc7a..45dc27eb 100644 --- a/docs/demo/demo-plain.js +++ b/docs/demo/demo-plain.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-readonly.js b/docs/demo/demo-readonly.js index ad54a30d..1eff00c5 100644 --- a/docs/demo/demo-readonly.js +++ b/docs/demo/demo-readonly.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-select.js b/docs/demo/demo-select.js index 06dafe17..75365c4c 100644 --- a/docs/demo/demo-select.js +++ b/docs/demo/demo-select.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10, addCssImport */ /* eslint-disable no-console */ diff --git a/docs/demo/demo-welcome.js b/docs/demo/demo-welcome.js index 6ee9c67a..04e5d943 100644 --- a/docs/demo/demo-welcome.js +++ b/docs/demo/demo-welcome.js @@ -1,7 +1,7 @@ /** * Demo code for Wunderbaum (https://github.com/mar10/wunderbaum). * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). */ /* global mar10 */ diff --git a/docs/unittest/test-core-fixture1.js b/docs/unittest/test-core-fixture1.js index 1c14dba3..0409c8aa 100644 --- a/docs/unittest/test-core-fixture1.js +++ b/docs/unittest/test-core-fixture1.js @@ -1,6 +1,6 @@ /*! * Wunderbaum - Unit Test - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/docs/unittest/test-core.js b/docs/unittest/test-core.js index fdca2c80..1c2aa3ce 100644 --- a/docs/unittest/test-core.js +++ b/docs/unittest/test-core.js @@ -1,6 +1,6 @@ /*! * Wunderbaum - Unit Test - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ /* global mar10, QUnit */ diff --git a/src/wb_common.ts b/src/wb_common.ts index 3034bc15..621b20ec 100644 --- a/src/wb_common.ts +++ b/src/wb_common.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - common - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_debounce.ts b/src/wb_debounce.ts index 5f16758f..54fd5d10 100644 --- a/src/wb_debounce.ts +++ b/src/wb_debounce.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - wb_debounce.ts - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ /* diff --git a/src/wb_deferred.ts b/src/wb_deferred.ts index ba7e13d0..c5bb77e7 100644 --- a/src/wb_deferred.ts +++ b/src/wb_deferred.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - wb_deferred - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_drag_observer.ts b/src/wb_drag_observer.ts index 5e3394b4..85460e81 100644 --- a/src/wb_drag_observer.ts +++ b/src/wb_drag_observer.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - wb_drag_observer - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_ext_dnd.ts b/src/wb_ext_dnd.ts index d6bd6209..41fbe893 100644 --- a/src/wb_ext_dnd.ts +++ b/src/wb_ext_dnd.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - ext-dnd - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ import * as util from "./wb_util"; diff --git a/src/wb_ext_edit.ts b/src/wb_ext_edit.ts index d711fd97..ad4e933a 100644 --- a/src/wb_ext_edit.ts +++ b/src/wb_ext_edit.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - ext-edit - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_ext_filter.ts b/src/wb_ext_filter.ts index 37c495f1..6412a3aa 100644 --- a/src/wb_ext_filter.ts +++ b/src/wb_ext_filter.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - ext-filter - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_ext_grid.ts b/src/wb_ext_grid.ts index 1b0f1420..01204bcb 100644 --- a/src/wb_ext_grid.ts +++ b/src/wb_ext_grid.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - ext-grid - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ import { Wunderbaum } from "./wunderbaum"; diff --git a/src/wb_ext_keynav.ts b/src/wb_ext_keynav.ts index f47a38ca..c9aec3bf 100644 --- a/src/wb_ext_keynav.ts +++ b/src/wb_ext_keynav.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - ext-keynav - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_ext_logger.ts b/src/wb_ext_logger.ts index 930160bc..dbf0f46d 100644 --- a/src/wb_ext_logger.ts +++ b/src/wb_ext_logger.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - ext-logger - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_extension_base.ts b/src/wb_extension_base.ts index 1578c1fa..09bae09a 100644 --- a/src/wb_extension_base.ts +++ b/src/wb_extension_base.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - wb_extension_base - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_node.ts b/src/wb_node.ts index d0ffc278..67024cad 100644 --- a/src/wb_node.ts +++ b/src/wb_node.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - wunderbaum_node - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_options.ts b/src/wb_options.ts index 19e9f053..39806bb1 100644 --- a/src/wb_options.ts +++ b/src/wb_options.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - options - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_types.ts b/src/wb_types.ts index bea16e11..e0984bbd 100644 --- a/src/wb_types.ts +++ b/src/wb_types.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - types - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wb_util.ts b/src/wb_util.ts index ff3de91e..3c1052a6 100644 --- a/src/wb_util.ts +++ b/src/wb_util.ts @@ -1,6 +1,6 @@ /*! * Wunderbaum - util - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/src/wunderbaum.scss b/src/wunderbaum.scss index 51250abf..5f8d00b5 100644 --- a/src/wunderbaum.scss +++ b/src/wunderbaum.scss @@ -1,6 +1,6 @@ /*! * Wunderbaum style sheet (generated from wunderbaum.scss) - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ // @use "sass:meta"; diff --git a/src/wunderbaum.ts b/src/wunderbaum.ts index 9c98dd6f..a676e961 100644 --- a/src/wunderbaum.ts +++ b/src/wunderbaum.ts @@ -3,7 +3,7 @@ * * A treegrid control. * - * Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de). + * Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de). * https://github.com/mar10/wunderbaum * * Released under the MIT license. diff --git a/test/unit/test-core-fixture1.js b/test/unit/test-core-fixture1.js index 1c14dba3..0409c8aa 100644 --- a/test/unit/test-core-fixture1.js +++ b/test/unit/test-core-fixture1.js @@ -1,6 +1,6 @@ /*! * Wunderbaum - Unit Test - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ diff --git a/test/unit/test-core.js b/test/unit/test-core.js index fdca2c80..1c2aa3ce 100644 --- a/test/unit/test-core.js +++ b/test/unit/test-core.js @@ -1,6 +1,6 @@ /*! * Wunderbaum - Unit Test - * Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license. + * Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license. * @VERSION, @DATE (https://github.com/mar10/wunderbaum) */ /* global mar10, QUnit */