Skip to content

Commit 683fade

Browse files
committed
removed unused file._data property
1 parent 745c0d3 commit 683fade

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Go to the `v1` branch to see the changelog of Lume 1.
7272
- `variable` option of Lume components. It's always `comp`.
7373
- `name` special variable of components to customize the name. It's always the filename.
7474
- `slugify_urls` plugin no longer handle unicode characters by default. Use the `transliterate` option to configure it.
75+
- Internal variable `page._data` because it's useless.
7576

7677
### Fixed
7778
- The resolution of npm and jsr specifiers by esbuild plugin have been improved.

core/file.ts

-17
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ export class Page<D extends Data = Data> {
1818
/** Used to save the page data */
1919
data: D = {} as D;
2020

21-
/**
22-
* Internal data. Used to save arbitrary data by plugins and processors
23-
*/
24-
#_data = {};
25-
2621
/** The page content (string or Uint8Array) */
2722
#content?: Content;
2823

@@ -52,18 +47,6 @@ export class Page<D extends Data = Data> {
5247
this.src = { path: "", ext: "", ...src };
5348
}
5449

55-
/**
56-
* The property _data is to store internal data,
57-
* used by plugins, processors, etc to save arbitrary values
58-
*/
59-
set _data(data: Record<string, unknown>) {
60-
this.#_data = data;
61-
}
62-
63-
get _data() {
64-
return this.#_data;
65-
}
66-
6750
/** Duplicate this page. */
6851
duplicate(index: number | undefined, data: D): Page<D> {
6952
const page = new Page<D>({ ...this.src });

0 commit comments

Comments
 (0)