@tuturuuu/utils 0.25.1 → 0.25.2
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.25.2](https://github.com/tutur3u/platform/compare/utils-v0.25.1...utils-v0.25.2) (2026-08-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **tasks:** reconcile external task ordering ([2ebeefa](https://github.com/tutur3u/platform/commit/2ebeefa4c13ea9d0b62c33e50cf4f6fed7fac76a))
|
|
9
|
+
|
|
3
10
|
## [0.25.1](https://github.com/tutur3u/platform/compare/utils-v0.25.0...utils-v0.25.1) (2026-08-15)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { getTicketIdentifier } from '../task-helper';
|
|
3
|
+
|
|
4
|
+
describe('getTicketIdentifier', () => {
|
|
5
|
+
it('keeps only the prefix while an optimistic task has no display number', () => {
|
|
6
|
+
expect(getTicketIdentifier('VHP', undefined)).toBe('VHP');
|
|
7
|
+
expect(getTicketIdentifier(null, undefined)).toBe('TASK');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('keeps the full identifier after the display number is assigned', () => {
|
|
11
|
+
expect(getTicketIdentifier('VHP', 247)).toBe('VHP-247');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
describe('platform release metadata', () => {
|
|
9
9
|
it('uses the centralized shared browser app version', () => {
|
|
10
|
-
expect(TUTURUUU_PLATFORM_VERSION).toBe('0.
|
|
10
|
+
expect(TUTURUUU_PLATFORM_VERSION).toBe('0.39.0'); // x-release-please-version
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it('preserves the source timestamp in builtAt and derives a short hash', () => {
|
package/src/platform-release.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PLATFORM_BUILD_METADATA } from './generated/platform-build-metadata';
|
|
2
2
|
|
|
3
|
-
export const TUTURUUU_PLATFORM_VERSION = '0.
|
|
3
|
+
export const TUTURUUU_PLATFORM_VERSION = '0.39.0'; // x-release-please-version
|
|
4
4
|
|
|
5
5
|
export type PlatformBuildMetadataInput = {
|
|
6
6
|
/** ISO timestamp of the source commit used for the build, not deployment time. */
|
|
@@ -4,9 +4,12 @@ import type { Task } from '@tuturuuu/types/primitives/Task';
|
|
|
4
4
|
|
|
5
5
|
export function getTicketIdentifier(
|
|
6
6
|
prefix: string | null | undefined,
|
|
7
|
-
displayNumber: number
|
|
7
|
+
displayNumber: number | null | undefined
|
|
8
8
|
): string {
|
|
9
9
|
const effectivePrefix = prefix?.trim() || 'TASK';
|
|
10
|
+
if (typeof displayNumber !== 'number' || !Number.isFinite(displayNumber)) {
|
|
11
|
+
return effectivePrefix.toUpperCase();
|
|
12
|
+
}
|
|
10
13
|
return `${effectivePrefix}-${displayNumber}`.toUpperCase();
|
|
11
14
|
}
|
|
12
15
|
|