@altano/remark-mdx-toc-with-slugs 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +6 -7
  2. package/package.json +30 -19
package/dist/index.d.ts CHANGED
@@ -1,16 +1,15 @@
1
- import { TocEntry, RemarkMdxTocOptions } from 'remark-mdx-toc';
2
- import { Plugin } from 'unified';
3
-
4
- declare type TableOfContentsEntry = TocEntry & {
1
+ import type { RemarkMdxTocOptions, TocEntry } from "remark-mdx-toc";
2
+ import type { Plugin } from "unified";
3
+ export type TableOfContentsEntry = TocEntry & {
5
4
  slug: string;
6
5
  children: TableOfContentsEntry[];
7
6
  };
8
- declare type RemarkMdxTocWithSlugsOptions = RemarkMdxTocOptions;
7
+ export type RemarkMdxTocWithSlugsOptions = RemarkMdxTocOptions;
9
8
  /**
10
9
  * Remark plugin that, given a tree that has had remark-mdx-toc run over it
11
10
  * already, the toc data will be enhanced to have auto-generated slugs for every
12
11
  * heading. This uses github-slugger
13
12
  */
14
13
  declare const remarkMdxTocWithSlugs: Plugin<[RemarkMdxTocWithSlugsOptions?]>;
15
-
16
- export { RemarkMdxTocWithSlugsOptions, TableOfContentsEntry, remarkMdxTocWithSlugs as default };
14
+ export default remarkMdxTocWithSlugs;
15
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,20 +1,11 @@
1
1
  {
2
2
  "name": "@altano/remark-mdx-toc-with-slugs",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "A remark plugin to generate a table of contents (including slugs) and convert it into MDX export",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "exports": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
- "scripts": {
10
- "build": "tsup src/index.ts --format esm --dts",
11
- "dev": "tsup src/index.ts --watch --format esm --dts",
12
- "lint": "TIMING=1 eslint src/**/*.ts* --fix",
13
- "format": "prettier --write src",
14
- "clean": "rm -rf .turbo && rm -rf .tsbuildinfo && rm -rf node_modules && rm -rf dist",
15
- "test": "vitest --run",
16
- "test:watch": "vitest"
17
- },
18
9
  "author": {
19
10
  "name": "Alan Norbauer",
20
11
  "email": "altano@gmail.com",
@@ -28,7 +19,8 @@
28
19
  },
29
20
  "homepage": "https://github.com/altano/npm-packages/tree/main/packages/remark-mdx-toc-with-slugs",
30
21
  "files": [
31
- "dist"
22
+ "dist/**/*.js",
23
+ "dist/**/*.d.ts"
32
24
  ],
33
25
  "keywords": [
34
26
  "remark",
@@ -38,19 +30,38 @@
38
30
  "dependencies": {
39
31
  "astring": "^1.8.6",
40
32
  "estree-util-value-to-estree": "^3.0.1",
41
- "estree-util-visit": "^1.2.1",
33
+ "estree-util-visit": "^2.0.0",
42
34
  "github-slugger": "^2.0.0",
43
- "mdast-util-mdxjs-esm": "^1.3.1",
35
+ "mdast-util-mdxjs-esm": "^2.0.1",
44
36
  "remark-mdx-toc": "^0.3.1",
45
- "unist-util-visit": "^4.1.2"
37
+ "unist-util-visit": "^5.0.0"
46
38
  },
47
39
  "devDependencies": {
48
- "@altano/remark-plugin-test-util": "*",
49
- "@altano/tsconfig": "*",
50
- "@types/node": "^18.15.13",
51
- "vitest": "^0.30.1"
40
+ "@types/node": "^20.11.25",
41
+ "@types/unist": "^3.0.2",
42
+ "prettier": "^3.2.5",
43
+ "tsup": "^8.0.2",
44
+ "typescript": "^5.4.2",
45
+ "unified": "^10.1.2",
46
+ "vite": "^5.1.5",
47
+ "vitest": "^1.3.1",
48
+ "@altano/remark-plugin-test-util": "0.0.2",
49
+ "@altano/tsconfig": "0.0.0"
52
50
  },
53
51
  "publishConfig": {
54
52
  "access": "public"
53
+ },
54
+ "scripts": {
55
+ "build": "tsup src/index.ts --format esm --onSuccess \"pnpm build:types\"",
56
+ "build:types": "tsc --emitDeclarationOnly --declaration",
57
+ "dev": "tsup src/index.ts --watch --format esm --dts",
58
+ "lint": "eslint src/**/*.ts*",
59
+ "lint:timing": "TIMING=1 eslint src/**/*.ts*",
60
+ "lint:fix": "TIMING=1 eslint src/**/*.ts* --fix",
61
+ "format": "prettier --check src",
62
+ "format:fix": "prettier --write src",
63
+ "clean": "rm -rf .turbo && rm -rf .tsbuildinfo && rm -rf node_modules && rm -rf dist",
64
+ "test": "vitest --run",
65
+ "test:watch": "vitest"
55
66
  }
56
- }
67
+ }