Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(*): typo #4573

Merged
merged 2 commits into from Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/audit/CHANGELOG.md
Expand Up @@ -220,7 +220,7 @@

### Patch Changes

- 40b75fbb9: Escape the dependency names to avoud 502 errors from the registry.
- 40b75fbb9: Escape the dependency names to avoid 502 errors from the registry.

## 2.1.0

Expand Down
2 changes: 1 addition & 1 deletion packages/cafs/src/checkFilesIntegrity.ts
Expand Up @@ -12,7 +12,7 @@ const MAX_BULK_SIZE = 1 * 1024 * 1024 // 1MB

export interface PackageFilesIndex {
// name and version are nullable for backward compatibility
// the intitial specs of pnpm store v3 did not require these fields.
// the initial specs of pnpm store v3 did not require these fields.
// However, it might be possible that some types of dependencies don't
// have the name/version fields, like the local tarball dependencies.
name?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/config/README.md
@@ -1,6 +1,6 @@
# @pnpm/config

> Gets configution options for pnpm
> Gets configuration options for pnpm

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/config.svg)](https://www.npmjs.com/package/@pnpm/config)
Expand Down
4 changes: 2 additions & 2 deletions packages/core/CHANGELOG.md
Expand Up @@ -1572,7 +1572,7 @@

### Minor Changes

- 9ad8c27bf: Allow to ignore builds of specified dependencies throught the `pnpm.neverBuiltDependencies` field in `package.json`.
- 9ad8c27bf: Allow to ignore builds of specified dependencies through the `pnpm.neverBuiltDependencies` field in `package.json`.

### Patch Changes

Expand Down Expand Up @@ -2025,7 +2025,7 @@

### Patch Changes

- 95ad9cafa: Install should fail if there are references to a prunned workspace project.
- 95ad9cafa: Install should fail if there are references to a pruned workspace project.

## 0.43.2

Expand Down
2 changes: 1 addition & 1 deletion packages/core/README.md
Expand Up @@ -99,7 +99,7 @@ function readPackage (pkg) {

### `afterAllResolved(lockfile: Lockfile): Lockfile | Promise<Lockfile>`

This hook is called after all dependencies are resolved. It recieves and returns the resolved lockfile object.
This hook is called after all dependencies are resolved. It receives and returns the resolved lockfile object.
An async function is supported.

## License
Expand Down
6 changes: 3 additions & 3 deletions packages/default-reporter/src/mergeOutputs.ts
Expand Up @@ -6,7 +6,7 @@ export default function mergeOutputs (outputs: Array<Rx.Observable<Rx.Observable
let blockNo = 0
let fixedBlockNo = 0
let started = false
let previousOuput: string | null = null
let previousOutput: string | null = null
return Rx.merge(...outputs).pipe(
map((log: Rx.Observable<{msg: string}>) => {
let currentBlockNo = -1
Expand Down Expand Up @@ -66,8 +66,8 @@ export default function mergeOutputs (outputs: Array<Rx.Observable<Rx.Observable
return true
}),
filter((msg) => {
if (msg !== previousOuput) {
previousOuput = msg
if (msg !== previousOutput) {
previousOutput = msg
return true
}
return false
Expand Down
2 changes: 1 addition & 1 deletion packages/default-reporter/src/reportError.ts
Expand Up @@ -172,7 +172,7 @@ Run "pnpm install" to recreate node_modules.`

output += formatRelatedSources(msg)
return {
title: 'The store used for the current node_modules is incomatible with the current version of pnpm',
title: 'The store used for the current node_modules is incompatible with the current version of pnpm',
body: output,
}
}
Expand Down
Expand Up @@ -284,4 +284,4 @@ function aggregateOutput (source: Rx.Observable<LifecycleLog>) {
map(ar => Rx.from(ar)),
mergeAll()
)
};
}
Expand Up @@ -71,7 +71,7 @@ function getModulesInstallProgress$ (
progress$: Rx.Observable<ProgressLog>
): Rx.Observable<ModulesInstallProgress> {
const modulesInstallProgressPushStream = new Rx.Subject<ModulesInstallProgress>()
const progessStatsPushStreamByRequirer = getProgessStatsPushStreamByRequirer(progress$)
const progessStatsPushStreamByRequirer = getProgressStatsPushStreamByRequirer(progress$)

const stagePushStreamByRequirer: {
[requirer: string]: Rx.Subject<StageLog>
Expand Down Expand Up @@ -110,7 +110,7 @@ function stage$ToImportingDone$ (stage$: Rx.Observable<StageLog>) {
)
}

function getProgessStatsPushStreamByRequirer (progress$: Rx.Observable<ProgressLog>) {
function getProgressStatsPushStreamByRequirer (progress$: Rx.Observable<ProgressLog>) {
const progessStatsPushStreamByRequirer: {
[requirer: string]: Rx.Subject<ProgressStats>
} = {}
Expand Down
2 changes: 1 addition & 1 deletion packages/git-resolver/test/index.ts
Expand Up @@ -21,7 +21,7 @@ test('resolveFromGit() with commit', async () => {
test('resolveFromGit() with no commit', async () => {
// This is repeated twice because there was a bug which caused the normalizedPref
// to contain the commit hash on second call.
// The issue occured because .hosted field (which is class from the 'hosted-git-info' package)
// The issue occurred because .hosted field (which is class from the 'hosted-git-info' package)
// was mutated. A 'committish' field was added to it.
for (let i = 0; i < 2; i++) {
const resolveResult = await resolveFromGit({ pref: 'zkochan/is-negative' })
Expand Down
2 changes: 1 addition & 1 deletion packages/list/CHANGELOG.md
Expand Up @@ -305,7 +305,7 @@

### Patch Changes

- f1dc3c872: format package name in ls comand
- f1dc3c872: format package name in ls command

## 5.0.19

Expand Down
2 changes: 1 addition & 1 deletion packages/list/src/createPackagesSearcher.ts
Expand Up @@ -34,7 +34,7 @@ function parseSearchQuery (query: string) {
return { matchName: matcher(parsed.name) }
}
if (parsed.type !== 'version' && parsed.type !== 'range') {
throw new Error(`Invalid queryument - ${query}. List can search only by version or range`)
throw new Error(`Invalid queryment - ${query}. List can search only by version or range`)
}
return {
matchName: matcher(parsed.name),
Expand Down
2 changes: 1 addition & 1 deletion packages/local-resolver/test/index.ts
Expand Up @@ -39,7 +39,7 @@ test('resolve directory specified using the file: protocol', async () => {
expect(resolveResult!.resolution['type']).toEqual('directory')
})

test('resolve directoty specified using the link: protocol', async () => {
test('resolve directory specified using the link: protocol', async () => {
const resolveResult = await resolveFromLocal({ pref: 'link:..' }, { projectDir: __dirname })
expect(resolveResult!.id).toEqual('link:..')
expect(resolveResult!.normalizedPref).toEqual('link:..')
Expand Down
2 changes: 1 addition & 1 deletion packages/lockfile-utils/CHANGELOG.md
Expand Up @@ -76,7 +76,7 @@

### Patch Changes

- 3cf543fc1: Non-standard tarball URL should be correctly calculated when the registry has no traling slash in the configuration file [#4052](https://github.com/pnpm/pnpm/issues/4052). This is a regression caused introduced in v6.23.2 caused by [#4032](https://github.com/pnpm/pnpm/pull/4032).
- 3cf543fc1: Non-standard tarball URL should be correctly calculated when the registry has no trailing slash in the configuration file [#4052](https://github.com/pnpm/pnpm/issues/4052). This is a regression caused introduced in v6.23.2 caused by [#4032](https://github.com/pnpm/pnpm/pull/4032).

## 3.1.1

Expand Down
4 changes: 2 additions & 2 deletions packages/mount-modules/README.md
Expand Up @@ -24,12 +24,12 @@ Once the packages are in the store, run:
mount-modules
```

If something goes wrong and the modules directory will be not accessible, unmout it using:
If something goes wrong and the modules directory will be not accessible, unmount it using:

```
unmount <path to node_modules>
```

## License
## License

MIT
2 changes: 1 addition & 1 deletion packages/npm-resolver/src/pickPackageFromMeta.ts
Expand Up @@ -61,7 +61,7 @@ function pickVersionByVersionRange (
case 'range': {
// This might be slow if there are many versions
// and the package is an indirect dependency many times in the project.
// If it will create noticable slowdown, then might be a good idea to add some caching
// If it will create noticeable slowdown, then might be a good idea to add some caching
versions = Object.keys(meta.versions)
for (const version of versions) {
if (semver.satisfies(version, preferredSelector, true)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/package-requester/src/packageRequester.ts
Expand Up @@ -343,7 +343,7 @@ function fetchToStore (
// affecting previous invocations: so we need to replace the cache.
//
// Changing the value of fromStore is needed for correct reporting of `pnpm server`.
// Otherwise, if a package was not in store when the server started, it will be always
// Otherwise, if a package was not in store when the server started, it will always be
// reported as "downloaded" instead of "reused".
files.promise.then((cache) => { // eslint-disable-line
progressLogger.debug({
Expand Down Expand Up @@ -490,7 +490,7 @@ Actual package in the store by the given integrity: ${pkgFilesIndex.name}@${pkgF
// Tarballs are requested first because they are bigger than metadata files.
// However, when one line is left available, allow it to be picked up by a metadata request.
// This is done in order to avoid situations when tarballs are downloaded in chunks
// As much tarballs should be downloaded simultaneously as possible.
// As many tarballs should be downloaded simultaneously as possible.
const priority = (++ctx.requestsQueue['counter'] % ctx.requestsQueue['concurrency'] === 0 ? -1 : 1) * 1000 // eslint-disable-line

const fetchManifest = opts.fetchRawManifest
Expand Down
2 changes: 1 addition & 1 deletion packages/package-store/CHANGELOG.md
Expand Up @@ -649,7 +649,7 @@

### Patch Changes

- 1adacd41e: only scan diretories when doing store prune
- 1adacd41e: only scan directories when doing store prune

## 9.0.8

Expand Down
4 changes: 2 additions & 2 deletions packages/package-store/test/importingPkgWithInvalidFiles.ts
Expand Up @@ -15,5 +15,5 @@ test('importing a package with invalid files', async () => {
force: false,
fromStore: false,
})
expect(await (await fs.readdir(target)).length).toBe(2)
})
expect((await fs.readdir(target)).length).toBe(2)
})
2 changes: 1 addition & 1 deletion packages/parse-cli-args/CHANGELOG.md
Expand Up @@ -4,7 +4,7 @@

### Major Changes

- c35ac786b: When using `pnpm run <script>`, all command line arguments after the script name are now passed to the script's argv, even `--`. For example, `pnpm run echo --hello -- world` will now pass `--hello -- world` to the `echo` script's argv. Previously flagged arguments (e.g. `--silent`) were intepreted as pnpm arguments unless `--` came before it.
- c35ac786b: When using `pnpm run <script>`, all command line arguments after the script name are now passed to the script's argv, even `--`. For example, `pnpm run echo --hello -- world` will now pass `--hello -- world` to the `echo` script's argv. Previously flagged arguments (e.g. `--silent`) were interpreted as pnpm arguments unless `--` came before it.
- 542014839: Node.js 12 is not supported.

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/parse-cli-args/test/index.ts
Expand Up @@ -58,15 +58,15 @@ test('recursive is returned as the command name if no subcommand passed', async
expect(options).toHaveProperty(['recursive'])
})

test('when runnning a global command inside a workspace, the workspace should be ignored', async () => {
test('when running a global command inside a workspace, the workspace should be ignored', async () => {
const { workspaceDir } = await parseCliArgs({
...DEFAULT_OPTS,
universalOptionsTypes: { global: Boolean },
}, ['--global', 'add', 'foo'])
expect(workspaceDir).toBeFalsy()
})

test('when runnning with --ignore-workspace option inside a workspace, the workspace should be ignored', async () => {
test('when running with --ignore-workspace option inside a workspace, the workspace should be ignored', async () => {
const { workspaceDir } = await parseCliArgs({
...DEFAULT_OPTS,
universalOptionsTypes: { global: Boolean },
Expand Down
2 changes: 1 addition & 1 deletion packages/pkgs-graph/src/index.ts
Expand Up @@ -63,7 +63,7 @@ export default function <T> (pkgs: Array<Package & T>, opts?: {
rawSpec = rawSpec.slice(10)
if (rawSpec === '^' || rawSpec === '~') {
rawSpec = '*'
};
}
}
spec = npa.resolve(depName, rawSpec, pkg.dir)
} catch (err: any) { // eslint-disable-line
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-audit/test/index.ts
Expand Up @@ -99,7 +99,7 @@ test.skip('audit does not exit with code 1 if the found vulnerabilities are havi
Severity: 1 moderate`)
})

test('audit does not exit with code 1 if the registry responds with a non-200 reponse and ignoreRegistryErrors is used', async () => {
test('audit does not exit with code 1 if the registry responds with a non-200 response and ignoreRegistryErrors is used', async () => {
nock(registries.default)
.post('/-/npm/v1/security/audits')
.reply(500, { message: 'Something bad happened' })
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-env/CHANGELOG.md
Expand Up @@ -149,7 +149,7 @@

### Minor Changes

- d16620cf9: If pnpm previously failed to install node when the `use-node-version` option is set, that download and install will now be re-attempted when pnpm is ran again.
- d16620cf9: If pnpm previously failed to install node when the `use-node-version` option is set, that download and install will now be re-attempted when pnpm is run again.

### Patch Changes

Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-commands-env/test/env.test.ts
Expand Up @@ -73,7 +73,7 @@ test('resolveNodeVersion uses node-mirror:release option', async () => {
expect(nockScope.isDone()).toBeTruthy()
})

test('fail if a non-existend Node.js version is tried to be installed', async () => {
test('fail if a non-existed Node.js version is tried to be installed', async () => {
tempDir()

await expect(
Expand All @@ -86,7 +86,7 @@ test('fail if a non-existend Node.js version is tried to be installed', async ()
).rejects.toEqual(new PnpmError('COULD_NOT_RESOLVE_NODEJS', 'Couldn\'t find Node.js version matching 6.999'))
})

test('fail if a non-existend Node.js LTS is tried to be installed', async () => {
test('fail if a non-existed Node.js LTS is tried to be installed', async () => {
tempDir()

await expect(
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-commands-installation/CHANGELOG.md
Expand Up @@ -963,7 +963,7 @@

### Patch Changes

- c3d2746ac: Peer depednencies are resolved from the root of the workspace when a new dependency is added to the root of the workspace.
- c3d2746ac: Peer dependencies are resolved from the root of the workspace when a new dependency is added to the root of the workspace.
- supi@0.47.12
- @pnpm/outdated@9.0.2
- @pnpm/package-store@12.0.12
Expand Down Expand Up @@ -2233,7 +2233,7 @@

- 6cc36c85c: `pnpm install -r` should recreate the modules directory
if the hoisting patterns were updated in a local config file.
The hoisting patterns are configure via the `hoist-pattern`
The hoisting patterns are configured via the `hoist-pattern`
and `public-hoist-pattern` settings.
- 3feae5342: The same code should run when running some command inside a project directory, or when using `--filter` to select a specific workspace project.
- Updated dependencies [ac0d3e122]
Expand Down
10 changes: 5 additions & 5 deletions packages/plugin-commands-installation/src/import/index.ts
Expand Up @@ -49,7 +49,7 @@ interface YarnLockPackage {
[depName: string]: string
}
}
interface YarnPackgeLock {
interface YarnPackageLock {
[name: string]: YarnLockPackage
}

Expand All @@ -61,7 +61,7 @@ enum YarnLockType {
// copy from yarn v1
interface YarnLock2Struct {
type: YarnLockType.yarn2
object: YarnPackgeLock
object: YarnPackageLock
}

export const rcOptionsTypes = cliOptionsTypes
Expand Down Expand Up @@ -162,7 +162,7 @@ async function readYarnLockFile (dir: string) {
let lockJsonFile
const yarnLockFileType = getYarnLockfileType(yarnLockFile)
if (yarnLockFileType === YarnLockType.yarn) {
lockJsonFile = await parseYarnLock(yarnLockFile)
lockJsonFile = parseYarnLock(yarnLockFile)
if (lockJsonFile.type === 'success') {
return lockJsonFile.object
} else {
Expand All @@ -185,7 +185,7 @@ function parseYarn2Lock (lockFileContents: string): YarnLock2Struct {
const parseYarnLock: any = parseSyml(lockFileContents)

delete parseYarnLock.__metadata
const dependencies: YarnPackgeLock = {}
const dependencies: YarnPackageLock = {}

const { structUtils } = yarnCore
const { parseDescriptor, parseRange } = structUtils
Expand Down Expand Up @@ -256,7 +256,7 @@ function getAllVersionsByPackageNames (
}

function getAllVersionsFromYarnLockFile (
yarnPackageLock: YarnPackgeLock,
yarnPackageLock: YarnPackageLock,
versionsByPackageNames: {
[packageName: string]: Set<string>
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-installation/src/installDeps.ts
Expand Up @@ -280,7 +280,7 @@ when running add/update with the --workspace option')
...opts,
...OVERWRITE_UPDATE_OPTIONS,
selectedProjectsGraph,
workspaceDir: opts.workspaceDir, // Otherwise TypeScript doesn't understant that is is not undefined
workspaceDir: opts.workspaceDir, // Otherwise TypeScript doesn't understand that is not undefined
}, 'install')

if (opts.ignoreScripts) return
Expand Down
Expand Up @@ -3,7 +3,7 @@ import which from '@zkochan/which'

export default async function () {
try {
// The system default Node.js executable is prefered
// The system default Node.js executable is preferred
// not the one used to run the pnpm CLI.
const nodeExecPath = await which('node')
return fs.realpath(nodeExecPath)
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-installation/test/add.ts
Expand Up @@ -152,7 +152,7 @@ test('add: fail when "workspace" option is true but linkWorkspacePackages is fal
expect(err.message.startsWith('This workspace has link-workspace-packages turned off')).toBeTruthy()
})

test('installing with "workspace=true" with linkWorkpacePackages on and saveWorkspaceProtocol off', async () => {
test('installing with "workspace=true" with linkWorkspacePackages on and saveWorkspaceProtocol off', async () => {
const projects = preparePackages([
{
name: 'project-1',
Expand Down