New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

caterpillar

Package Overview
Dependencies
Maintainers
2
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caterpillar - npm Package Compare versions

Comparing version 6.3.0 to 6.4.0-next.1599107768.3684bce98fadcc94992785e1737c46458224a045

8

compiled-types/logger.d.ts
import { LevelInfo, LevelsMap } from 'rfc-log-levels'
import { LineOffset, LineInfo } from 'get-current-line'
import { Offset, Location } from 'get-current-line'
import { Transform } from './transform.js'
/** The log entry that Caterpillar creates and forwards to its transforms */
export interface LogEntry extends LevelInfo, LineInfo {
export interface LogEntry extends LevelInfo, Location {
/** the iso string of when the log occured */

@@ -14,3 +14,3 @@ date: string

/** Use to override the default value of {@link Logger.lineOffset} */
lineOffset?: LineOffset
lineOffset?: Offset
/** Use to override the default value of {@link Logger.levels} */

@@ -38,3 +38,3 @@ levels?: LevelsMap

*/
lineOffset: LineOffset
lineOffset: Offset
/**

@@ -41,0 +41,0 @@ * The mapping of log level names to log level numbers.

@@ -88,4 +88,5 @@ import getLogLevel, { rfcLogLevels } from 'rfc-log-levels'

line: -1,
method: 'unknown',
file: 'unknown',
char: -1,
method: '',
file: '',
}

@@ -92,0 +93,0 @@ // put it all together

@@ -31,10 +31,10 @@ import { Transform } from '../transform.js'

this.colors = {
'0': 'red',
'1': 'red',
'2': 'red',
'3': 'red',
'4': 'yellow',
'5': 'yellow',
'6': 'green',
'7': 'green',
0: 'red',
1: 'red',
2: 'red',
3: 'red',
4: 'yellow',
5: 'yellow',
6: 'green',
7: 'green',
}

@@ -125,3 +125,3 @@ // options

const debugString = lineFormatter(
`→ [${format.timestamp}] [${entry.file}:${entry.line}] [${entry.method}]`
`→ [${format.timestamp}] [${entry.file}:${entry.line}:${entry.char}] [${entry.method}]`
)

@@ -128,0 +128,0 @@ // Result

@@ -1,3 +0,3 @@

import filedirname from 'https://unpkg.com/filedirname@^1.0.0/edition-deno/index.ts'
const { __filename, __dirname } = filedirname(import.meta.url)
import filedirname from 'https://unpkg.com/filedirname@^2.0.0/edition-deno/index.ts'
const [__filename, __dirname] = filedirname(import.meta.url)
import getLogLevel, {

@@ -9,9 +9,9 @@ rfcLogLevels,

import getCurrentLine, {
LineOffset,
LineInfo,
} from 'https://unpkg.com/get-current-line@^5.16.0/edition-deno/index.ts'
Offset,
Location,
} from 'https://unpkg.com/get-current-line@^6.0.0/edition-deno/index.ts'
import { Transform } from './transform.ts'
/** The log entry that Caterpillar creates and forwards to its transforms */
export interface LogEntry extends LevelInfo, LineInfo {
export interface LogEntry extends LevelInfo, Location {
/** the iso string of when the log occured */

@@ -26,3 +26,3 @@ date: string

/** Use to override the default value of {@link Logger.lineOffset} */
lineOffset?: LineOffset
lineOffset?: Offset

@@ -54,3 +54,3 @@ /** Use to override the default value of {@link Logger.levels} */

*/
public lineOffset: LineOffset = {
public lineOffset: Offset = {
file: __filename,

@@ -133,4 +133,5 @@ method: /log/i,

line: -1,
method: 'unknown',
file: 'unknown',
char: -1,
method: '',
file: '',
}

@@ -137,0 +138,0 @@

@@ -157,3 +157,3 @@ // Imports

const debugString = lineFormatter(
`→ [${format.timestamp}] [${entry.file}:${entry.line}] [${entry.method}]`
`→ [${format.timestamp}] [${entry.file}:${entry.line}:${entry.char}] [${entry.method}]`
)

@@ -160,0 +160,0 @@

@@ -22,3 +22,3 @@ 'use strict'

for (var p in m)
if (p !== 'default' && !exports.hasOwnProperty(p))
if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
__createBinding(exports, m, p)

@@ -25,0 +25,0 @@ }

@@ -34,3 +34,3 @@ 'use strict'

for (var k in mod)
if (k !== 'default' && Object.hasOwnProperty.call(mod, k))
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k)

@@ -134,4 +134,5 @@ __setModuleDefault(result, mod)

line: -1,
method: 'unknown',
file: 'unknown',
char: -1,
method: '',
file: '',
}

@@ -138,0 +139,0 @@ // put it all together

@@ -34,3 +34,3 @@ 'use strict'

for (var k in mod)
if (k !== 'default' && Object.hasOwnProperty.call(mod, k))
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k)

@@ -73,10 +73,10 @@ __setModuleDefault(result, mod)

this.colors = {
'0': 'red',
'1': 'red',
'2': 'red',
'3': 'red',
'4': 'yellow',
'5': 'yellow',
'6': 'green',
'7': 'green',
0: 'red',
1: 'red',
2: 'red',
3: 'red',
4: 'yellow',
5: 'yellow',
6: 'green',
7: 'green',
}

@@ -167,3 +167,3 @@ // options

const debugString = lineFormatter(
`→ [${format.timestamp}] [${entry.file}:${entry.line}] [${entry.method}]`
`→ [${format.timestamp}] [${entry.file}:${entry.line}:${entry.char}] [${entry.method}]`
)

@@ -170,0 +170,0 @@ // Result

@@ -22,3 +22,3 @@ 'use strict'

for (var p in m)
if (p !== 'default' && !exports.hasOwnProperty(p))
if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
__createBinding(exports, m, p)

@@ -25,0 +25,0 @@ }

