@brightchain/brightchain-lib 0.20.0 → 0.21.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/package.json +5 -1
- package/brightchain-lib/BLOCK_COVERAGE_AUDIT.md +0 -169
- package/brightchain-lib/BROWSER_COMPAT.md +0 -54
- package/brightchain-lib/DEPRECATIONS.md +0 -454
- package/brightchain-lib/DEPRECATIONS_REMOVED.md +0 -160
- package/brightchain-lib/MIGRATION.md +0 -801
- package/brightchain-lib/NAMING_AUDIT.md +0 -233
- package/brightchain-lib/NAMING_CONVENTIONS.md +0 -346
- package/brightchain-lib/README.md +0 -611
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# Deprecated APIs Removed
|
|
2
|
-
|
|
3
|
-
This document lists all deprecated APIs that have been removed from BrightChain as part of Phase 9: Deprecation Planning.
|
|
4
|
-
|
|
5
|
-
## Summary
|
|
6
|
-
|
|
7
|
-
All deprecated APIs have been removed from the codebase. This is a breaking change that requires code updates for any consumers of the library.
|
|
8
|
-
|
|
9
|
-
## Removed Items
|
|
10
|
-
|
|
11
|
-
### 1. Checksum Utility Functions
|
|
12
|
-
|
|
13
|
-
**File Removed:** `brightchain-lib/src/lib/utils/checksumUtils.ts`
|
|
14
|
-
|
|
15
|
-
All utility functions have been removed:
|
|
16
|
-
- `checksumToBuffer()` - Use `checksum.toBuffer()` instead
|
|
17
|
-
- `checksumToUint8Array()` - Use `checksum.toUint8Array()` instead
|
|
18
|
-
- `checksumToHex()` - Use `checksum.toHex()` instead
|
|
19
|
-
- `checksumFromHex()` - Use `Checksum.fromHex()` instead
|
|
20
|
-
- `checksumFromBuffer()` - Use `Checksum.fromBuffer()` instead
|
|
21
|
-
- `checksumFromUint8Array()` - Use `Checksum.fromUint8Array()` instead
|
|
22
|
-
|
|
23
|
-
**Migration:** Use Checksum class methods directly.
|
|
24
|
-
|
|
25
|
-
### 2. Deprecated Type Aliases
|
|
26
|
-
|
|
27
|
-
**File:** `brightchain-lib/src/lib/types/checksum.ts`
|
|
28
|
-
|
|
29
|
-
Removed type aliases:
|
|
30
|
-
- `ChecksumBuffer` - Use `Checksum` class instead
|
|
31
|
-
- `ChecksumUint8Array` - Use `Checksum` class instead
|
|
32
|
-
|
|
33
|
-
**Migration:** Replace all usages with the `Checksum` class.
|
|
34
|
-
|
|
35
|
-
### 3. ChecksumService Method Variants
|
|
36
|
-
|
|
37
|
-
**File:** `brightchain-lib/src/lib/services/checksum.service.ts`
|
|
38
|
-
|
|
39
|
-
All methods now return `Checksum` class instances. The `*AsClass` method variants have been removed:
|
|
40
|
-
- `calculateChecksumAsClass()` - Now just `calculateChecksum()`
|
|
41
|
-
- `calculateChecksumForBuffersAsClass()` - Now just `calculateChecksumForBuffers()`
|
|
42
|
-
- `calculateChecksumForStringAsClass()` - Now just `calculateChecksumForString()`
|
|
43
|
-
- `calculateChecksumForFileAsClass()` - Now just `calculateChecksumForFile()`
|
|
44
|
-
- `calculateChecksumForStreamAsClass()` - Now just `calculateChecksumForStream()`
|
|
45
|
-
- `hexStringToChecksumClass()` - Now just `hexStringToChecksum()`
|
|
46
|
-
|
|
47
|
-
**Migration:** Remove the `AsClass` suffix from method calls. All methods now return `Checksum` instances.
|
|
48
|
-
|
|
49
|
-
### 4. Deprecated i18n Functions
|
|
50
|
-
|
|
51
|
-
**File:** `brightchain-lib/src/lib/i18n/index.ts`
|
|
52
|
-
|
|
53
|
-
Removed functions:
|
|
54
|
-
- `registerTranslation()` - No replacement, use `@digitaldefiance/i18n-lib` directly
|
|
55
|
-
|
|
56
|
-
**Migration:** Use the `@digitaldefiance/i18n-lib` package directly for advanced i18n features.
|
|
57
|
-
|
|
58
|
-
### 5. StringLanguages Enum
|
|
59
|
-
|
|
60
|
-
**File Removed:** `brightchain-lib/src/lib/enumerations/stringLanguages.ts`
|
|
61
|
-
|
|
62
|
-
The entire file has been removed.
|
|
63
|
-
|
|
64
|
-
**Migration:** Use `LanguageCodes` from `@digitaldefiance/i18n-lib` instead:
|
|
65
|
-
```typescript
|
|
66
|
-
// Before
|
|
67
|
-
import { StringLanguages } from 'brightchain-lib';
|
|
68
|
-
const lang = StringLanguages.EnglishUS;
|
|
69
|
-
|
|
70
|
-
// After
|
|
71
|
-
import { LanguageCodes } from '@digitaldefiance/i18n-lib';
|
|
72
|
-
const lang = LanguageCodes.EN_US;
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### 6. Deprecated Types
|
|
76
|
-
|
|
77
|
-
**File Removed:** `brightchain-lib/src/lib/types.ts`
|
|
78
|
-
|
|
79
|
-
Removed types:
|
|
80
|
-
- `EnumLanguageTranslation<T>` - No replacement
|
|
81
|
-
- `createTranslations()` - No replacement
|
|
82
|
-
|
|
83
|
-
**Migration:** Implement similar functionality in your own codebase if needed.
|
|
84
|
-
|
|
85
|
-
### 7. IConstants Interface
|
|
86
|
-
|
|
87
|
-
**File:** `brightchain-lib/src/lib/interfaces/constants.ts`
|
|
88
|
-
|
|
89
|
-
Removed interface:
|
|
90
|
-
- `IConstants` - Use specific constant interfaces instead
|
|
91
|
-
|
|
92
|
-
**Migration:** Use specific constant interfaces like `ICBLConsts`, `IFECConsts`, `ITupleConsts`, etc.
|
|
93
|
-
|
|
94
|
-
### 8. CBLService Static Property
|
|
95
|
-
|
|
96
|
-
**File:** `brightchain-lib/src/lib/services/cblService.ts`
|
|
97
|
-
|
|
98
|
-
Removed static property:
|
|
99
|
-
- `CBLService.CreatorLength` - Use instance method `creatorLength` instead
|
|
100
|
-
|
|
101
|
-
**Migration:**
|
|
102
|
-
```typescript
|
|
103
|
-
// Before
|
|
104
|
-
const length = CBLService.CreatorLength;
|
|
105
|
-
|
|
106
|
-
// After
|
|
107
|
-
const cblService = new CBLService();
|
|
108
|
-
const length = cblService.creatorLength;
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Impact
|
|
112
|
-
|
|
113
|
-
### Breaking Changes
|
|
114
|
-
|
|
115
|
-
All removed APIs are breaking changes. Code that uses these APIs will fail to compile or run.
|
|
116
|
-
|
|
117
|
-
### Automatic Fixes Applied
|
|
118
|
-
|
|
119
|
-
As part of the deprecation removal, the following automatic fixes were applied to the codebase:
|
|
120
|
-
|
|
121
|
-
1. **StringLanguages imports** - All imports of `StringLanguages` and `StringLanguage` were automatically replaced with `LanguageCodes` and `LanguageCode` from `@digitaldefiance/i18n-lib`
|
|
122
|
-
2. **Import paths** - All import paths pointing to the removed `stringLanguages.ts` file were updated to import from `@digitaldefiance/i18n-lib`
|
|
123
|
-
|
|
124
|
-
### Test Failures
|
|
125
|
-
|
|
126
|
-
The removal of deprecated APIs causes test failures in the codebase. These failures are expected and indicate places where the code needs to be updated to use the new APIs.
|
|
127
|
-
|
|
128
|
-
Common test failures:
|
|
129
|
-
1. Type mismatches where `Checksum` is expected but `ChecksumUint8Array` is provided (or vice versa)
|
|
130
|
-
2. Missing methods on `Checksum` class (e.g., trying to use array methods like `every()`)
|
|
131
|
-
3. Import errors for removed types and functions
|
|
132
|
-
|
|
133
|
-
### Next Steps
|
|
134
|
-
|
|
135
|
-
1. Update all code to use the new APIs
|
|
136
|
-
2. Fix all test failures
|
|
137
|
-
3. Update documentation and examples
|
|
138
|
-
4. Verify all functionality works with the new APIs
|
|
139
|
-
|
|
140
|
-
## Migration Guide
|
|
141
|
-
|
|
142
|
-
See [MIGRATION.md](./MIGRATION.md) for detailed migration instructions and examples.
|
|
143
|
-
|
|
144
|
-
## Requirements Satisfied
|
|
145
|
-
|
|
146
|
-
This removal satisfies the following requirements:
|
|
147
|
-
- **Requirement 15.5:** Mark deprecated APIs with clear deprecation warnings ✅ (Previously done)
|
|
148
|
-
- **Requirement 15.6:** Maintain deprecated APIs for at least one major version ✅ (Now removed)
|
|
149
|
-
|
|
150
|
-
## Timeline
|
|
151
|
-
|
|
152
|
-
- **Phase 1-8:** Deprecated APIs marked and maintained for backward compatibility
|
|
153
|
-
- **Phase 9:** All deprecated APIs removed (current phase)
|
|
154
|
-
- **Next:** Update all code to use new APIs
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
**Date:** January 2025
|
|
159
|
-
**Version:** 2.0.0
|
|
160
|
-
**Status:** Complete
|