Files
pnpm/reviewing/plugin-commands-outdated/test/utils/index.ts
btea f6e9677e04 feat: outdated command add sort-by option (#8523)
* feat: `outdated` command add `sortField` option
Currently, the default sorting result is a combination of multiple
rules, including sorting by `packageName`, sorting by `SemverChange`,
and sorting by the `current` field.
I wanted to set `sortField` to support configuration of
`name`/`semver`/`current`, but considering that the other two values
do not seem to make much sense except `name`, I
will keep the current situation for the time being.

* feat: add changeset

* fix: format

* chore: update test

* test: update

* fix: update

* refactor: rename to sort-by

* refactor: outdated

* docs: update changeset

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-09-28 02:56:20 +02:00

61 lines
1.3 KiB
TypeScript

import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock'
const REGISTRY = `http://localhost:${REGISTRY_MOCK_PORT}`
export const DEFAULT_OPTS = {
argv: {
original: [],
},
bail: false,
bin: 'node_modules/.bin',
ca: undefined,
cacheDir: '../cache',
cert: undefined,
extraEnv: {},
cliOptions: {},
deployAllFiles: false,
fetchRetries: 2,
fetchRetryFactor: 90,
fetchRetryMaxtimeout: 90,
fetchRetryMintimeout: 10,
filter: [] as string[],
global: false,
httpsProxy: undefined,
include: {
dependencies: true,
devDependencies: true,
optionalDependencies: true,
},
key: undefined,
linkWorkspacePackages: true,
localAddress: undefined,
lock: false,
lockStaleDuration: 90,
networkConcurrency: 16,
offline: false,
pending: false,
pnpmfile: './.pnpmfile.cjs',
pnpmHomeDir: '',
proxy: undefined,
rawConfig: { registry: REGISTRY },
rawLocalConfig: {},
registries: { default: REGISTRY },
registry: REGISTRY,
rootProjectManifestDir: '',
sort: true,
storeDir: '../store',
strictSsl: false,
tag: 'latest',
userAgent: 'pnpm',
userConfig: {},
useRunningStoreServer: false,
useStoreServer: false,
workspaceConcurrency: 4,
virtualStoreDirMaxLength: 120,
}
export const DEFAULT_OUTDATED_OPTS = {
...DEFAULT_OPTS,
sortBy: 'name' as const,
}