Skip to content

Commit

Permalink
refactor: LOG_LEVEL=>LogLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Apr 5, 2020
1 parent f331188 commit c7d16a4
Show file tree
Hide file tree
Showing 40 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion packages/build-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@pnpm/build-modules": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/ramda": "^0.27.3"
}
}
2 changes: 1 addition & 1 deletion packages/cli-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/cli-utils#readme",
"devDependencies": {
"@pnpm/cli-utils": "link:",
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/types": "workspace:5.0.0",
"@types/ramda": "^0.27.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core-loggers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@pnpm/logger": "^3.1.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1"
"@pnpm/logger": "3.2.2"
},
"directories": {
"test": "test"
Expand Down
2 changes: 1 addition & 1 deletion packages/default-fetcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
},
"devDependencies": {
"@pnpm/default-fetcher": "link:",
"@pnpm/logger": "3.2.1"
"@pnpm/logger": "3.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/default-reporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"devDependencies": {
"@pnpm/default-reporter": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/common-tags": "1.8.0",
"@types/normalize-path": "3.0.0",
"@types/pretty-time": "1.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/default-reporter/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config } from '@pnpm/config'
import * as logs from '@pnpm/core-loggers'
import { LOG_LEVEL } from '@pnpm/logger'
import { LogLevel } from '@pnpm/logger'
import PushStream from '@zkochan/zen-push'
import createDiffer = require('ansi-diff')
import most = require('most')
Expand All @@ -14,7 +14,7 @@ export default function (
streamParser: object,
reportingOptions?: {
appendOnly?: boolean,
logLevel?: LOG_LEVEL,
logLevel?: LogLevel,
throttleProgress?: number,
outputMaxWidth?: number,
},
Expand Down Expand Up @@ -64,7 +64,7 @@ export function toOutput$ (
streamParser: object,
reportingOptions?: {
appendOnly?: boolean,
logLevel?: LOG_LEVEL,
logLevel?: LogLevel,
outputMaxWidth?: number,
throttleProgress?: number,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/default-reporter/src/reporterForClient/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config } from '@pnpm/config'
import * as logs from '@pnpm/core-loggers'
import { LOG_LEVEL } from '@pnpm/logger'
import { LogLevel } from '@pnpm/logger'
import most = require('most')
import reportBigTarballsProgress from './reportBigTarballsProgress'
import reportDeprecations from './reportDeprecations'
Expand Down Expand Up @@ -37,7 +37,7 @@ export default function (
appendOnly?: boolean,
cmd: string,
isRecursive: boolean,
logLevel?: LOG_LEVEL,
logLevel?: LogLevel,
pnpmConfig?: Config,
throttleProgress?: number,
width?: number,
Expand Down
6 changes: 3 additions & 3 deletions packages/default-reporter/src/reporterForClient/reportMisc.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { LinkLog, Log, RegistryLog } from '@pnpm/core-loggers'
import { LOG_LEVEL } from '@pnpm/logger'
import { LogLevel } from '@pnpm/logger'
import most = require('most')
import os = require('os')
import reportError from '../reportError'
import formatWarn from './utils/formatWarn'
import { autozoom } from './utils/zooming'

// tslint:disable:object-literal-sort-keys
const LOG_LEVEL_NUMBER: Record<LOG_LEVEL, number> = {
const LOG_LEVEL_NUMBER: Record<LogLevel, number> = {
error: 0,
warn: 1,
info: 2,
Expand All @@ -22,7 +22,7 @@ export default (
},
opts: {
cwd: string,
logLevel?: LOG_LEVEL,
logLevel?: LogLevel,
zoomOutCurrent: boolean,
},
) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/default-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
},
"devDependencies": {
"@pnpm/default-resolver": "link:",
"@pnpm/logger": "3.2.1"
"@pnpm/logger": "3.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/dependencies-hierarchy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"devDependencies": {
"@pnpm/constants": "workspace:*",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/normalize-path": "3.0.0",
"dependencies-hierarchy": "link:"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/filter-lockfile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"devDependencies": {
"@pnpm/filter-lockfile": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/ramda": "^0.27.3",
"tempy": "0.5.0",
"write-yaml-file": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/get-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/get-context#readme",
"devDependencies": {
"@pnpm/get-context": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/is-ci": "^2.0.0",
"@types/ramda": "^0.27.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@pnpm/default-fetcher": "workspace:*",
"@pnpm/default-resolver": "workspace:*",
"@pnpm/headless": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/package-store": "workspace:*",
"@pnpm/read-projects-context": "workspace:*",
"@pnpm/store-path": "2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/hoist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@pnpm/logger": "^3.1.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/ramda": "^0.27.3"
},
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lifecycle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@pnpm/lifecycle": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/rimraf": "^3.0.0",
"json-append": "1.1.1",
"load-json-file": "6.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"devDependencies": {
"@pnpm/list": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/archy": "0.0.31",
"@types/common-tags": "1.8.0",
"@types/ramda": "^0.27.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/lockfile-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"devDependencies": {
"@pnpm/lockfile-file": "link:",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/js-yaml": "^3.12.3",
"@types/normalize-path": "3.0.0",
"@types/ramda": "^0.27.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/modules-cleaner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ramda": "0.27.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/modules-cleaner": "link:",
"@types/is-windows": "^1.0.0",
"@types/ramda": "^0.27.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/npm-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"write-json-file": "4.0.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/npm-resolver": "link:",
"@types/normalize-path": "^3.0.0",
"@types/semver": "^7.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/outdated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"semver": "7.1.3"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/outdated": "link:",
"@types/lru-cache": "^5.1.0",
"@types/ramda": "^0.27.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/package-is-installable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"semver": "7.1.3"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/package-is-installable": "link:",
"@types/semver": "^7.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/package-requester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"devDependencies": {
"@pnpm/local-resolver": "workspace:*",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/npm-resolver": "workspace:*",
"@pnpm/package-requester": "link:",
"@pnpm/tarball-fetcher": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/package-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"write-json-file": "4.0.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/npm-resolver": "workspace:*",
"@pnpm/package-store": "link:",
"@pnpm/tarball-fetcher": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-installation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/plugin-commands-installation#readme",
"devDependencies": {
"@pnpm/lockfile-types": "workspace:2.0.0",
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/matcher": "workspace:1.0.0",
"@pnpm/plugin-commands-installation": "link:",
"@pnpm/prepare": "workspace:0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-listing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@pnpm/constants": "workspace:3.0.0",
"@pnpm/filter-workspace-packages": "workspace:*",
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/plugin-commands-installation": "workspace:*",
"@pnpm/plugin-commands-listing": "link:",
"@pnpm/prepare": "workspace:0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-rebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/plugin-commands-rebuild#readme",
"devDependencies": {
"@pnpm/filter-workspace-packages": "workspace:2.0.10",
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/plugin-commands-rebuild": "link:",
"@pnpm/prepare": "workspace:0.0.0",
"@pnpm/test-fixtures": "workspace:0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-script-runners/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/plugin-commands-script-runners#readme",
"devDependencies": {
"@pnpm/filter-workspace-packages": "workspace:2.0.10",
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/plugin-commands-script-runners": "link:",
"@pnpm/prepare": "workspace:0.0.0",
"@types/common-tags": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/plugin-commands-server#readme",
"devDependencies": {
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/plugin-commands-server": "link:",
"@types/common-tags": "^1.8.0",
"@types/is-windows": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-commands-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"devDependencies": {
"@pnpm/assert-store": "workspace:1.0.0",
"@pnpm/lockfile-file": "workspace:3.0.7",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/plugin-commands-store": "link:",
"@pnpm/prepare": "workspace:0.0.0",
"@types/archy": "0.0.31",
Expand Down
2 changes: 1 addition & 1 deletion packages/pnpm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@pnpm/file-reporter": "0.1.0",
"@pnpm/filter-workspace-packages": "workspace:2.0.10",
"@pnpm/find-workspace-dir": "workspace:1.0.0",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/parse-cli-args": "workspace:1.0.0",
"@pnpm/plugin-commands-audit": "workspace:1.0.4",
"@pnpm/plugin-commands-import": "workspace:1.0.5",
Expand Down
6 changes: 3 additions & 3 deletions packages/pnpm/src/reporter/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config } from '@pnpm/config'
import defaultReporter from '@pnpm/default-reporter'
import { LOG_LEVEL, streamParser, writeToConsole } from '@pnpm/logger'
import { LogLevel, streamParser, writeToConsole } from '@pnpm/logger'
import silentReporter from './silentReporter'

export type ReporterType = 'default' | 'ndjson' | 'silent' | 'append-only'
Expand All @@ -21,7 +21,7 @@ export default (
},
reportingOptions: {
appendOnly: false,
logLevel: opts.config.loglevel as LOG_LEVEL,
logLevel: opts.config.loglevel as LogLevel,
throttleProgress: 200,
},
streamParser,
Expand All @@ -35,7 +35,7 @@ export default (
},
reportingOptions: {
appendOnly: true,
logLevel: opts.config.loglevel as LOG_LEVEL,
logLevel: opts.config.loglevel as LogLevel,
throttleProgress: 1000,
},
streamParser,
Expand Down
2 changes: 1 addition & 1 deletion packages/pnpmfile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/pnpmfile#readme",
"devDependencies": {
"@pnpm/logger": "^3.2.1",
"@pnpm/logger": "^3.2.2",
"@pnpm/pnpmfile": "link:",
"@types/ramda": "^0.27.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/read-projects-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"realpath-missing": "1.0.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1"
"@pnpm/logger": "3.2.2"
},
"bugs": {
"url": "https://github.com/pnpm/pnpm/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/resolve-dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"semver": "7.1.3"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/resolve-dependencies": "link:",
"@types/ramda": "^0.27.3",
"@types/semver": "^7.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@pnpm/logger": "^3.1.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/npm-resolver": "workspace:*",
"@pnpm/package-requester": "workspace:*",
"@pnpm/package-store": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/store-connection-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/store-connection-manager#readme",
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/store-connection-manager": "link:",
"@types/lru-cache": "5.1.0",
"@types/mz": "^2.7.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/supi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@pnpm/assert-store": "workspace:*",
"@pnpm/default-fetcher": "workspace:*",
"@pnpm/default-resolver": "workspace:*",
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@pnpm/package-store": "workspace:*",
"@pnpm/prepare": "workspace:0.0.0",
"@pnpm/store-path": "2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/symlink-dependency/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@pnpm/logger": "^3.1.0"
},
"devDependencies": {
"@pnpm/logger": "3.2.1",
"@pnpm/logger": "3.2.2",
"@types/mz": "^2.7.0"
},
"directories": {
Expand Down

0 comments on commit c7d16a4

Please sign in to comment.