Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cparra/apexdocs",
"version": "3.3.0",
"version": "3.3.1",
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
"keywords": [
"apex",
Expand All @@ -21,7 +21,7 @@
"scripts": {
"test": "npm run build && jest",
"test:cov": "npm run build && jest --coverage",
"build": "rimraf ./lib && npm run lint && tsc --noEmit && pkgroll",
"build": "rimraf ./dist && npm run lint && tsc --noEmit && pkgroll",
"lint": "eslint \"./src/**/*.{js,ts}\" --quiet --fix",
"prepare": "npm run build",
"version": "npm run format && git add -A src",
Expand Down
2 changes: 1 addition & 1 deletion src/core/changelog/generate-change-log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { changelogTemplate } from './templates/changelog-template';
import { ReflectionErrors } from '../errors/errors';
import { apply } from '#utils/fp';
import { filterScope } from '../reflection/filter-scope';
import { skip } from '../../index';
import { skip } from '../shared/utils';

export type ChangeLogPageData = {
content: string;
Expand Down
9 changes: 9 additions & 0 deletions src/core/shared/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { Skip } from './types';

/**
* Represents a file to be skipped.
*/
export function skip(): Skip {
return {
_tag: 'Skip',
};
}

export function isSkip(value: unknown): value is Skip {
return Object.prototype.hasOwnProperty.call(value, '_tag') && (value as Skip)._tag === 'Skip';
}
10 changes: 1 addition & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
UserDefinedOpenApiConfig,
UserDefinedChangelogConfig,
} from './core/shared/types';
import { skip } from './core/shared/utils';
import { changeLogDefaults, markdownDefaults, openApiDefaults } from './defaults';
import { process } from './node/process';

Expand Down Expand Up @@ -59,15 +60,6 @@ function defineChangelogConfig(config: ConfigurableChangelogConfig): Partial<Use
};
}

/**
* Represents a file to be skipped.
*/
function skip(): Skip {
return {
_tag: 'Skip',
};
}

export {
defineMarkdownConfig,
ConfigurableMarkdownConfig,
Expand Down
Loading