@orgajs/reorg-parse 4.1.2 → 4.3.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.
package/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import type { Document } from 'orga'
2
+ import type { Plugin } from 'unified'
3
+ import type { Options } from './index.js'
4
+
5
+ declare const reorgParse: Plugin<
6
+ [(Readonly<Options> | null | undefined)?],
7
+ string,
8
+ Document
9
+ >
10
+ export default reorgParse
package/index.js ADDED
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @import {Document, ParseOptions} from 'orga'
3
+ * @import {Processor} from 'unified'
4
+ */
5
+
6
+ /**
7
+ * @typedef {ParseOptions} Options
8
+ */
9
+
10
+ import { parse } from 'orga'
11
+
12
+ /**
13
+ * Aadd support for parsing from org-mode.
14
+ *
15
+ * @this {Processor<Document>}
16
+ * Processor instance.
17
+ * @param {Partial<ParseOptions> | undefined} [options]
18
+ * Configuration (optional).
19
+ * @returns {undefined}
20
+ * Nothing.
21
+ */
22
+ export default function reorgParse(options) {
23
+ this.parser = function (document) {
24
+ return parse(document, options)
25
+ }
26
+ }
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@orgajs/reorg-parse",
3
- "version": "4.1.2",
3
+ "version": "4.3.0",
4
4
  "description": "orga parser for unifiedjs",
5
+ "type": "module",
5
6
  "files": [
6
- "dist"
7
+ "lib/",
8
+ "index.js",
9
+ "index.d.ts",
10
+ "index.d.ts.map"
7
11
  ],
8
- "main": "dist/index.js",
9
- "type": "module",
12
+ "exports": "./index.js",
10
13
  "author": "Xiaoxing Hu <hi@xiaoxing.dev>",
11
14
  "license": "MIT",
12
15
  "homepage": "https://github.com/orgapp/orgajs/tree/main/packages/reorg-parse#readme",
@@ -16,14 +19,11 @@
16
19
  "directory": "packages/reorg-parse"
17
20
  },
18
21
  "dependencies": {
19
- "orga": "^4.3.0"
22
+ "orga": "^4.5.0"
20
23
  },
21
24
  "devDependencies": {
22
- "typescript": "^5.2.2",
23
- "unified": "^10.1.2"
25
+ "typescript": "^5.7.3",
26
+ "unified": "^11.0.5"
24
27
  },
25
- "scripts": {
26
- "clean": "tsc --build --clean",
27
- "build": "tsc --build"
28
- }
28
+ "scripts": {}
29
29
  }
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { Plugin } from 'unified';
2
- declare const _parse: Plugin;
3
- export default _parse;
package/dist/index.js DELETED
@@ -1,7 +0,0 @@
1
- import { parse } from 'orga';
2
- const _parse = function (options) {
3
- this.Parser = (doc) => {
4
- return parse(doc, options);
5
- };
6
- };
7
- export default _parse;