@absolutejs/changelog 0.8.1 → 0.9.0
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.
- package/CHANGELOG.md +14 -0
- package/changelog.json +30 -0
- package/dist/applyMethods.d.ts +15 -0
- package/dist/cli.js +35 -1
- package/dist/cli.js.map +5 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.js +65 -21
- package/dist/index.js.map +7 -7
- package/dist/types.d.ts +22 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,20 @@ This file is generated by `absolute-changelog` from the entries in
|
|
|
6
6
|
`changelog/`. Edit an entry, not this file — and add new ones under
|
|
7
7
|
`changelog/unreleased/`.
|
|
8
8
|
|
|
9
|
+
## 0.9.0 — 2026-11-19
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **A change can name the calls or files it reaches** (`Change`, `Reach`, `findCalls`)
|
|
14
|
+
A change can say where it matters in a project's code when importing the package is not the answer: calls to some methods on an instance of a class (`reaches.calls`, found with `findCalls`), or files matching globs (`reaches.files`). A change to Elysia's `setup` hook then reaches the projects that call `.setup()`, not every project that imports `prepare`.
|
|
15
|
+
|
|
16
|
+
## 0.8.2 — 2026-11-19
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **Moving dependencies never moves one below where it is** (`applyDependencyMigrations`)
|
|
21
|
+
A dependency outside the range asked for was moved to it even when it was already past the range's lowest version: `^0.101.0` does not reach 0.103.3, so 0.103.3 was moved back down. Now a dependency only moves up.
|
|
22
|
+
|
|
9
23
|
## 0.8.1 — 2026-11-19
|
|
10
24
|
|
|
11
25
|
### Fixed
|
package/changelog.json
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "@absolutejs/changelog",
|
|
4
4
|
"releases": [
|
|
5
|
+
{
|
|
6
|
+
"changes": [
|
|
7
|
+
{
|
|
8
|
+
"detail": "A change can say where it matters in a project's code when importing the package is not the answer: calls to some methods on an instance of a class (`reaches.calls`, found with `findCalls`), or files matching globs (`reaches.files`). A change to Elysia's `setup` hook then reaches the projects that call `.setup()`, not every project that imports `prepare`.",
|
|
9
|
+
"kind": "added",
|
|
10
|
+
"summary": "A change can name the calls or files it reaches",
|
|
11
|
+
"symbols": [
|
|
12
|
+
"Change",
|
|
13
|
+
"Reach",
|
|
14
|
+
"findCalls"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"date": "2026-11-19",
|
|
19
|
+
"version": "0.9.0"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"changes": [
|
|
23
|
+
{
|
|
24
|
+
"detail": "A dependency outside the range asked for was moved to it even when it was already past the range's lowest version: `^0.101.0` does not reach 0.103.3, so 0.103.3 was moved back down. Now a dependency only moves up.",
|
|
25
|
+
"kind": "fixed",
|
|
26
|
+
"summary": "Moving dependencies never moves one below where it is",
|
|
27
|
+
"symbols": [
|
|
28
|
+
"applyDependencyMigrations"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"date": "2026-11-19",
|
|
33
|
+
"version": "0.8.2"
|
|
34
|
+
},
|
|
5
35
|
{
|
|
6
36
|
"changes": [
|
|
7
37
|
{
|
package/dist/applyMethods.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Migration } from "./types";
|
|
|
3
3
|
type MethodsMigration = Extract<Migration, {
|
|
4
4
|
methods: unknown;
|
|
5
5
|
}>;
|
|
6
|
+
type Owner = MethodsMigration["methods"]["owner"];
|
|
6
7
|
type Result = {
|
|
7
8
|
changed: boolean;
|
|
8
9
|
notes: string[];
|
|
@@ -13,4 +14,18 @@ export declare const applyMethods: (input: {
|
|
|
13
14
|
methods: MethodsMigration["methods"];
|
|
14
15
|
source: string;
|
|
15
16
|
}) => Result;
|
|
17
|
+
/**
|
|
18
|
+
* Where a file calls these methods on an instance of the owner, one line
|
|
19
|
+
* each: what a change that names its calls (`reaches.calls`) is looked for
|
|
20
|
+
* by, and what a method rename is shown at before it is applied.
|
|
21
|
+
*/
|
|
22
|
+
export declare const findCalls: (input: {
|
|
23
|
+
methods: readonly string[];
|
|
24
|
+
owner: Owner;
|
|
25
|
+
path: string;
|
|
26
|
+
source: string;
|
|
27
|
+
}) => {
|
|
28
|
+
line: number;
|
|
29
|
+
method: string;
|
|
30
|
+
}[];
|
|
16
31
|
export {};
|
package/dist/cli.js
CHANGED
|
@@ -169,6 +169,37 @@ var readMigration = (value, where, problems) => {
|
|
|
169
169
|
problems.push(`${where}: migration says neither rename, moved, resubpath, methods, dependencies nor manual`);
|
|
170
170
|
return;
|
|
171
171
|
};
|
|
172
|
+
var nonEmptyText = (value) => {
|
|
173
|
+
if (!Array.isArray(value))
|
|
174
|
+
return;
|
|
175
|
+
const [first, ...rest] = value.filter((entry) => isText(entry));
|
|
176
|
+
if (first === undefined || rest.length + 1 !== value.length)
|
|
177
|
+
return;
|
|
178
|
+
const list = [first, ...rest];
|
|
179
|
+
return list;
|
|
180
|
+
};
|
|
181
|
+
var readReach = (value, where, problems) => {
|
|
182
|
+
if (value === undefined)
|
|
183
|
+
return;
|
|
184
|
+
const calls = isRecord(value) && isRecord(value.calls) && isRecord(value.calls.owner) ? {
|
|
185
|
+
methods: nonEmptyText(value.calls.methods),
|
|
186
|
+
owner: value.calls.owner
|
|
187
|
+
} : undefined;
|
|
188
|
+
const files = isRecord(value) ? nonEmptyText(value.files) : undefined;
|
|
189
|
+
const callsRead = calls?.methods !== undefined && isText(calls.owner.export) && isText(calls.owner.module) ? {
|
|
190
|
+
methods: calls.methods,
|
|
191
|
+
owner: { export: calls.owner.export, module: calls.owner.module }
|
|
192
|
+
} : undefined;
|
|
193
|
+
if (!isRecord(value) || value.calls !== undefined && callsRead === undefined || value.files !== undefined && files === undefined || callsRead === undefined && files === undefined) {
|
|
194
|
+
problems.push(`${where}: reaches names neither calls nor files`);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const reach = {
|
|
198
|
+
...callsRead === undefined ? {} : { calls: callsRead },
|
|
199
|
+
...files === undefined ? {} : { files }
|
|
200
|
+
};
|
|
201
|
+
return reach;
|
|
202
|
+
};
|
|
172
203
|
var readChange = (value, where, problems) => {
|
|
173
204
|
if (!isRecord(value)) {
|
|
174
205
|
problems.push(`${where}: not an object`);
|
|
@@ -183,8 +214,10 @@ var readChange = (value, where, problems) => {
|
|
|
183
214
|
problems.push(`${where}: needs a summary`);
|
|
184
215
|
return;
|
|
185
216
|
}
|
|
217
|
+
const reaches = readReach(value.reaches, where, problems);
|
|
186
218
|
const shared = {
|
|
187
219
|
...isText(value.detail) ? { detail: value.detail } : {},
|
|
220
|
+
...reaches === undefined ? {} : { reaches },
|
|
188
221
|
...isText(value.reference) ? { reference: value.reference } : {},
|
|
189
222
|
summary: value.summary
|
|
190
223
|
};
|
|
@@ -994,6 +1027,7 @@ var renderChangelogJson = (changelog) => `${JSON.stringify({
|
|
|
994
1027
|
...change.detail === undefined ? {} : { detail: change.detail },
|
|
995
1028
|
kind: change.kind,
|
|
996
1029
|
...isDisruptive(change) ? { migration: change.migration } : {},
|
|
1030
|
+
...change.reaches === undefined ? {} : { reaches: change.reaches },
|
|
997
1031
|
...change.reference === undefined ? {} : { reference: change.reference },
|
|
998
1032
|
summary: change.summary,
|
|
999
1033
|
...change.symbols && change.symbols.length > 0 ? { symbols: change.symbols } : {}
|
|
@@ -1388,5 +1422,5 @@ await main().catch((error) => {
|
|
|
1388
1422
|
process.exit(1);
|
|
1389
1423
|
});
|
|
1390
1424
|
|
|
1391
|
-
//# debugId=
|
|
1425
|
+
//# debugId=364D985C300E901F64756E2164756E21
|
|
1392
1426
|
//# sourceMappingURL=cli.js.map
|