@absolutejs/changelog 0.7.0 → 0.8.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 +31 -0
- package/dist/apply.d.ts +5 -1
- package/dist/applyDependencies.d.ts +13 -0
- package/dist/applyMethods.d.ts +16 -0
- package/dist/cli.js +82 -27
- package/dist/cli.js.map +6 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.js +371 -115
- package/dist/index.js.map +10 -8
- package/dist/types.d.ts +39 -3
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -9,9 +9,10 @@ export type DisruptiveKind = (typeof DISRUPTIVE_KINDS)[number];
|
|
|
9
9
|
/**
|
|
10
10
|
* How to move code from before to after.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* rename and a move are the overwhelming majority of real breaking
|
|
14
|
-
* and both are mechanical
|
|
12
|
+
* All but one of these are data rather than instructions, and that is the
|
|
13
|
+
* point: a rename and a move are the overwhelming majority of real breaking
|
|
14
|
+
* changes, and both are mechanical; so are a method renamed on a class and a
|
|
15
|
+
* peer that has to move with a release. Described as data they can be applied by anything
|
|
15
16
|
* -- a CLI, an editor, a hosted upgrade button -- without running code that
|
|
16
17
|
* arrived from a registry, which is the difference between an upgrade that
|
|
17
18
|
* happens and an upgrade somebody schedules for a quiet week.
|
|
@@ -45,6 +46,37 @@ export type Migration<TSymbol extends string = string> =
|
|
|
45
46
|
readonly to: string;
|
|
46
47
|
};
|
|
47
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Methods on a class's instances kept their meaning and changed their
|
|
51
|
+
* names: `new Elysia().beforeHandle(...)` becomes `.onBeforeHandle(...)`.
|
|
52
|
+
* Renamed where the receiver is plainly an instance (a chain from `new
|
|
53
|
+
* Owner(...)`, or a name declared as one); a call whose receiver the file
|
|
54
|
+
* doesn't say is reported for a person, never guessed.
|
|
55
|
+
*/
|
|
56
|
+
| {
|
|
57
|
+
readonly instruction: string;
|
|
58
|
+
readonly methods: {
|
|
59
|
+
/** The class, as projects import it. */
|
|
60
|
+
readonly owner: {
|
|
61
|
+
readonly module: string;
|
|
62
|
+
readonly export: string;
|
|
63
|
+
};
|
|
64
|
+
/** Old method name to new. */
|
|
65
|
+
readonly renames: Readonly<Record<string, string>>;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Dependencies a project declares that have to move with this release
|
|
70
|
+
* (a peer that changed major): each named one, or every package of a
|
|
71
|
+
* scope (`@elysia/*`), is set to the range in package.json.
|
|
72
|
+
*/
|
|
73
|
+
| {
|
|
74
|
+
readonly instruction: string;
|
|
75
|
+
readonly dependencies: {
|
|
76
|
+
readonly names: NonEmpty<string>;
|
|
77
|
+
readonly range: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
48
80
|
/** Neither a rename nor a move: somebody has to read the call. */
|
|
49
81
|
| {
|
|
50
82
|
readonly instruction: string;
|
|
@@ -141,6 +173,10 @@ export declare const CHANGELOG_MARKDOWN = "CHANGELOG.md";
|
|
|
141
173
|
/** Where entries wait between releases, one file each so two branches adding
|
|
142
174
|
* a change do not conflict over the same line. */
|
|
143
175
|
export declare const UNRELEASED_DIRECTORY = "changelog/unreleased";
|
|
176
|
+
/** Whether a migration edits package.json rather than source files. */
|
|
177
|
+
export declare const isDependencyMigration: (migration: Migration) => migration is Extract<Migration, {
|
|
178
|
+
dependencies: unknown;
|
|
179
|
+
}>;
|
|
144
180
|
export declare const isDisruptive: (change: Change) => change is DisruptiveChange;
|
|
145
181
|
/** Whether a migration can be applied rather than read. */
|
|
146
182
|
export declare const isMechanical: (migration: Migration) => migration is Exclude<Migration, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/changelog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The changelog contract for the AbsoluteJS packages. Changes are written as typed entries the compiler checks, the release gate reconciles them against the package's own published types so a change nobody wrote down cannot ship, and migrations are data rather than prose so an upgrade can be applied instead of read.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|