@virmator/docs 13.13.3 → 13.13.5

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.
@@ -15,7 +15,7 @@ export const defaultDocumentationRequirements: TypeDocOptionMap['requiredToBeDoc
15
15
  'Variable',
16
16
  ];
17
17
 
18
- export const baseTypedocConfig: PartialDeep<TypeDocOptionMap> = {
18
+ export const baseTypedocConfig = {
19
19
  cacheBust: true,
20
20
  cleanOutputDir: true,
21
21
  excludeExternals: true,
@@ -35,4 +35,4 @@ export const baseTypedocConfig: PartialDeep<TypeDocOptionMap> = {
35
35
  navigation: {
36
36
  includeCategories: true,
37
37
  },
38
- };
38
+ } satisfies PartialDeep<TypeDocOptionMap>;
@@ -1,13 +1,14 @@
1
1
  import {baseTypedocConfig} from '@virmator/docs/configs/typedoc.config.base';
2
- import {join, resolve} from 'node:path';
3
- import type {TypeDocOptions} from 'typedoc';
2
+ import {dirname, join} from 'node:path/posix';
3
+ import {fileURLToPath} from 'node:url';
4
+ import {type TypeDocOptions} from 'typedoc';
4
5
 
5
- const repoRoot = resolve(import.meta.dirname, '..');
6
- const indexTsFile = join(repoRoot, 'src', 'index.ts');
6
+ const indexTsFile = join(dirname(dirname(fileURLToPath(import.meta.url))), 'src', 'index.ts');
7
+ const outDirPath = join(dirname(dirname(fileURLToPath(import.meta.url))), 'dist-docs');
7
8
 
8
9
  export const typeDocConfig: Partial<TypeDocOptions> = {
9
10
  ...baseTypedocConfig,
10
- out: join(repoRoot, 'dist-docs'),
11
+ out: outDirPath,
11
12
  entryPoints: [
12
13
  indexTsFile,
13
14
  ],
@@ -1,13 +1,14 @@
1
1
  import {baseTypedocConfig} from '@virmator/docs/configs/typedoc.config.base';
2
- import {join, resolve} from 'path';
3
- import type {TypeDocOptions} from 'typedoc';
2
+ import {dirname, join} from 'node:path/posix';
3
+ import {fileURLToPath} from 'node:url';
4
+ import {type TypeDocOptions} from 'typedoc';
4
5
 
5
- const repoRoot = resolve(import.meta.dirname, '..');
6
- const indexTsFile = join(repoRoot, 'src', 'docs.ts');
6
+ const indexTsFile = join(dirname(dirname(fileURLToPath(import.meta.url))), 'src', 'docs.ts');
7
+ const outDirPath = join(dirname(dirname(fileURLToPath(import.meta.url))), 'dist-docs');
7
8
 
8
9
  export const typeDocConfig: Partial<TypeDocOptions> = {
9
10
  ...baseTypedocConfig,
10
- out: join(repoRoot, 'dist-docs'),
11
+ out: outDirPath,
11
12
  entryPoints: [
12
13
  indexTsFile,
13
14
  ],
package/dist/docs.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { RuntimeEnv, type Logger } from '@augment-vir/common';
2
2
  import { NpmDepType, PackageType } from '@virmator/core';
3
+ import type { PartialDeep } from 'type-fest';
3
4
  import type * as Typedoc from 'typedoc';
4
5
  /** A virmator plugin for checking and generating documentation. */
5
6
  export declare const virmatorDocsPlugin: Readonly<Readonly<{
@@ -92,7 +93,7 @@ export declare const virmatorDocsPlugin: Readonly<Readonly<{
92
93
  /** Runs TypeDoc with a TypeScript config file just like `@virmator/docs` does. */
93
94
  export declare function runTypedoc({ config, packageDir, checkOnly, log, }: {
94
95
  /** Full typedoc options object. */
95
- config: Partial<Typedoc.TypeDocOptions>;
96
+ config: PartialDeep<Typedoc.TypeDocOptionMap>;
96
97
  /**
97
98
  * Path to the npm package which is running typedoc. This should be a path to a directory that
98
99
  * directly contains a `package.json` file.
package/dist/docs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { assertWrap, check } from '@augment-vir/assert';
2
- import { ensureError, log as logImport, RuntimeEnv } from '@augment-vir/common';
2
+ import { ensureError, log as logImport, RuntimeEnv, } from '@augment-vir/common';
3
3
  import { readPackageJson } from '@augment-vir/node';
4
4
  import { defineVirmatorPlugin, NpmDepType, PackageType, VirmatorNoTraceError } from '@virmator/core';
5
5
  import mri from 'mri';
@@ -191,7 +191,7 @@ async function runTypedocInternal(options, typeDoc, log) {
191
191
  return false;
192
192
  }
193
193
  else if (app.options.getValue('watch')) {
194
- throw new Error(';TypeDoc watch mode not supported in virmator. Run typedoc directly instead.');
194
+ throw new Error('TypeDoc watch mode not supported in virmator. Run typedoc directly instead.');
195
195
  }
196
196
  const project = await app.convert();
197
197
  if (!project || (app.options.getValue('treatWarningsAsErrors') && app.logger.hasWarnings())) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/docs",
3
- "version": "13.13.3",
3
+ "version": "13.13.5",
4
4
  "description": "Default TS docs plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -35,18 +35,19 @@
35
35
  "@augment-vir/assert": "^31.10.1",
36
36
  "@augment-vir/common": "^31.10.1",
37
37
  "@augment-vir/node": "^31.10.1",
38
- "@virmator/core": "^13.13.3",
38
+ "@virmator/core": "^13.13.5",
39
39
  "chalk": "^5.4.1",
40
- "mri": "^1.2.0"
40
+ "mri": "^1.2.0",
41
+ "type-fest": "^4.38.0"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@augment-vir/test": "^31.10.1",
44
- "@types/node": "^22.13.10",
45
+ "@types/node": "^22.13.13",
45
46
  "c8": "^10.1.3",
46
47
  "esbuild": "^0.25.1",
47
48
  "istanbul-smart-text-reporter": "^1.1.5",
48
49
  "markdown-code-example-inserter": "^3.0.3",
49
- "typedoc": "^0.28.0"
50
+ "typedoc": "^0.28.1"
50
51
  },
51
52
  "engines": {
52
53
  "node": ">=22"