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

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.js +1 -2
  2. package/package.json +20 -17
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- // src/index.ts
2
1
  import { generate } from "astring";
3
2
  import { valueToEstree } from "estree-util-value-to-estree";
4
3
  import { EXIT, visit as estreeVisit } from "estree-util-visit";
@@ -20,7 +19,7 @@ function assertMdxjsEsmNode(node) {
20
19
  throw new Error(`Node was unexpected type: ${node.type}`);
21
20
  }
22
21
  }
23
- var remarkMdxTocWithSlugs = function(options = {}) {
22
+ const remarkMdxTocWithSlugs = function(options = {}) {
24
23
  const mdxTocTransformer = remarkMdxToc.call(this, options);
25
24
  if (mdxTocTransformer == null) {
26
25
  throw new Error(`Couldn't create mdxTocTransformer function`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altano/remark-mdx-toc-with-slugs",
3
- "version": "1.0.4",
3
+ "version": "2.0.0",
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,
@@ -11,7 +11,7 @@
11
11
  "email": "altano@gmail.com",
12
12
  "url": "https://alan.norbauer.com"
13
13
  },
14
- "license": "GPL-3.0",
14
+ "license": "ISC",
15
15
  "repository": {
16
16
  "type": "git",
17
17
  "url": "https://github.com/altano/npm-packages",
@@ -34,34 +34,37 @@
34
34
  "github-slugger": "^2.0.0",
35
35
  "mdast-util-mdxjs-esm": "^2.0.1",
36
36
  "remark-mdx-toc": "^0.3.1",
37
+ "unified": "^10.1.2",
37
38
  "unist-util-visit": "^5.0.0"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@types/node": "^20.11.25",
41
42
  "@types/unist": "^3.0.2",
43
+ "@vitest/coverage-v8": "^1.4.0",
42
44
  "prettier": "^3.2.5",
43
- "tsup": "^8.0.2",
44
45
  "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"
46
+ "vite": "^5.2.4",
47
+ "vitest": "^1.4.0",
48
+ "@altano/remark-plugin-test-util": "0.0.0",
49
+ "@altano/tsconfig": "0.0.0",
50
+ "@altano/vitest-plugins": "0.0.2"
50
51
  },
51
52
  "publishConfig": {
52
53
  "access": "public"
53
54
  },
54
55
  "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",
56
+ "build": "tsup --config build-config/tsup.config.node.ts",
57
+ "build:types": "tsc --project tsconfig.declarations.json",
58
+ "clean": "rm -rf .turbo && rm -rf .tsbuildinfo && rm -rf node_modules && rm -rf dist",
59
+ "dev": "pnpm run build --watch",
61
60
  "format": "prettier --check src",
62
61
  "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"
62
+ "lint": "eslint package.json src/**/*.ts*",
63
+ "lint:fix": "TIMING=1 pnpm lint --fix",
64
+ "lint:timing": "TIMING=1 pnpm lint",
65
+ "test:unit": "vitest --run",
66
+ "test:unit:watch": "vitest",
67
+ "typecheck:src": "tsc --noEmit",
68
+ "typecheck:test": "tsc --noEmit --project ./tests/tsconfig.json"
66
69
  }
67
70
  }