@sapphire/docusaurus-plugin-ts2esm2cjs 1.0.2-next.dfbe36e.0 → 1.0.2

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/README.md CHANGED
@@ -167,7 +167,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
167
167
  <!-- markdownlint-disable -->
168
168
  <table>
169
169
  <tr>
170
- <td align="center"><a href="https://favware.tech/"><img src="https://avatars3.githubusercontent.com/u/4019718?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Claassens</b></sub></a><br /><a href="https://github.com/sapphiredev/documentation-plugins/commits?author=Favna" title="Code">💻</a> <a href="#infra-Favna" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#projectManagement-Favna" title="Project Management">📆</a></td>
170
+ <td align="center"><a href="https://favware.tech/"><img src="https://avatars3.githubusercontent.com/u/4019718?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Claassens</b></sub></a><br /><a href="https://github.com/sapphiredev/documentation-plugins/commits?author=favna" title="Code">💻</a> <a href="#infra-favna" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#projectManagement-favna" title="Project Management">📆</a></td>
171
+ <td align="center"><a href="https://github.com/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?v=4?s=100" width="100px;" alt=""/><br /><sub><b>renovate[bot]</b></sub></a><br /><a href="#maintenance-renovate[bot]" title="Maintenance">🚧</a></td>
172
+ <td align="center"><a href="https://renovate.whitesourcesoftware.com/"><img src="https://avatars.githubusercontent.com/u/25180681?v=4?s=100" width="100px;" alt=""/><br /><sub><b>WhiteSource Renovate</b></sub></a><br /><a href="#maintenance-renovate-bot" title="Maintenance">🚧</a></td>
171
173
  </tr>
172
174
  </table>
173
175
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,38 @@
1
- import { Options } from 'prettier';
2
- import { CompilerOptions } from 'typescript';
1
+ import prettier, { Options } from 'prettier';
2
+ import ts, { CompilerOptions } from 'typescript';
3
+ export declare const documentationPrettierConfig: Options;
4
+ export declare const makeTsCompilerOptions: (overrideOptions?: ts.CompilerOptions | undefined) => CompilerOptions;
5
+ /**
6
+ * Transpiles input TypeScript code to ESM code.
7
+ * @param code The code to transpile
8
+ * @returns Input code transpiled to ESM
9
+ */
10
+ export declare const tsToEsm: (code: string, options: Pick<PluginOptions, 'typescriptCompilerOptions'>) => ts.TranspileOutput;
11
+ /**
12
+ * Transforms input ESM code to CJS code.
13
+ * @param code The code to transform
14
+ * @returns Input code transformed to CommonJS
15
+ */
16
+ export declare const esmToCjs: (code: string) => string;
17
+ /**
18
+ * Escaped new lines in code with block comments so they can be restored by {@link restoreNewLines}
19
+ * @param code The code to escape new lines in
20
+ * @returns The same code but with new lines escaped using block comments
21
+ */
22
+ export declare const escapeNewLines: (code: string) => string;
23
+ /**
24
+ * Reverses {@link escapeNewLines} and restores new lines
25
+ * @param code The code with escaped new lines
26
+ * @returns The same code with new lines restored
27
+ */
28
+ export declare const restoreNewLines: (code: string) => string;
29
+ /**
30
+ * Formats the code using Prettier
31
+ * @param code The code to prettier format
32
+ * @param prettierConfig Additional prettier options to use for formatting
33
+ * @returns Prettier formatted code
34
+ */
35
+ export declare const prettierFormatCode: (code: string, prettierConfig?: prettier.Options | undefined) => string;
3
36
  export interface PluginOptions {
4
37
  sync?: boolean;
5
38
  prettierOptions?: Options;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA8HjD,MAAM,WAAW,aAAa;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB,CAAC,EAAE,eAAe,CAAC;CAC5C;AAED,wBAAgB,UAAU,CACzB,EAAE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