@sapphire/docusaurus-plugin-ts2esm2cjs 1.1.4-next.9e4fba3.0 → 1.1.4-next.a8c0232.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.d.mts +22 -0
  2. package/package.json +6 -6
@@ -0,0 +1,22 @@
1
+ import { Plugin } from 'unified';
2
+ import { Options } from 'prettier';
3
+ import { CompilerOptions } from 'typescript';
4
+
5
+ interface PluginOptions {
6
+ sync?: boolean;
7
+ prettierOptions?: Options;
8
+ typescriptCompilerOptions?: CompilerOptions;
9
+ }
10
+
11
+ /**
12
+ * Transforms input TypeScript code to ESM code.
13
+ * @param input The TypeScript code to transform
14
+ * @param options The plugin options
15
+ * @returns The transformed code (ESM)
16
+ */
17
+ declare function ts2esm(input: string, options: PluginOptions): string;
18
+ declare function esm2cjs(input: string, options: PluginOptions): string;
19
+
20
+ declare const ts2esm2cjs: Plugin<[PluginOptions?]>;
21
+
22
+ export { PluginOptions, esm2cjs, ts2esm, ts2esm2cjs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/docusaurus-plugin-ts2esm2cjs",
3
- "version": "1.1.4-next.9e4fba3.0",
3
+ "version": "1.1.4-next.a8c0232.0",
4
4
  "description": "Docusaurus Remark plugin for converting TypeScript code to ESM and CJS code",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "@sapphire/prettier-config": "^1.4.5",
27
27
  "esm-to-cjs": "^1.2.1",
28
28
  "prettier": "^2.8.8",
29
- "typescript": "^5.0.4",
29
+ "typescript": "^5.1.6",
30
30
  "unist-util-visit": "^2.0.3"
31
31
  },
32
32
  "repository": {
@@ -63,9 +63,9 @@
63
63
  "access": "public"
64
64
  },
65
65
  "devDependencies": {
66
- "@favware/cliff-jumper": "^2.0.0",
67
- "@sapphire/framework": "^4.4.1",
68
- "tsup": "^6.7.0",
69
- "vitest": "^0.30.1"
66
+ "@favware/cliff-jumper": "^2.1.1",
67
+ "@sapphire/framework": "^4.5.0",
68
+ "tsup": "^7.1.0",
69
+ "vitest": "^0.32.2"
70
70
  }
71
71
  }