@koine/node 2.0.0-beta.132 → 2.0.0-beta.133

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/fsWrite.d.ts CHANGED
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Write file
3
+ *
4
+ * @param filepath The absolute file path
5
+ * @param content The file content string
6
+ * @param eol By default we apend a `node:os.EOL` end of line a the end of the file
7
+ */
1
8
  export declare function fsWrite(filepath: string, content: string, eol?: boolean): Promise<void>;
2
9
  export default fsWrite;
package/fsWriteSync.d.ts CHANGED
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Write file
3
+ *
4
+ * @param filepath The absolute file path
5
+ * @param content The file content string
6
+ * @param eol By default we apend a `node:os.EOL` end of line a the end of the file
7
+ */
1
8
  export declare function fsWriteSync(filepath: string, content: string, eol?: boolean): void;
2
9
  export default fsWriteSync;
@@ -1,2 +1,14 @@
1
+ /**
2
+ *
3
+ * @see https://stackoverflow.com/a/41407246/1938970
4
+ *
5
+ * @usage
6
+ * ```ts
7
+ * const err = jestCreateExpectedThrownError("@org/pkg", "fnName");
8
+ *
9
+ * // @ts-expect-error test wrong implementation
10
+ * err(() => fnName("wrong arguments implementation"));
11
+ * ```
12
+ */
1
13
  export declare const jestCreateExpectedThrownError: (pkgName: string, fnName: string) => (expectFn: () => ReturnType<jest.Expect>) => void;
2
14
  export default jestCreateExpectedThrownError;
package/package.json CHANGED
@@ -37,6 +37,6 @@
37
37
  "module": "./index.esm.js",
38
38
  "main": "./index.cjs.js",
39
39
  "types": "./index.esm.d.ts",
40
- "version": "2.0.0-beta.132",
40
+ "version": "2.0.0-beta.133",
41
41
  "dependencies": {}
42
42
  }
@@ -1,5 +1,11 @@
1
1
  export type SwcTransform<LibName extends string> = Record<`${LibName}/?(((\\w*)?/?)*)`, {
2
2
  transform: `${LibName}/{{ matches.[1] }}/{{member}}`;
3
3
  }>;
4
+ /**
5
+ * @category swc
6
+ * @param name e.g. `@myorg/mylib` or `@/myprojectlib`
7
+ * @param flat Pass `true` for packages where all consumable exports are at the
8
+ * root level (no exports from nested folders)
9
+ */
4
10
  export declare function swcCreateTransform<T extends string>(name: T, _flat?: boolean): SwcTransform<T>;
5
11
  export default swcCreateTransform;
@@ -3,5 +3,11 @@ import { type SwcTransform } from "./swcCreateTransform";
3
3
  export type SwcTransforms<Names extends string, Prefix extends string> = FlatObjectFirstLevel<{
4
4
  [N in Names]: SwcTransform<`${Prefix}${N}`>;
5
5
  }>;
6
+ /**
7
+ * @see https://www.zhoulujun.net/nextjs/advanced-features/compiler.html#modularize-imports
8
+ *
9
+ * @category tooling
10
+ * @category swc
11
+ */
6
12
  export declare const swcCreateTransforms: <TLibs extends readonly string[], TScope extends string>(libs: TLibs, scope?: TScope) => FlatObjectFirstLevel<{ [N in TLibs[number]]: SwcTransform<`${TScope extends string ? `${TScope}/` : ""}${N}`>; }>;
7
13
  export default swcCreateTransforms;
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @see https://www.zhoulujun.net/nextjs/advanced-features/compiler.html#modularize-imports
3
+ *
4
+ * @category tooling
5
+ * @category swc
6
+ */
1
7
  export declare const swcTransformsKoine: {
2
8
  "@koine/api/?(((\\w*)?/?)*)": {
3
9
  transform: "@koine/api/{{ matches.[1] }}/{{member}}";