Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 7a1969b

Browse files
committed
fix: circular references and test failures
1 parent 8641036 commit 7a1969b

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

packages/core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"prepack": "cp ../../README.md ./",
2727
"postpack": "rm ./README.md",
2828
"serve": "webpack serve --config-name configMain",
29-
"test": "cross-env NODE_ENV=test jest",
29+
"test": "cross-env NODE_ENV=test yarn run-s clean test:unit",
30+
"test:unit": "jest",
3031
"test:integration": "cross-env NODE_ENV=test jest -c jest.config.integration.js",
3132
"test:ci": "cross-env NODE_ENV=test jest --maxWorkers=2 --coverage",
3233
"test:integration:ci": "cross-env NODE_ENV=test jest -c jest.config.integration.js --maxWorkers=2",

packages/core/src/backends/bitbucket/API.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import get from 'lodash/get';
44
import { dirname } from 'path';
55
import { parse } from 'what-the-diff';
66

7-
import { PreviewState } from '@staticcms/core';
7+
import { PreviewState } from '@staticcms/core/constants/enums';
88
import {
99
APIError,
1010
basename,
@@ -31,8 +31,8 @@ import {
3131
statusToLabel,
3232
} from '@staticcms/core/lib/util/APIUtils';
3333

34-
import type { WorkflowStatus } from '@staticcms/core/constants/publishModes';
3534
import type { DataFile, PersistOptions, UnpublishedEntry } from '@staticcms/core';
35+
import type { WorkflowStatus } from '@staticcms/core/constants/publishModes';
3636
import type { ApiRequest, FetchError } from '@staticcms/core/lib/util';
3737
import type AssetProxy from '@staticcms/core/valueObjects/AssetProxy';
3838

packages/core/src/backends/git-gateway/implementation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import intersection from 'lodash/intersection';
55
import pick from 'lodash/pick';
66
import React, { useCallback } from 'react';
77

8+
import { PreviewState } from '@staticcms/core/constants/enums';
89
import { WorkflowStatus } from '@staticcms/core/constants/publishModes';
9-
import { PreviewState } from '@staticcms/core';
1010
import {
1111
AccessTokenError,
1212
APIError,

packages/core/src/backends/github/API.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import trim from 'lodash/trim';
77
import trimStart from 'lodash/trimStart';
88
import { dirname } from 'path';
99

10+
import { PreviewState } from '@staticcms/core/constants/enums';
1011
import { WorkflowStatus } from '@staticcms/core/constants/publishModes';
11-
import { PreviewState } from '@staticcms/core';
1212
import {
1313
APIError,
1414
EditorialWorkflowError,

packages/core/src/backends/gitlab/API.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import result from 'lodash/result';
44
import trimStart from 'lodash/trimStart';
55
import { dirname } from 'path';
66

7-
import { PreviewState } from '@staticcms/core';
7+
import { PreviewState } from '@staticcms/core/constants/enums';
88
import {
99
APIError,
1010
Cursor,
@@ -30,8 +30,8 @@ import {
3030
statusToLabel,
3131
} from '@staticcms/core/lib/util/APIUtils';
3232

33-
import type { WorkflowStatus } from '@staticcms/core/constants/publishModes';
3433
import type { DataFile, PersistOptions, UnpublishedEntry } from '@staticcms/core';
34+
import type { WorkflowStatus } from '@staticcms/core/constants/publishModes';
3535
import type { ApiRequest, FetchError } from '@staticcms/core/lib/util';
3636
import type AssetProxy from '@staticcms/core/valueObjects/AssetProxy';
3737

packages/core/src/constants/enums.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export enum PreviewState {
2+
Other = 'other',
3+
Success = 'success',
4+
}
5+
6+
export enum CollectionType {
7+
FOLDER,
8+
FILES,
9+
}

packages/core/src/interface.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,11 +1350,6 @@ export interface ShortcodeConfig<P = {}> {
13501350
preview: ComponentType<ShortcodePreviewProps>;
13511351
}
13521352

1353-
export enum CollectionType {
1354-
FOLDER,
1355-
FILES,
1356-
}
1357-
13581353
export type DeepPartial<T> = T extends object
13591354
? {
13601355
[P in keyof T]?: DeepPartial<T[P]>;
@@ -1441,8 +1436,3 @@ export interface UnpublishedEntryMediaFile {
14411436
id: string;
14421437
path: string;
14431438
}
1444-
1445-
export enum PreviewState {
1446-
Other = 'other',
1447-
Success = 'success',
1448-
}

0 commit comments

Comments
 (0)