@cratis/chronicle 2.1.1 → 3.0.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.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { readFileSync } from 'node:fs';
|
|
5
|
+
import { dirname, join } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { describe, expect, it } from 'vitest';
|
|
8
|
+
|
|
9
|
+
// The peer range's lower bound is a compatibility claim; the exact devDependency pin is the only version this
|
|
10
|
+
// package is ever compiled and tested against. When they disagree the range claims support for versions nothing
|
|
11
|
+
// verifies, and nothing fails until a consumer resolves one of them.
|
|
12
|
+
//
|
|
13
|
+
// That is not hypothetical: the range shipped as ^7 while ConceptAs - used here as a runtime value, compared by
|
|
14
|
+
// class object in JsonSchemaGenerator - only exists from 7.14.0 onward, leaving 48 published versions that
|
|
15
|
+
// satisfied the range and could not link. Tying the bound to the pin is what stops the two drifting again.
|
|
16
|
+
const manifest = JSON.parse(
|
|
17
|
+
readFileSync(join(dirname(fileURLToPath(import.meta.url)), 'package.json'), 'utf-8')) as {
|
|
18
|
+
peerDependencies?: Record<string, string>;
|
|
19
|
+
devDependencies?: Record<string, string>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('fundamentals peer range', () => {
|
|
23
|
+
const peer = manifest.peerDependencies?.['@cratis/fundamentals'];
|
|
24
|
+
const pinned = manifest.devDependencies?.['@cratis/fundamentals'];
|
|
25
|
+
|
|
26
|
+
it('should declare fundamentals as a peer dependency', () => expect(peer).toBeDefined());
|
|
27
|
+
|
|
28
|
+
it('should pin one concrete version to build against', () => expect(pinned).toMatch(/^\d+\.\d+\.\d+$/));
|
|
29
|
+
|
|
30
|
+
it('should admit no version below the one it builds against', () => expect(peer).toBe(`^${pinned}`));
|
|
31
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/chronicle",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "TypeScript idiomatic client for Cratis Chronicle",
|
|
5
5
|
"author": "Cratis",
|
|
6
6
|
"license": "MIT",
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"dependencies": {
|
|
137
137
|
"@bufbuild/protobuf": "^2.12.0",
|
|
138
138
|
"@cratis/chronicle.contracts": "16.4.0",
|
|
139
|
-
"@cratis/fundamentals": "7.14.0",
|
|
140
139
|
"@grpc/grpc-js": "^1.14.4",
|
|
141
140
|
"@opentelemetry/api": "^1.9.1",
|
|
142
141
|
"nice-grpc": "^2.1.16",
|
|
@@ -145,8 +144,12 @@
|
|
|
145
144
|
"undici": "^8.7.0"
|
|
146
145
|
},
|
|
147
146
|
"devDependencies": {
|
|
147
|
+
"@cratis/fundamentals": "7.14.0",
|
|
148
148
|
"@types/node": "^25.9.1",
|
|
149
149
|
"typescript": "^6.0.3",
|
|
150
150
|
"vitest": "^4.1.10"
|
|
151
|
+
},
|
|
152
|
+
"peerDependencies": {
|
|
153
|
+
"@cratis/fundamentals": "^7.14.0"
|
|
151
154
|
}
|
|
152
155
|
}
|