Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/autoreadmerc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../node_modules/@stephansama/auto-readme/dist/schema.json",
"usageFile": "./example/index.js",
"usageFile": "./example/index.ts",
"collapseHeadings": ["Configuration File", "Schema"],
"badgeOptions": {
"templates": [
Expand Down
4 changes: 2 additions & 2 deletions core/auto-readme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"dependencies": {
"@manypkg/find-root": "catalog:manypkg",
"@manypkg/get-packages": "catalog:manypkg",
"@stephansama/mdast-zone": "catalog:",
"@stephansama/remark-usage": "catalog:remark",
"colord": "catalog:",
"cosmiconfig": "catalog:cli",
"deepmerge": "catalog:",
Expand All @@ -64,15 +66,13 @@
"mdast": "catalog:",
"mdast-comment-marker": "catalog:",
"mdast-util-from-markdown": "catalog:",
"mdast-zone": "catalog:",
"obug": "catalog:cli",
"picospinner": "catalog:cli",
"pkg-types": "catalog:",
"remark": "catalog:remark",
"remark-code-import": "catalog:remark",
"remark-collapse": "catalog:remark",
"remark-toc": "catalog:remark",
"remark-usage": "catalog:remark",
"simple-icons": "catalog:",
"smol-toml": "catalog:",
"tinyglobby": "catalog:",
Expand Down
12 changes: 6 additions & 6 deletions core/auto-readme/src/pipeline.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import remarkUsage from "@stephansama/remark-usage";
import remarkCodeImport from "remark-code-import";
import remarkCollapse from "remark-collapse";
import remarkToc from "remark-toc";
import remarkUsage from "remark-usage";
import { afterEach, beforeEach, expect, it, vi } from "vitest";

import type { ActionData } from "./data";
Expand All @@ -27,16 +27,16 @@ const mocks = vi.hoisted(() => {
};
});

vi.mock("./data", () => ({ createFindParameter: mocks.createFindParameter }));
vi.mock("./log", () => ({ INFO: vi.fn(), WARN: mocks.warn }));
vi.mock("./plugin", () => ({ autoReadmeRemarkPlugin: vi.fn() }));
vi.mock("./utilities", () => ({ fileExists: mocks.fileExists }));
vi.mock("@stephansama/remark-usage", () => ({ default: vi.fn() }));
vi.mock("remark", () => ({ remark: mocks.remark }));
vi.mock("remark-code-import", () => ({ default: vi.fn() }));
vi.mock("remark-collapse", () => ({ default: vi.fn() }));
vi.mock("remark-toc", () => ({ default: vi.fn() }));
vi.mock("remark-usage", () => ({ default: vi.fn() }));
vi.mock("vfile", () => ({ VFile: vi.fn() }));
vi.mock("./plugin", () => ({ autoReadmeRemarkPlugin: vi.fn() }));
vi.mock("./data", () => ({ createFindParameter: mocks.createFindParameter }));
vi.mock("./utilities", () => ({ fileExists: mocks.fileExists }));
vi.mock("./log", () => ({ INFO: vi.fn(), WARN: mocks.warn }));

afterEach(vi.clearAllMocks);

Expand Down
2 changes: 1 addition & 1 deletion core/auto-readme/src/pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import remarkUsage from "@stephansama/remark-usage";
import path from "node:path";
import { remark } from "remark";
import remarkCodeImport from "remark-code-import";
import remarkCollapse from "remark-collapse";
import remarkToc from "remark-toc";
import remarkUsage from "remark-usage";
import { VFile } from "vfile";

import type { ActionData } from "./data";
Expand Down
2 changes: 1 addition & 1 deletion core/auto-readme/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Root } from "mdast";
import type { Plugin } from "unified";

import { zone } from "@stephansama/mdast-zone";
import Handlebars from "handlebars";
import { markdownTable } from "markdown-table";
import { fromMarkdown } from "mdast-util-from-markdown";
import { zone } from "mdast-zone";
import path from "node:path";

import type { ActionData } from "./data";
Expand Down
2 changes: 1 addition & 1 deletion core/eslint-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default config({

## Usage

```javascript
```typescript
import { config, presets } from "@stephansama/eslint-config";

const loadConfig = async () =>
Expand Down
2 changes: 1 addition & 1 deletion core/eslint-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../tsconfig.base.json"],
"include": ["src", "types", "tsdown.config.ts"],
"include": ["src", "types", "tsdown.config.ts", "example"],
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
Expand Down
7 changes: 3 additions & 4 deletions core/pnpm-hooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,10 @@ Given a dependency manifest like this:

## Usage

```javascript
import { readPackageHooks } from "@stephansama/pnpm-hooks";
```typescript
import { readPackageHooks, type types } from "@stephansama/pnpm-hooks";

/** @type {import("../dist/index.mjs").types.PnpmFileHooks} */
export const hooks = {
readPackage: readPackageHooks.pinAllDependencies,
};
} satisfies types.PnpmFileHooks;
```
6 changes: 0 additions & 6 deletions core/pnpm-hooks/example/index.js

This file was deleted.

5 changes: 5 additions & 0 deletions core/pnpm-hooks/example/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { readPackageHooks, type types } from "../dist/index.mjs";

export const hooks = {
readPackage: readPackageHooks.pinAllDependencies,
} satisfies types.PnpmFileHooks;
2 changes: 1 addition & 1 deletion core/pnpm-hooks/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": ["../../tsconfig.base.json"],
"include": ["./src/**/*", "tsdown.config.ts"]
"include": ["./src/**/*", "tsdown.config.ts", "example"]
}
7 changes: 4 additions & 3 deletions core/prettier-plugin-handlebars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ pnpm install @stephansama/prettier-plugin-handlebars

## Usage

```javascript
```typescript
import type { Config } from "prettier";

import prettierPluginHandlebars from "@stephansama/prettier-plugin-handlebars";

/** @type {import("prettier").Config} */
export default {
plugins: [prettierPluginHandlebars],
};
} satisfies Config;
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Config } from "prettier";

import prettierPluginHandlebars from "../dist/index.cjs";

/** @type {import("prettier").Config} */
export default {
plugins: [prettierPluginHandlebars],
};
} satisfies Config;
2 changes: 1 addition & 1 deletion core/prettier-plugin-handlebars/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../tsconfig.base.json"],
"include": ["./src/**/*", "./tests/**/*", "tsdown.config.ts"],
"include": ["./src/**/*", "./tests/**/*", "tsdown.config.ts", "example"],
"compilerOptions": {
"composite": true,
"types": ["node"]
Expand Down
4 changes: 2 additions & 2 deletions core/remark-asciinema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ pnpm install @stephansama/remark-asciinema

## Usage

```javascript
```typescript
import { remark } from "remark";

import asciinema from "@stephansama/remark-asciinema";
import asciinema from "../dist/index.mjs";
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

export async function pipeline() {
const file = await remark()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { remark } from "remark";

import asciinema from "../dist/index.cjs";
import asciinema from "../dist/index.mjs";

export async function pipeline() {
const file = await remark()
Expand Down
2 changes: 1 addition & 1 deletion core/remark-asciinema/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../tsconfig.base.json"],
"include": ["./src/**/*", "tsdown.config.ts"],
"include": ["./src/**/*", "tsdown.config.ts", "example"],
"compilerOptions": {
"types": ["node"],
"composite": true
Expand Down
2 changes: 1 addition & 1 deletion core/single-file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ npx @stephansama/single-file <url> -v

## Usage

```javascript
```typescript
import * as singleFile from "@stephansama/single-file";

export async function useAPI() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion core/single-file/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../tsconfig.base.json"],
"include": ["src", "tsdown.config.ts", "cli.mjs"],
"include": ["src", "tsdown.config.ts", "cli.mjs", "example"],
"compilerOptions": {
"composite": true
}
Expand Down
4 changes: 1 addition & 3 deletions core/typed-env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ pnpm install @stephansama/typed-env

## Usage

is already a namespace import

```javascript
```typescript
import * as z from "zod";

import { createEnvironment } from "@stephansama/typed-env";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// is already a namespace import
// remark-usage-ignore-next
// eslint-disable-next-line zod/consistent-import
import * as z from "zod";

import { createEnvironment } from "../dist/index.mjs";
Expand Down
2 changes: 1 addition & 1 deletion core/typed-env/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../tsconfig.base.json"],
"include": ["./src/**/*", "tsdown.config.ts"],
"include": ["./src/**/*", "tsdown.config.ts", "example"],
"compilerOptions": {
"types": ["node"],
"composite": true
Expand Down
Loading
Loading