Skip to content

Commit

Permalink
docs(*): fix problems with sample code in documentation (#4572)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-itsheng committed Apr 14, 2022
1 parent d50240f commit afacf01
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/fetcher-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ pnpm add @pnpm/fetcher-base
Here's a template for a fetcher using types from `@pnpm/fetcher-base`:

```ts
import {Resolution} from '@pnpm/resolver-base'
import { Resolution } from '@pnpm/resolver-base'
import {
FetchOptions,
FetchResult,
} from '@pnpm/fetcher-base'

export async function (
export async function demoFetcher (
resolution: Resolution,
targetFolder: string,
opts: FetchOptions,
): Promise<FetchResult>
): Promise<FetchResult> {
// ...
return {
filesIndex,
Expand Down
2 changes: 1 addition & 1 deletion packages/modules-yaml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pnpm add @pnpm/modules-yaml
import {write, read} from '@pnpm/modules-yaml'

await write('node_modules', {
hoistedAliases: {}
hoistedAliases: {},
layoutVersion: 1,
packageManager: 'pnpm@1.0.0',
pendingBuilds: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/resolver-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
WantedDependency,
} from '@pnpm/resolver-base'

export async function (
export async function testResolver (
wantedDependency: WantedDependency,
opts: ResolveOptions,
): Promise<ResolveResult> {
Expand Down
1 change: 0 additions & 1 deletion packages/symlink-dependency/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import symlinkDependency from '@pnpm/symlink-dependency'

await symlinkDependency('/home/src/foo', '/home/src/my-project/node_modules', 'foo')
//> { reused: false }
}
```

## License
Expand Down
2 changes: 1 addition & 1 deletion privatePackages/assert-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pnpm install -D @pnpm/assert-project
import test = require('tape')
import assertProject from '@pnpm/assert-project'

test('...', t => {
test('...', async t => {
// ...
const project = assertProject(t, pathToProject)

Expand Down
2 changes: 1 addition & 1 deletion privatePackages/assert-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pnpm install -D @pnpm/assert-store
import test = require('tape')
import assertStore from '@pnpm/assert-store'

test('...', t => {
test('...', async t => {
// ...
const store = assertStore(t, pathToStore, encodedRegistryName)

Expand Down

0 comments on commit afacf01

Please sign in to comment.