@@ -34,3 +34,3 @@ 'use strict'

for (var k in mod)
if (k !== 'default' && Object.hasOwnProperty.call(mod, k))
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k)

@@ -126,4 +126,5 @@ __setModuleDefault(result, mod)

line: -1,
method: 'unknown',
file: 'unknown',
char: -1,
method: '',
file: '',
}

@@ -130,0 +131,0 @@ // put it all together

@@ -34,3 +34,3 @@ 'use strict'

for (var k in mod)
if (k !== 'default' && Object.hasOwnProperty.call(mod, k))
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k)

@@ -73,10 +73,10 @@ __setModuleDefault(result, mod)

this.colors = {
'0': 'red',
'1': 'red',
'2': 'red',
'3': 'red',
'4': 'yellow',
'5': 'yellow',
'6': 'green',
'7': 'green',
0: 'red',
1: 'red',
2: 'red',
3: 'red',
4: 'yellow',
5: 'yellow',
6: 'green',
7: 'green',
}

@@ -165,3 +165,3 @@ // options

const debugString = lineFormatter(
`→ [${format.timestamp}] [${entry.file}:${entry.line}] [${entry.method}]`
`→ [${format.timestamp}] [${entry.file}:${entry.line}:${entry.char}] [${entry.method}]`
)

@@ -168,0 +168,0 @@ // Result

@@ -80,4 +80,5 @@ import getLogLevel, { rfcLogLevels } from 'rfc-log-levels'

line: -1,
method: 'unknown',
file: 'unknown',
char: -1,
method: '',
file: '',
}

@@ -84,0 +85,0 @@ // put it all together

@@ -31,10 +31,10 @@ import { Transform } from '../transform.js'

this.colors = {
'0': 'red',
'1': 'red',
'2': 'red',
'3': 'red',
'4': 'yellow',
'5': 'yellow',
'6': 'green',
'7': 'green',
0: 'red',
1: 'red',
2: 'red',
3: 'red',
4: 'yellow',
5: 'yellow',
6: 'green',
7: 'green',
}

@@ -123,3 +123,3 @@ // options

const debugString = lineFormatter(
`→ [${format.timestamp}] [${entry.file}:${entry.line}] [${entry.method}]`
`→ [${format.timestamp}] [${entry.file}:${entry.line}:${entry.char}] [${entry.method}]`
)

@@ -126,0 +126,0 @@ // Result

