@tuturuuu/utils 0.23.0 → 0.23.1
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 +8 -0
- package/package.json +1 -1
- package/src/next-config.test.ts +14 -0
- package/src/next-config.ts +13 -0
- package/src/platform-release.test.ts +1 -1
- package/src/platform-release.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.23.1](https://github.com/tutur3u/platform/compare/utils-v0.23.0...utils-v0.23.1) (2026-08-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **platform:** merge notification and group visibility fixes ([4fe9e97](https://github.com/tutur3u/platform/commit/4fe9e970bf61bffaee4353b1ebb83ce2f880a4c8))
|
|
9
|
+
* **platform:** restore notifications and group visibility ([eb570a4](https://github.com/tutur3u/platform/commit/eb570a47e7a3d38fc855fbf3e887ecbde853ece0))
|
|
10
|
+
|
|
3
11
|
## [0.23.0](https://github.com/tutur3u/platform/compare/utils-v0.22.0...utils-v0.23.0) (2026-08-07)
|
|
4
12
|
|
|
5
13
|
|
package/package.json
CHANGED
package/src/next-config.test.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { tryToParsePath } from 'next/dist/lib/try-to-parse-path';
|
|
|
2
2
|
import { describe, expect, it } from 'vitest';
|
|
3
3
|
import {
|
|
4
4
|
createTuturuuuNextConfig,
|
|
5
|
+
createTuturuuuWebWorkspaceApiRewrites,
|
|
5
6
|
isTuturuuuNextCacheComponentsEnabled,
|
|
6
7
|
isTuturuuuNextReactCompilerEnabled,
|
|
7
8
|
isTuturuuuTurbopackRustReactCompilerEnabled,
|
|
@@ -249,6 +250,19 @@ describe('createTuturuuuNextConfig', () => {
|
|
|
249
250
|
});
|
|
250
251
|
});
|
|
251
252
|
|
|
253
|
+
describe('createTuturuuuWebWorkspaceApiRewrites', () => {
|
|
254
|
+
it('routes reserved static workspace endpoints before satellite dynamic routes', () => {
|
|
255
|
+
expect(
|
|
256
|
+
createTuturuuuWebWorkspaceApiRewrites('https://tuturuuu.com/')
|
|
257
|
+
).toEqual([
|
|
258
|
+
{
|
|
259
|
+
source: '/api/workspaces/invitations',
|
|
260
|
+
destination: 'https://tuturuuu.com/api/workspaces/invitations',
|
|
261
|
+
},
|
|
262
|
+
]);
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
|
|
252
266
|
describe('isTuturuuuNextCacheComponentsEnabled', () => {
|
|
253
267
|
it('keeps cache components enabled by default', () => {
|
|
254
268
|
expect(isTuturuuuNextCacheComponentsEnabled({})).toBe(true);
|
package/src/next-config.ts
CHANGED
|
@@ -13,6 +13,10 @@ export const TUTURUUU_NEXT_OPTIMIZE_PACKAGE_IMPORTS = [
|
|
|
13
13
|
'lucide-react',
|
|
14
14
|
] as const;
|
|
15
15
|
|
|
16
|
+
export const TUTURUUU_WEB_WORKSPACE_API_RESERVED_PATHS = [
|
|
17
|
+
'/api/workspaces/invitations',
|
|
18
|
+
] as const;
|
|
19
|
+
|
|
16
20
|
type NextImageConfig = NonNullable<NextConfig['images']>;
|
|
17
21
|
type NextImageRemotePattern = NonNullable<
|
|
18
22
|
NextImageConfig['remotePatterns']
|
|
@@ -151,6 +155,15 @@ export function trimTrailingSlashes(value: string) {
|
|
|
151
155
|
return end === value.length ? value : value.slice(0, end);
|
|
152
156
|
}
|
|
153
157
|
|
|
158
|
+
export function createTuturuuuWebWorkspaceApiRewrites(webAppUrl: string) {
|
|
159
|
+
const destinationOrigin = trimTrailingSlashes(webAppUrl);
|
|
160
|
+
|
|
161
|
+
return TUTURUUU_WEB_WORKSPACE_API_RESERVED_PATHS.map((source) => ({
|
|
162
|
+
source,
|
|
163
|
+
destination: `${destinationOrigin}${source}`,
|
|
164
|
+
}));
|
|
165
|
+
}
|
|
166
|
+
|
|
154
167
|
export function isTuturuuuNextDeployedEnvironment(
|
|
155
168
|
env: Environment = process.env
|
|
156
169
|
) {
|
|
@@ -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.35.
|
|
10
|
+
expect(TUTURUUU_PLATFORM_VERSION).toBe('0.35.2'); // 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.35.
|
|
3
|
+
export const TUTURUUU_PLATFORM_VERSION = '0.35.2'; // 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. */
|