Skip to content

Commit 50e0e9e

Browse files
committed
chore: update/resolve v2-related fixmes
1 parent 995344a commit 50e0e9e

File tree

13 files changed

+20
-21
lines changed

13 files changed

+20
-21
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
node-version: 20
5858
cache: 'npm'
59-
# FIXME: add vitest coverage report
59+
# FIXME: add vitest coverage report (2.0)
6060

6161
code-style-check:
6262
runs-on: ubuntu-latest

packages/cli/src/commands/build-docs/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function getObjectOrJSON(
4141
if (config) {
4242
logger.info(`Found ${config.configFile} and using theme.openapi options\n`);
4343

44-
return config.theme.openapi ? config.theme.openapi : {}; // FIXME: ? theme is deprecated
44+
return config.theme.openapi ? config.theme.openapi : {}; // FIXME: theme is deprecated (2.0)
4545
}
4646
return {};
4747
}

packages/cli/src/commands/join.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export async function handleJoin({
9090
);
9191
}
9292

93-
// FIXME: decide on the behaviour. Can we join by aliases? If yes, then I'd expect decorators to be applied
93+
// FIXME: decide on the behaviour. Can we join by aliases? If yes, then I'd expect decorators to be applied (2.0)
9494
const apis = await getFallbackApisOrExit(argv.apis, config);
9595
if (apis.length < 2) {
9696
return exitWithError(`At least 2 APIs should be provided.`);

packages/cli/src/commands/lint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type LintOptions = {
3636
format: OutputFormat;
3737
'generate-ignore-file'?: boolean;
3838
'skip-rule'?: string[];
39-
'skip-preprocessor'?: string[]; // FIXME: do we need this?
39+
'skip-preprocessor'?: string[]; // FIXME: do we need this? (2.0)
4040
} & VerifyConfigOptions;
4141

4242
export async function handleLint({

packages/cli/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export type Entrypoint = {
2323
alias?: string;
2424
output?: string;
2525
};
26-
export const outputExtensions = ['json', 'yaml', 'yml'] as ReadonlyArray<BundleOutputFormat>; // FIXME: use one source of truth
27-
export type OutputExtensions = 'json' | 'yaml' | 'yml' | undefined; // FIXME: use one source of truth
26+
export const outputExtensions = ['json', 'yaml', 'yml'] as ReadonlyArray<BundleOutputFormat>; // FIXME: use one source of truth (2.0)
27+
export type OutputExtensions = 'json' | 'yaml' | 'yml' | undefined; // FIXME: use one source of truth (2.0)
2828
export type CommandOptions =
2929
| StatsOptions
3030
| SplitOptions

packages/cli/src/utils/js-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// FIXME: remove?
1+
// FIXME: investigate if it can be removed (2.0)
22
export function isObject(obj: unknown): obj is Record<string, unknown> {
33
const type = typeof obj;
44
return type === 'function' || (type === 'object' && !!obj);
55
}
66

7-
// FIXME: remove?
7+
// FIXME: investigate if it can be removed (2.0)
88
export function isEmptyObject(obj: any) {
99
return !!obj && Object.keys(obj).length === 0;
1010
}

packages/cli/src/utils/miscellaneous.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export function getAndValidateFileExtension(fileName: string): NonNullable<Outpu
289289
const ext = fileName.split('.').pop();
290290

291291
if (['yaml', 'yml', 'json'].includes(ext!)) {
292-
// FIXME: ^ use one source of truth
292+
// FIXME: ^ use one source of truth (2.0)
293293
return ext as NonNullable<OutputExtensions>;
294294
}
295295
logger.warn(`Unsupported file extension: ${ext}. Using yaml.\n`);

packages/core/src/config/config-resolvers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ export async function resolvePlugins(
151151
let requiredPlugin: ImportedPlugin | undefined;
152152

153153
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
154-
// @ts-ignore FIXME: remove?
154+
// @ts-ignore FIXME: investigate if we still need this (2.0)
155155
if (typeof __webpack_require__ === 'function') {
156156
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
157-
// @ts-ignore FIXME: remove?
157+
// @ts-ignore FIXME: investigate if we still need this (2.0)
158158
requiredPlugin = __non_webpack_require__(absolutePluginPath);
159159
} else {
160160
const mod = await import(url.pathToFileURL(absolutePluginPath).pathname);

packages/core/src/config/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class StyleguideConfig {
129129
Record<string, Set<string>>
130130
>) || {};
131131

132-
replaceSpecWithStruct(Object.keys(this.ignore), this.ignore); // FIXME: remove this
132+
replaceSpecWithStruct(Object.keys(this.ignore), this.ignore); // FIXME: remove this (2.0)
133133

134134
// resolve ignore paths
135135
for (const fileName of Object.keys(this.ignore)) {
@@ -409,12 +409,12 @@ export class Config {
409409
styleguide: StyleguideConfig;
410410
resolve: ResolveConfig;
411411
licenseKey?: string;
412-
theme: ThemeRawConfig; // FIXME: theme is deprecated
412+
theme: ThemeRawConfig; // FIXME: theme is deprecated (2.0)
413413
telemetry?: Telemetry;
414414
constructor(public rawConfig: ResolvedConfig, public configFile?: string) {
415415
this.apis = rawConfig.apis || {};
416416
this.styleguide = new StyleguideConfig(rawConfig.styleguide || {}, configFile);
417-
this.theme = rawConfig.theme || {}; // FIXME: theme is deprecated
417+
this.theme = rawConfig.theme || {}; // FIXME: theme is deprecated (2.0)
418418
this.resolve = getResolveConfig(rawConfig?.resolve);
419419
this.telemetry = rawConfig.telemetry;
420420
}

packages/core/src/config/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export function getMergedConfig(config: Config, apiName?: string): Config {
290290
extendPaths,
291291
pluginPaths,
292292
},
293-
// FIXME: theme is deprecated
293+
// FIXME: theme is deprecated (2.0)
294294
theme: {
295295
...config.rawConfig.theme,
296296
...config.apis[apiName]?.theme,
@@ -368,7 +368,7 @@ export function transformConfig(
368368
const { styleguideConfig, rawConfigRest } = extractFlatConfig(rest);
369369

370370
const transformedConfig: RawConfig = {
371-
// FIXME: ? theme is deprecated
371+
// FIXME: theme is deprecated (2.0)
372372
theme: {
373373
openapi: {
374374
...referenceDocs,

0 commit comments

Comments
 (0)