# History
## v6.4.0 2020 August 18
- Updated for [`get-current-line` v6](https://github.com/bevry/get-current-line), which also returns the character position of the line
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v6.3.0 2020 August 18

@@ -4,0 +9,0 @@

{
"title": "Caterpillar",
"name": "caterpillar",
"version": "6.3.0",
"version": "6.4.0-next.1599107768.3684bce98fadcc94992785e1737c46458224a045",
"description": "Caterpillar is the ultimate logging system for Deno, Node.js, and Web Browsers. Log levels are implemented to the RFC standard. Log entries can be filtered and piped to various streams, including coloured output to the terminal, the browser's console, and debug files. You can even write your own transforms.",

@@ -177,3 +177,2 @@ "homepage": "https://github.com/bevry/caterpillar",

},
"deno": "edition-deno/index.ts",
"browser": "edition-browsers/index.js",

@@ -184,3 +183,3 @@ "module": "edition-browsers/index.js",

"editions": "^4.1.0",
"get-current-line": "^5.16.0",
"get-current-line": "^6.0.0",
"rfc-log-levels": "^3.13.0"

@@ -190,6 +189,6 @@ },

"@bevry/update-contributors": "^1.16.0",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"assert-helpers": "^7.0.1",
"eslint": "^7.7.0",
"eslint": "^7.8.1",
"eslint-config-bevry": "^3.19.0",

@@ -199,9 +198,9 @@ "eslint-config-prettier": "^6.11.0",

"kava": "^5.11.0",
"make-deno-edition": "^1.0.2",
"prettier": "^2.0.5",
"make-deno-edition": "^1.1.0",
"prettier": "^2.1.1",
"projectz": "^2.15.0",
"surge": "^0.21.6",
"typedoc": "^0.18.0",
"typescript": "^3.9.7",
"valid-directory": "^3.1.0",
"typedoc": "^0.19.0",
"typescript": "^4.0.2",
"valid-directory": "^3.2.0",
"valid-module": "^1.13.0"

@@ -251,3 +250,4 @@ },

"singleQuote": true
}
},
"deno": "edition-deno/index.ts"
}

@@ -61,3 +61,3 @@ <!-- TITLE/ -->

``` typescript
import * as pkg from 'https://unpkg.com/caterpillar@^6.3.0/edition-deno/index.ts'
import * as pkg from 'https://unpkg.com/caterpillar@^6.4.0/edition-deno/index.ts'
```

@@ -69,3 +69,3 @@

<script type="module">
import * as pkg from '//cdn.skypack.dev/caterpillar@^6.3.0'
import * as pkg from '//cdn.skypack.dev/caterpillar@^6.4.0'
</script>

@@ -78,3 +78,3 @@ ```

<script type="module">
import * as pkg from '//unpkg.com/caterpillar@^6.3.0'
import * as pkg from '//unpkg.com/caterpillar@^6.4.0'
</script>

@@ -87,3 +87,3 @@ ```

<script type="module">
import * as pkg from '//dev.jspm.io/caterpillar@6.3.0'
import * as pkg from '//dev.jspm.io/caterpillar@6.4.0'
</script>

@@ -90,0 +90,0 @@ ```

import getLogLevel, { rfcLogLevels, LevelInfo, LevelsMap } from 'rfc-log-levels'
import getCurrentLine, { LineOffset, LineInfo } from 'get-current-line'
import getCurrentLine, { Offset, Location } from 'get-current-line'
import { Transform } from './transform.js'
/** The log entry that Caterpillar creates and forwards to its transforms */
export interface LogEntry extends LevelInfo, LineInfo {
export interface LogEntry extends LevelInfo, Location {
/** the iso string of when the log occured */

@@ -16,3 +16,3 @@ date: string

/** Use to override the default value of {@link Logger.lineOffset} */
lineOffset?: LineOffset
lineOffset?: Offset

@@ -44,3 +44,3 @@ /** Use to override the default value of {@link Logger.levels} */

*/
public lineOffset: LineOffset = {
public lineOffset: Offset = {
file: __filename,

@@ -123,4 +123,5 @@ method: /log/i,

line: -1,
method: 'unknown',
file: 'unknown',
char: -1,
method: '',
file: '',
}

@@ -127,0 +128,0 @@

@@ -157,3 +157,3 @@ // Imports

const debugString = lineFormatter(
`→ [${format.timestamp}] [${entry.file}:${entry.line}] [${entry.method}]`
`→ [${format.timestamp}] [${entry.file}:${entry.line}:${entry.char}] [${entry.method}]`
)

@@ -160,0 +160,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc